#include <eoParser.h>
Public Member Functions | |
virtual | ~eoParameterLoader () |
Need a virtual destructor. | |
virtual void | processParam (eoParam ¶m, std::string section="")=0 |
Register a parameter and set its value if it is known. | |
virtual bool | isItThere (eoParam &_param) const =0 |
checks if _param has been actually entered | |
template<class ValueType> | |
eoValueParam< ValueType > & | createParam (ValueType _defaultValue, std::string _longName, std::string _description, char _shortHand=0, std::string _section="", bool _required=false) |
Construct a Param and sets its value. | |
Private Attributes | |
std::vector< eoParam * > | ownedParams |
eoParameterLoader is an abstract class that can be used as a base for your own parameter loading and saving. The command line parser eoParser is derived from this class.
Definition at line 40 of file eoParser.h.
virtual void eoParameterLoader::processParam | ( | eoParam & | param, | |
std::string | section = "" | |||
) | [pure virtual] |
Register a parameter and set its value if it is known.
param | the parameter to process | |
section | the section where this parameter belongs |
Implemented in eoParser.
Referenced by createParam().
eoValueParam<ValueType>& eoParameterLoader::createParam | ( | ValueType | _defaultValue, | |
std::string | _longName, | |||
std::string | _description, | |||
char | _shortHand = 0 , |
|||
std::string | _section = "" , |
|||
bool | _required = false | |||
) | [inline] |
Construct a Param and sets its value.
The loader will own the memory thus created
_defaultValue | The default value | |
_longName | Long name of the argument | |
_description | Description of the parameter. What is useful for. | |
_shortName | Short name of the argument (Optional) | |
_section | Name of the section where the parameter belongs | |
_required | If it is a necessary parameter or not |
Definition at line 70 of file eoParser.h.
References processParam().
Referenced by eoParser::getORcreateParam(), and eoParser::setORcreateParam().