This is a helper class that instantiates parameters with different data types. More...
#include <GenericParam.h>
Public Types | |
typedef boost::function< void(T)> | SetterFn |
The type for the 'setter' function for this parameter. | |
typedef boost::function< T()> | GetterFn |
The type for the 'getter' function for this parameter. | |
Public Member Functions | |
SpecificParam (const std::string &name, const SetterFn &setter, const GetterFn &getter=GetterFn()) | |
An explicit instantiation of a parameter name requires the setter function and optionally the getter function. | |
virtual bool | setValue (const std::string &value) |
Set the value of the parameter. The value is taken in as a string, but converted to the type of that parameter. | |
virtual std::string | getValue (void) const |
Retrieve the value of the parameter, as a string. | |
![]() | |
GenericParam (const std::string &name) | |
The constructor of a parameter takes the name of the parameter (name) | |
const std::string & | getName (void) const |
Get the name of the parameter. | |
void | setName (const std::string &name) |
Set the name of the parameter. | |
template<typename T > | |
GenericParam & | operator= (const T &value) |
Assignment operator by type. This is just for convenience, as it just calls setValue() | |
void | setRangeSuggestion (const std::string &rangeSuggestion) |
Set a suggested range. | |
const std::string & | getRangeSuggestion (void) const |
Get the suggested range of values. | |
Protected Attributes | |
SetterFn | setter_ |
The setter function for this parameter. | |
GetterFn | getter_ |
The getter function for this parameter. | |
![]() | |
std::string | name_ |
The name of the parameter. | |
std::string | rangeSuggestion_ |
Suggested range for the parameter. More... | |
This is a helper class that instantiates parameters with different data types.
Definition at line 146 of file GenericParam.h.