OpenDaVINCI  4.15.3
CommandLineArgument.h
Go to the documentation of this file.
1 
20 #ifndef OPENDAVINCI_CORE_BASE_COMMANDLINEARGUMENT_H_
21 #define OPENDAVINCI_CORE_BASE_COMMANDLINEARGUMENT_H_
22 
23 #include <sstream>
24 #include <string>
25 
27 
28 namespace odcore {
29  namespace base {
30 
31  using namespace std;
32 
41  public:
43 
50  CommandLineArgument(const string& argument, const string& value, const bool &set);
51 
52  virtual ~CommandLineArgument();
53 
58  bool isSet() const;
59 
65  const string getArgument() const;
66 
71  template<class T>
72  inline T getValue() {
73  T retVal;
74  stringstream ss;
75  ss << m_value;
76  ss >> retVal;
77  return retVal;
78  };
79 
80  protected:
81  string m_argument;
82  string m_value;
83  bool m_set;
84  };
85  }
86 } // odcore::base
87 
88 #endif // OPENDAVINCI_CORE_BASE_COMMANDLINEARGUMENT_H_
Definition: CommandLineArgument.h:40
string m_value
Definition: CommandLineArgument.h:82
#define OPENDAVINCI_API
Definition: opendavinci.h:67
T getValue()
Definition: CommandLineArgument.h:72
bool m_set
Definition: CommandLineArgument.h:83