#include <argumentParser.h>


Public Member Functions | |
| Argument (T *t, char sn, string ln, string h, bool m) | |
| Constructor. | |
| void | printValue () const |
| General case for printing default value. | |
| Argument (T *t, char sn, string ln, string h, bool m) | |
| Constructor. | |
| void | printValue () const |
| Print the value of the associated variable. | |
| template<> | |
| bool | read (std::list< std::string > &str) |
| template<> | |
| bool | read (std::list< std::string > &) |
| template<> | |
| bool | read (std::list< std::string > &str) |
| Read the command line. | |
| template<> | |
| void | printValue () const |
| Print the value of the associated variable. | |
| template<> | |
| bool | read (std::list< std::string > &) |
| template<> | |
| bool | read (std::list< std::string > &str) |
| Read the command line. | |
| template<> | |
| bool | read (std::list< std::string > &) |
| template<> | |
| bool | read (std::list< std::string > &str) |
| Read the command line. | |
Private Member Functions | |
| bool | read (std::list< std::string > &str) |
| Try to read argument value from an input stream. | |
| bool | read (std::list< std::string > &str) |
| Try to read argument value from an input stream. | |
Private Attributes | |
| T * | ptr |
| Pointer to the parameter. | |
Contains a pointer to a value which can be parsed by a ArgumentParser.Contains also a short name, a long name and a help message.
Definition at line 108 of file argumentParser.h.
| Argument< T >::Argument | ( | T * | t, | |
| char | sn, | |||
| string | ln, | |||
| string | h, | |||
| bool | m | |||
| ) | [inline] |
Constructor.
| t | a pointer to the value | |
| sn | short name of the argument | |
| ln | long name of the argument | |
| h | help on the argument | |
| m | true iff the argument is mandatory |
Definition at line 118 of file argumentParser.h.
| Argument< T >::Argument | ( | T * | t, | |
| char | sn, | |||
| string | ln, | |||
| string | h, | |||
| bool | m | |||
| ) | [inline] |
Constructor.
| t | a pointer to the value | |
| sn | short name of the argument | |
| ln | long name of the argument | |
| h | help on the argument | |
| m | true iff the argument is mandatory |
Definition at line 120 of file argumentParser.h.
| void Argument< std::vector< std::string > >::printValue | ( | ) | const [inline, virtual] |
Print the value of the associated variable.
Implements ArgumentBase.
Definition at line 209 of file ArgumentParser.h.
General case for printing default value.
Implements ArgumentBase.
Definition at line 174 of file argumentParser.h.
References Argument< T >::ptr.
Read the command line.
Implements ArgumentBase.
Definition at line 164 of file argumentParser.h.
References ArgumentBase::isSet, and Argument< T >::ptr.
Booleans are seen as flags that you can set to TRUE using the command line. Example: run --verbose The advantage is that you do not have to set the value, it is automatically TRUE. The drawback is that reading a boolean necessarily sets it to TRUE. Currently you can not set a boolean to FALSE using this parser.
Implements ArgumentBase.
Definition at line 156 of file argumentParser.h.
References ArgumentBase::isSet, and Argument< T >::ptr.
Read the command line.
Implements ArgumentBase.
Definition at line 162 of file argumentParser.h.
References ArgumentBase::isSet, and Argument< T >::ptr.
Booleans are seen as flags that you can set to TRUE using the command line. Example: run --verbose The advantage is that you do not have to set the value, it is automatically TRUE. The drawback is that reading a boolean necessarily sets it to TRUE. Currently you can not set a boolean to FALSE using this parser.
Implements ArgumentBase.
Definition at line 154 of file argumentParser.h.
References ArgumentBase::isSet, and Argument< T >::ptr.
Read the command line.
Implements ArgumentBase.
Definition at line 191 of file ArgumentParser.h.
References ArgumentBase::isSet, and Argument< T >::ptr.
Booleans are seen as flags that you can set to TRUE using the command line. Example: run --verbose The advantage is that you do not have to set the value, it is automatically TRUE. The drawback is that reading a boolean necessarily sets it to TRUE. Currently you can not set a boolean to FALSE using this parser.
Implements ArgumentBase.
Definition at line 183 of file ArgumentParser.h.
References ArgumentBase::isSet, and Argument< T >::ptr.
| bool Argument< std::vector< std::string > >::read | ( | std::list< std::string > & | str | ) | [inline, virtual] |
Lists are used for options that can be repeted Example: run -D ELEM1 -D ELEM2 ...
Implements ArgumentBase.
Definition at line 166 of file ArgumentParser.h.
| bool Argument< T >::read | ( | std::list< std::string > & | str | ) | [inline, private, virtual] |
Try to read argument value from an input stream.
Return false if failed
Implements ArgumentBase.
Definition at line 135 of file argumentParser.h.
References ArgumentBase::isSet, and Argument< T >::ptr.
| bool Argument< T >::read | ( | std::list< std::string > & | str | ) | [inline, private, virtual] |
Try to read argument value from an input stream.
Return false if failed
Implements ArgumentBase.
Definition at line 133 of file argumentParser.h.
References ArgumentBase::isSet, and Argument< T >::ptr.
Pointer to the parameter.
Definition at line 127 of file argumentParser.h.
Referenced by Argument< T >::printValue(), and Argument< T >::read().
1.5.7.1