00001
00002
00003 #ifndef SLIC_COMMANDLINEOPTION_HH
00004 #define SLIC_COMMANDLINEOPTION_HH
00005
00006
00007 #include <map>
00008 #include <vector>
00009 #include <string>
00010
00011 namespace slic
00012 {
00013
00023 class CommandLineOption
00024 {
00025
00026 public:
00027
00032 CommandLineOption(const std::string& shortname,
00033 const std::string& longname,
00034 const std::string& description,
00035 unsigned int min_args=0,
00036 unsigned int max_args=0,
00037 const std::string& g4cmdstr="")
00038 : m_shortname(shortname),
00039 m_longname(longname),
00040 m_description(description),
00041 m_g4cmdstr(g4cmdstr),
00042 m_minArgs(min_args),
00043 m_maxArgs(max_args)
00044 {;}
00045
00046 virtual ~CommandLineOption()
00047 {;}
00048
00049 public:
00050
00055 const std::string& getShortName() const
00056 {
00057 return m_shortname;
00058 }
00059
00065 const std::string& getLongName() const
00066 {
00067 return m_longname;
00068 }
00069
00073 const std::string& getDescription() const
00074 {
00075 return m_description;
00076 }
00077
00084 const std::string& getG4CommandString() const
00085 {
00086 return m_g4cmdstr;
00087 }
00088
00092 unsigned int getMinArgs() const
00093 {
00094 return m_minArgs;
00095 }
00096
00100 unsigned int getMaxArgs() const
00101 {
00102 return m_maxArgs;
00103 }
00104
00105 private:
00106
00107 std::string m_shortname;
00108 std::string m_longname;
00109 std::string m_description;
00110 std::string m_g4cmdstr;
00111 int m_minArgs;
00112 int m_maxArgs;
00113 };
00114 }
00115
00116 #endif