#include <Parameter.hpp>
Public Member Functions | |
Parameter (std::string const &name, parameter_type_t type, parameter_flags_t flags, ParameterReflection const *checker) | |
virtual | ~Parameter () |
virtual int const * | getInteger () const |
virtual std::string const * | getString () const |
virtual double const * | getReal () const |
virtual Vector const * | getVector () const |
virtual Matrix const * | getMatrix () const |
virtual Status | set (int value) |
virtual Status | set (std::string const &value) |
virtual Status | set (double value) |
virtual Status | set (Vector const &value) |
virtual Status | set (Matrix const &value) |
virtual void | dump (std::ostream &os, std::string const &prefix) const |
Public Attributes | |
std::string const | name_ |
parameter_type_t const | type_ |
parameter_flags_t const | flags_ |
ParameterReflection const * | checker_ |
Fairly minimal for now: parameters have a name, a type, and (optionally) an associated checker. Ideas for future extensions are e.g. documentation strings, optional bounds for automatic checks, and a more generic type interface (instead of relying on parameter_type_t).
Definition at line 73 of file Parameter.hpp.
opspace::Parameter::Parameter | ( | std::string const & | name, | |
parameter_type_t | type, | |||
parameter_flags_t | flags, | |||
ParameterReflection const * | checker | |||
) |
Definition at line 31 of file Parameter.cpp.
References opspace::PARAMETER_TYPE_INTEGER, opspace::PARAMETER_TYPE_MATRIX, opspace::PARAMETER_TYPE_REAL, opspace::PARAMETER_TYPE_STRING, opspace::PARAMETER_TYPE_VECTOR, opspace::PARAMETER_TYPE_VOID, and type_.
opspace::Parameter::~Parameter | ( | ) | [virtual] |
Definition at line 55 of file Parameter.cpp.
int const * opspace::Parameter::getInteger | ( | ) | const [virtual] |
std::string const * opspace::Parameter::getString | ( | ) | const [virtual] |
double const * opspace::Parameter::getReal | ( | ) | const [virtual] |
Vector const * opspace::Parameter::getVector | ( | ) | const [virtual] |
Reimplemented in opspace::VectorParameter.
Definition at line 82 of file Parameter.cpp.
Referenced by draw_cb().
Matrix const * opspace::Parameter::getMatrix | ( | ) | const [virtual] |
Status opspace::Parameter::set | ( | int | value | ) | [virtual] |
Reimplemented in opspace::IntegerParameter.
Definition at line 96 of file Parameter.cpp.
Referenced by servo_cb().
Status opspace::Parameter::set | ( | std::string const & | value | ) | [virtual] |
Status opspace::Parameter::set | ( | double | value | ) | [virtual] |
Status opspace::Parameter::set | ( | Vector const & | value | ) | [virtual] |
Status opspace::Parameter::set | ( | Matrix const & | value | ) | [virtual] |
void opspace::Parameter::dump | ( | std::ostream & | os, | |
std::string const & | prefix | |||
) | const [virtual] |
Reimplemented in opspace::IntegerParameter, opspace::StringParameter, opspace::RealParameter, opspace::VectorParameter, and opspace::MatrixParameter.
Definition at line 136 of file Parameter.cpp.
References name_.
Referenced by opspace::operator>>().
std::string const opspace::Parameter::name_ |
Definition at line 76 of file Parameter.hpp.
Referenced by opspace::MatrixParameter::dump(), opspace::VectorParameter::dump(), opspace::RealParameter::dump(), opspace::StringParameter::dump(), opspace::IntegerParameter::dump(), and dump().
Definition at line 78 of file Parameter.hpp.
Referenced by opspace::MatrixParameter::set(), opspace::VectorParameter::set(), opspace::RealParameter::set(), opspace::StringParameter::set(), and opspace::IntegerParameter::set().
Definition at line 79 of file Parameter.hpp.
Referenced by opspace::MatrixParameter::set(), opspace::VectorParameter::set(), opspace::RealParameter::set(), opspace::StringParameter::set(), and opspace::IntegerParameter::set().