SLIC  6.1.1
Simulation for the Linear Collider (SLIC) - Geant4 simulation application
CommandLineOption.hh
Go to the documentation of this file.
1 #ifndef SLIC_COMMANDLINEOPTION_HH_
2 #define SLIC_COMMANDLINEOPTION_HH_ 1
3 
4 // STL
5 #include <map>
6 #include <vector>
7 #include <string>
8 
9 namespace slic {
10 
18 
19  public:
20 
29  CommandLineOption(const std::string& shortname,
30  const std::string& longname,
31  const std::string& description,
32  unsigned int minArgs = 0,
33  unsigned int maxArgs = 0,
34  const std::string& macroCommand = "") :
35  m_shortname(shortname),
36  m_longname(longname),
37  m_description(description),
38  m_g4cmdstr(macroCommand),
39  m_minArgs(minArgs),
40  m_maxArgs(maxArgs) {
41  }
42 
46  virtual ~CommandLineOption() {
47  }
48 
49  public:
50 
56  const std::string& getShortName() const {
57  return m_shortname;
58  }
59 
66  const std::string& getLongName() const {
67  return m_longname;
68  }
69 
74  const std::string& getDescription() const {
75  return m_description;
76  }
77 
85  const std::string& getG4CommandString() const {
86  return m_g4cmdstr;
87  }
88 
93  unsigned int getMinArgs() const {
94  return m_minArgs;
95  }
96 
101  unsigned int getMaxArgs() const {
102  return m_maxArgs;
103  }
104 
105  private:
106 
107  std::string m_shortname;
108  std::string m_longname;
109  std::string m_description;
110  std::string m_g4cmdstr;
113 };
114 }
115 
116 #endif
Command-line option with a single letter, full name and description plus an associated Geant4 command...
unsigned int getMaxArgs() const
const std::string & getDescription() const
unsigned int getMinArgs() const
const std::string & getLongName() const
CommandLineOption(const std::string &shortname, const std::string &longname, const std::string &description, unsigned int minArgs=0, unsigned int maxArgs=0, const std::string &macroCommand="")
const std::string & getShortName() const
const std::string & getG4CommandString() const