GEMC  2.2
Geant4 Monte-Carlo Framework
options.h
Go to the documentation of this file.
1 
8 #ifndef OPTIONS_H
9 #define OPTIONS_H
10 
11 
12 // Qt4 headers
13 #include <QDomDocument>
14 #include <QString>
15 #include <QFile>
16 
17 // C++ headers
18 #include <iostream>
19 #include <map>
20 #include <vector>
21 #include <string>
22 #include <ctime>
23 #include <fstream>
24 using namespace std;
25 
34 class aopt
35 {
36 public:
37  double arg;
38  string args;
39  string name;
40  string help;
41  int type;
42  string ctgr;
43 
44 public:
45  void printSetting();
46 };
47 
48 
54 class goptions
55 {
56  public:
57 
58  goptions();
59  ~goptions(){;}
60 
61  virtual void setGoptions();
62  void setOptions();
63  void scanGcard(string file);
64  int setOptMap(int argc, char **args);
65  int setOptMap(int argc, char **args, int i)
66  {
67  ignoreNotFound = i;
68  return setOptMap(argc, args);
69  }
70 
71  map<string, aopt> optMap;
72  map<string, string> getOptMap();
73 
74  vector<aopt> getArgs(string);
75 
77 };
80 
81 
82 #endif
83 
84 
85 
86 
87 
string help
help for the argument variable.
Definition: options.h:40
STL namespace.
Definition: options.h:34
string ctgr
help category
Definition: options.h:42
string name
name to be displayed for the argument variable.
Definition: options.h:39
string args
string assigned to argument.
Definition: options.h:38
int type
0 = number, 1 = string
Definition: options.h:41
int setOptMap(int argc, char **args, int i)
Definition: options.h:65
map< string, aopt > optMap
Options map.
Definition: options.h:71
double arg
double assigned to argument.
Definition: options.h:37
~goptions()
Definition: options.h:59
int ignoreNotFound
Definition: options.h:76