Go to the documentation of this file.
35 #ifndef TTA_CMD_LINE_OPTION_PARSER_HH
36 #define TTA_CMD_LINE_OPTION_PARSER_HH
73 virtual bool parseValue(std::string arguments, std::string prefix) = 0;
78 virtual int integer(
int index = 0)
const;
80 virtual std::string
String(
int index = 0)
const;
81 virtual double real()
const;
122 std::string alias =
"");
127 virtual bool parseValue(std::string arguments, std::string prefix);
128 virtual int integer(
int index = 0)
const;
152 std::string alias =
"");
157 virtual bool parseValue(std::string arguments, std::string prefix);
185 std::string alias =
"");
190 virtual bool parseValue(std::string arguments, std::string prefix);
191 virtual std::string
String(
int index = 0)
const;
215 std::string alias =
"");
220 virtual bool parseValue(std::string arguments, std::string prefix);
221 virtual std::string
String(
int index = 0)
const;
251 std::string alias =
"");
256 virtual bool parseValue(std::string arguments, std::string prefix);
257 virtual double real()
const;
283 std::string alias =
"",
284 bool hidden =
false);
289 virtual bool parseValue(std::string arguments, std::string prefix);
315 std::string alias =
"");
320 virtual bool parseValue(std::string arguments, std::string prefix);
322 virtual int integer(
int index = 0)
const;
349 std::string alias =
"");
354 virtual bool parseValue(std::string arguments, std::string prefix);
356 virtual std::string
String(
int index = 0)
const;
UnsignedIntegerCmdLineOptionParser(std::string name, std::string desc, std::string alias="")
virtual bool isFlagOff() const
virtual bool parseValue(std::string arguments, std::string prefix)
UnsignedIntegerCmdLineOptionParser & operator=(const UnsignedIntegerCmdLineOptionParser &)
Assignment not allowed.
StringListCmdLineOptionParser(std::string name, std::string desc, std::string alias="")
virtual unsigned unsignedInteger(int index=0) const
IntegerCmdLineOptionParser & operator=(const IntegerCmdLineOptionParser &)
Assignment not allowed.
virtual OptionValue * copy() const
virtual unsigned unsignedInteger(int index=0) const
virtual bool isFlagOn() const
bool value_
The value of option.
virtual std::string String(int index=0) const
virtual ~IntegerListCmdLineOptionParser()
BoolCmdLineOptionParser(std::string name, std::string desc, std::string alias="", bool hidden=false)
virtual ~StringListCmdLineOptionParser()
virtual bool isFlagOn() const
unsigned value_
The value of option.
StringCmdLineOptionParser & operator=(const StringCmdLineOptionParser &)
Assignment not allowed.
std::string shortName() const
virtual bool isFlagOff() const
CmdLineOptionParser & operator=(const CmdLineOptionParser &)
Assignment not allowed.
virtual ~StringCmdLineOptionParser()
RealCmdLineOptionParser(std::string name, std::string desc, std::string alias="")
virtual bool parseValue(std::string arguments, std::string prefix)=0
Pure virtual function that parses the value of option.
virtual bool parseValue(std::string arguments, std::string prefix)
virtual OptionValue * copy() const
IntegerListCmdLineOptionParser & operator=(const IntegerListCmdLineOptionParser &)
Assignment not allowed.
virtual bool parseValue(std::string arguments, std::string prefix)
virtual int listSize() const
virtual OptionValue * copy() const =0
bool hidden_
The hidden flag. If set, no entry is printed in the normal help text.
CmdLineOptionParser(std::string name, std::string desc, std::string alias, bool hidden=false)
virtual std::string String(int index=0) const
OptionalStringCmdLineOptionParser & operator=(const OptionalStringCmdLineOptionParser &)
Assignment not allowed.
virtual bool parseValue(std::string arguments, std::string prefix)
virtual bool isFlagOff() const
double value_
The value of the option.
virtual bool parseValue(std::string arguments, std::string prefix)
std::string longName() const
bool flag_
The flag status.
IntegerCmdLineOptionParser(std::string name, std::string desc, std::string alias="")
virtual int listSize() const
virtual double real() const
std::string longName_
The full name of an option.
virtual ~IntegerCmdLineOptionParser()
virtual std::string String(int index=0) const
OptionalStringCmdLineOptionParser(std::string name, std::string desc, std::string alias="")
virtual ~BoolCmdLineOptionParser()
BoolCmdLineOptionParser & operator=(const BoolCmdLineOptionParser &)
Assignment not allowed.
std::string description() const
virtual ~OptionalStringCmdLineOptionParser()
std::string desc_
The description of option.
virtual OptionValue * copy() const
virtual ~CmdLineOptionParser()
virtual ~UnsignedIntegerCmdLineOptionParser()
StringListCmdLineOptionParser & operator=(const StringListCmdLineOptionParser &)
Assignment not allowed.
virtual OptionValue * copy() const
std::string value_
The value of the option.
virtual bool parseValue(std::string arguments, std::string prefix)
virtual bool parseValue(std::string arguments, std::string prefix)
virtual OptionValue * copy() const
std::string shortName_
The optional alias (shorter name).
virtual int integer(int index=0) const
bool defined_
Is the value of this option set in the parsed command line?
virtual bool isFlagOn() const
std::string value_
The value of the option.
virtual bool parseValue(std::string arguments, std::string prefix)
std::vector< std::string > values_
The values in string list.
virtual double real() const
virtual int listSize() const
virtual std::string String(int index=0) const
virtual ~RealCmdLineOptionParser()
std::vector< int > values_
The values in integer list.
virtual OptionValue * copy() const
virtual int integer(int index=0) const
RealCmdLineOptionParser & operator=(const RealCmdLineOptionParser &)
Assignment not allowed.
IntegerListCmdLineOptionParser(std::string name, std::string desc, std::string alias="")
int value_
The value of option.
virtual int integer(int index=0) const
StringCmdLineOptionParser(std::string name, std::string desc, std::string alias="")
virtual OptionValue * copy() const
virtual OptionValue * copy() const