GGS(GenericGEANT4Simulation)Software  2.6.0
 All Data Structures Namespaces Files Functions Variables Typedefs Macros
GGSInputParser.h
Go to the documentation of this file.
1 /*
2  * GGSInputParser.h
3  *
4  * Created on: 2010-11-02
5  * Author: Emiliano Mocchiutti
6  */
7 
10 #ifndef GGSINPUTPARSER_H
11 #define GGSINPUTPARSER_H
12 #include <stdio.h>
13 #include <stdlib.h>
14 #include <iostream>
15 #include <string>
16 #include <vector>
17 
18 
19 
29 public:
35  static GGSInputParser& GetInstance();
36 
44  void ReadInput(std::string fileName, int* argc, std::string* argv);
45 
53  void ReadInput(std::string fileName);
54 
55  const std::string &GetParameter(std::string parameterName);
56 
57  bool GetFlag(std::string flagName);
58 
59  void Report();
60 
61 protected:
62 
63 private:
64 
67 
69  ~GGSInputParser();
70 
71  std::string _configFileName;
72  std::vector<std::pair<std::string, std::string> > _parameters;
73  static const std::string _nullValue;
74 };
75 
76 #endif // GGSINPUTPARSER_H
static GGSInputParser & GetInstance()
Get instance of the singleton.
void ReadInput(std::string fileName, int *argc, std::string *argv)
Reads configuration file.
Class needed to parse configuration file.