base class for Variable handling
More...
#include <BasicVariable.h>
|
| | BasicVariable (const std::string &longname, const std::string &shortname, const std::string &description, bool required, bool multiple) |
| | constructor taking the longname (= argument in argument list), shortname (= short name for the argument list) and a description text for –help, inserts variable into the variableList of the Parser More...
|
| |
| virtual | ~BasicVariable () |
| | destructor, removes variable of the variableList of the Parser More...
|
| |
| std::string | getLongname () const |
| | returns the argument of the variable More...
|
| |
| std::string | getShortname () const |
| | returns the argument of the variable More...
|
| |
| virtual bool | isBool () const =0 |
| | returns whether the type of the variable is bool (true) or not (false) More...
|
| |
| virtual bool | setValue (const std::string &value)=0 |
| | sets a value received from parsing More...
|
| |
| bool | isSet () const |
| | returns true, if this variable was set via command line More...
|
| |
| bool | isRequired () const |
| | returns true, if this variable is required to be set More...
|
| |
| bool | canHaveMultiple () const |
| | returns true, if this variable can have multiple values More...
|
| |
| virtual void | resetToDefault ()=0 |
| | resets value to default value More...
|
| |
|
| bool | _set |
| | tells whether the variable was set via command line or not More...
|
| |
base class for Variable handling
Definition at line 42 of file BasicVariable.h.
§ BasicVariable()
| clockUtils::argParser::BasicVariable::BasicVariable |
( |
const std::string & |
longname, |
|
|
const std::string & |
shortname, |
|
|
const std::string & |
description, |
|
|
bool |
required, |
|
|
bool |
multiple |
|
) |
| |
constructor taking the longname (= argument in argument list), shortname (= short name for the argument list) and a description text for –help, inserts variable into the variableList of the Parser
§ ~BasicVariable()
| virtual clockUtils::argParser::BasicVariable::~BasicVariable |
( |
| ) |
|
|
virtual |
destructor, removes variable of the variableList of the Parser
§ canHaveMultiple()
| bool clockUtils::argParser::BasicVariable::canHaveMultiple |
( |
| ) |
const |
|
inline |
returns true, if this variable can have multiple values
Definition at line 97 of file BasicVariable.h.
§ getLongname()
| std::string clockUtils::argParser::BasicVariable::getLongname |
( |
| ) |
const |
|
inline |
§ getShortname()
| std::string clockUtils::argParser::BasicVariable::getShortname |
( |
| ) |
const |
|
inline |
§ isBool()
| virtual bool clockUtils::argParser::BasicVariable::isBool |
( |
| ) |
const |
|
pure virtual |
§ isRequired()
| bool clockUtils::argParser::BasicVariable::isRequired |
( |
| ) |
const |
|
inline |
returns true, if this variable is required to be set
Definition at line 90 of file BasicVariable.h.
§ isSet()
| bool clockUtils::argParser::BasicVariable::isSet |
( |
| ) |
const |
|
inline |
returns true, if this variable was set via command line
Definition at line 83 of file BasicVariable.h.
§ resetToDefault()
| virtual void clockUtils::argParser::BasicVariable::resetToDefault |
( |
| ) |
|
|
pure virtual |
resets value to default value
§ setValue()
| virtual bool clockUtils::argParser::BasicVariable::setValue |
( |
const std::string & |
value | ) |
|
|
pure virtual |
§ Parser
§ _set
| bool clockUtils::argParser::BasicVariable::_set |
|
protected |
tells whether the variable was set via command line or not
Definition at line 110 of file BasicVariable.h.
The documentation for this class was generated from the following file: