SUMO - Simulation of Urban MObility
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
OptionsIO.h
Go to the documentation of this file.
1 /****************************************************************************/
8 // Helper for parsing command line arguments and reading configuration files
9 /****************************************************************************/
10 // SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/
11 // Copyright (C) 2001-2016 DLR (http://www.dlr.de/) and contributors
12 /****************************************************************************/
13 //
14 // This file is part of SUMO.
15 // SUMO is free software: you can redistribute it and/or modify
16 // it under the terms of the GNU General Public License as published by
17 // the Free Software Foundation, either version 3 of the License, or
18 // (at your option) any later version.
19 //
20 /****************************************************************************/
21 #ifndef OptionsIO_h
22 #define OptionsIO_h
23 
24 
25 // ===========================================================================
26 // included modules
27 // ===========================================================================
28 #ifdef _MSC_VER
29 #include <windows_config.h>
30 #else
31 #include <config.h>
32 #endif
33 
35 
36 
37 // ===========================================================================
38 // class declarations
39 // ===========================================================================
40 class OptionsCont;
41 
42 
43 // ===========================================================================
44 // class definitions
45 // ===========================================================================
54 class OptionsIO {
55 public:
61  static void setArgs(int argc, char** argv);
62 
63 
76  static void getOptions(const bool commandLineOnly = false);
77 
78 
85  static void loadConfiguration();
86 
87 
88 private:
94  static std::string getRoot(const std::string& filename);
95 
96 
97 private:
98  static int myArgC;
99  static char** myArgV;
100 
101 };
102 
103 
104 #endif
105 
106 /****************************************************************************/
107 
static void getOptions(const bool commandLineOnly=false)
Parses the command line arguments and loads the configuration.
Definition: OptionsIO.cpp:72
static char ** myArgV
Definition: OptionsIO.h:99
static void setArgs(int argc, char **argv)
Stores the command line arguments for later parsing.
Definition: OptionsIO.cpp:65
static void loadConfiguration()
Loads and parses the configuration.
Definition: OptionsIO.cpp:98
static int myArgC
Definition: OptionsIO.h:98
A storage for options typed value containers)
Definition: OptionsCont.h:99
static std::string getRoot(const std::string &filename)
Retrieves the XML root element of a supposed configuration or net.
Definition: OptionsIO.cpp:131