Template Class SpecificParam

Inheritance Relationships

Base Type

Class Documentation

template<typename T>
class SpecificParam : public ompl::base::GenericParam

This is a helper class that instantiates parameters with different data types.

Public Types

using SetterFn = std::function<void(T)>

The type for the ‘setter’ function for this parameter.

using GetterFn = std::function<T()>

The type for the ‘getter’ function for this parameter.

Public Functions

inline SpecificParam(const std::string &name, SetterFn setter, GetterFn getter = GetterFn())

An explicit instantiation of a parameter name requires the setter function and optionally the getter function.

~SpecificParam() override = default
inline virtual bool setValue(const std::string &value) override

Set the value of the parameter. The value is taken in as a string, but converted to the type of that parameter.

inline virtual std::string getValue() const override

Retrieve the value of the parameter, as a string.

inline virtual std::string getValue() const

Retrieve the value of the parameter, as a string.

inline virtual std::string getValue() const

Retrieve the value of the parameter, as a string.

inline virtual std::string getValue() const

Retrieve the value of the parameter, as a string.

inline virtual std::string getValue() const

Retrieve the value of the parameter, as a string.

Protected Functions

T lexical_cast(const std::string &value) const

Helper function to convert strings into objects of type T.

Supported types are: bool, int, long, long long, unsigned int, unsigned long, unsigned long long, float, double, long double, char, std::string.

Protected Attributes

SetterFn setter_

The setter function for this parameter.

GetterFn getter_

The getter function for this parameter.