GEMC  2.3
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  int repe;
44 
46  aopt() {repe = 0;}
47 
48 public:
49  void printSetting();
50 };
51 
52 
58 class goptions
59 {
60 public:
61 
62  goptions();
63  ~goptions(){;}
64 
65  virtual void setGoptions();
66  void setOptions();
67  void scanGcard(string file);
68  int setOptMap(int argc, char **args);
69  int setOptMap(int argc, char **args, int i)
70  {
71  ignoreNotFound = i;
72  return setOptMap(argc, args);
73  }
74 
75  map<string, aopt> optMap;
76  map<string, string> getOptMap();
77 
78  vector<aopt> getArgs(string);
79 
81 };
84 
85 
86 #endif
87 
88 
89 
90 
91 
aopt()
Definition: options.h:46
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:69
map< string, aopt > optMap
Options map.
Definition: options.h:75
double arg
double assigned to argument.
Definition: options.h:37
~goptions()
Definition: options.h:63
int ignoreNotFound
Definition: options.h:80
int repe
if this is set to 0: command line will always overwrite the gcard
Definition: options.h:43