GenericParam.h
171 SpecificParam(const std::string &name, const SetterFn &setter, const GetterFn &getter = GetterFn()) :
boost::function< void(T)> SetterFn
The type for the 'setter' function for this parameter.
Definition: GenericParam.h:164
GenericParam(const std::string &name)
The constructor of a parameter takes the name of the parameter (name)
Definition: GenericParam.h:70
Motion planning algorithms often employ parameters to guide their exploration process. (e.g., goal biasing). Motion planners (and some of their components) use this class to declare what the parameters are, in a generic way, so that they can be set externally.
Definition: GenericParam.h:65
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 ...
Definition: GenericParam.h:182
std::size_t size() const
Get the number of parameters maintained by this instance.
Definition: GenericParam.h:302
virtual std::string getValue() const
Retrieve the value of the parameter, as a string.
Definition: GenericParam.h:203
This is a helper class that instantiates parameters with different data types.
Definition: GenericParam.h:159
const std::string & maybeWrapBool(const std::string &value) const
Bool values such as "false" cannot be converted to bool using lexical_cast. We need to map those to "...
Definition: GenericParam.h:128
const std::string & getRangeSuggestion() const
Get the suggested range of values.
Definition: GenericParam.h:118
virtual std::string getValue() const =0
Retrieve the value of the parameter, as a string.
GenericParam & operator=(const T &value)
Assignment operator by type. This is just for convenience, as it just calls setValue() ...
Definition: GenericParam.h:98
void declareParam(const std::string &name, const typename SpecificParam< T >::SetterFn &setter, const typename SpecificParam< T >::GetterFn &getter=typename SpecificParam< T >::GetterFn())
This function declares a parameter name, and specifies the setter and getter functions.
Definition: GenericParam.h:240
boost::function< T()> GetterFn
The type for the 'getter' function for this parameter.
Definition: GenericParam.h:167
void setRangeSuggestion(const std::string &rangeSuggestion)
Set a suggested range.
Definition: GenericParam.h:112
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 ...
Definition: GenericParam.h:171
virtual bool setValue(const std::string &value)=0
Set the value of the parameter. The value is taken in as a string, but converted to the type of that ...