#include <Parameter.hpp>
Public Member Functions | |
ParameterReflection (std::string const &type_name, std::string const &instance_name) | |
virtual | ~ParameterReflection () |
virtual Status | check (int const *param, int value) const |
Default implementation always returns succes. | |
virtual Status | check (std::string const *param, std::string const &value) const |
Default implementation always returns succes. | |
virtual Status | check (double const *param, double value) const |
Default implementation always returns succes. | |
virtual Status | check (Vector const *param, Vector const &value) const |
Default implementation always returns succes. | |
virtual Status | check (Matrix const *param, Matrix const &value) const |
Default implementation always returns succes. | |
std::string const & | getName () const |
std::string const & | getTypeName () const |
Parameter * | lookupParameter (std::string const &name) |
| |
Parameter const * | lookupParameter (std::string const &name) const |
| |
Parameter * | lookupParameter (std::string const &name, parameter_type_t type) |
| |
Parameter const * | lookupParameter (std::string const &name, parameter_type_t type) const |
| |
parameter_lookup_t const & | getParameterTable () const |
virtual void | dump (std::ostream &os, std::string const &title, std::string const &prefix) const |
Protected Member Functions | |
IntegerParameter * | declareParameter (std::string const &name, int *integer, parameter_flags_t flags=PARAMETER_FLAG_DEFAULT) |
Used by subclasse to make one of their fields accessible to the outside. | |
StringParameter * | declareParameter (std::string const &name, std::string *instance, parameter_flags_t flags=PARAMETER_FLAG_DEFAULT) |
See also declareParameter(std::string const &, int *). | |
RealParameter * | declareParameter (std::string const &name, double *real, parameter_flags_t flags=PARAMETER_FLAG_DEFAULT) |
See also declareParameter(std::string const &, int *). | |
VectorParameter * | declareParameter (std::string const &name, Vector *vector, parameter_flags_t flags=PARAMETER_FLAG_DEFAULT) |
See also declareParameter(std::string const &, int *). | |
MatrixParameter * | declareParameter (std::string const &name, Matrix *matrix, parameter_flags_t flags=PARAMETER_FLAG_DEFAULT) |
See also declareParameter(std::string const &, int *). | |
Protected Attributes | |
std::string const | type_name_ |
std::string const | instance_name_ |
Manages a table of Parameter instances and provides default implementations for parameter checker methods.
Definition at line 187 of file Parameter.hpp.
opspace::ParameterReflection::ParameterReflection | ( | std::string const & | type_name, | |
std::string const & | instance_name | |||
) |
Definition at line 335 of file Parameter.cpp.
opspace::ParameterReflection::~ParameterReflection | ( | ) | [virtual] |
Definition at line 344 of file Parameter.cpp.
Status opspace::ParameterReflection::check | ( | int const * | param, | |
int | value | |||
) | const [virtual] |
Default implementation always returns succes.
Definition at line 404 of file Parameter.cpp.
Referenced by opspace::MatrixParameter::set(), opspace::VectorParameter::set(), opspace::RealParameter::set(), opspace::StringParameter::set(), and opspace::IntegerParameter::set().
Status opspace::ParameterReflection::check | ( | std::string const * | param, | |
std::string const & | value | |||
) | const [virtual] |
Default implementation always returns succes.
Reimplemented in opspace::CartPosTask.
Definition at line 412 of file Parameter.cpp.
Status opspace::ParameterReflection::check | ( | double const * | param, | |
double | value | |||
) | const [virtual] |
Default implementation always returns succes.
Reimplemented in opspace::DraftPIDTask, opspace::SelectedJointPostureTask, and opspace::TrajectoryTask.
Definition at line 420 of file Parameter.cpp.
Status opspace::ParameterReflection::check | ( | Vector const * | param, | |
Vector const & | value | |||
) | const [virtual] |
Default implementation always returns succes.
Reimplemented in opspace::PDTask, opspace::DraftPIDTask, opspace::SelectedJointPostureTask, opspace::TrajectoryTask, and opspace::JointLimitTask.
Definition at line 428 of file Parameter.cpp.
Status opspace::ParameterReflection::check | ( | Matrix const * | param, | |
Matrix const & | value | |||
) | const [virtual] |
std::string const& opspace::ParameterReflection::getName | ( | ) | const [inline] |
Reimplemented in opspace::Skill.
Definition at line 210 of file Parameter.hpp.
References instance_name_.
std::string const& opspace::ParameterReflection::getTypeName | ( | ) | const [inline] |
Parameter * opspace::ParameterReflection::lookupParameter | ( | std::string const & | name | ) |
You can use getParameterTable() to inspect the list of parameters.
Definition at line 354 of file Parameter.cpp.
Referenced by main().
Parameter const * opspace::ParameterReflection::lookupParameter | ( | std::string const & | name | ) | const |
You can use getParameterTable() to inspect the list of parameters.
Definition at line 365 of file Parameter.cpp.
Parameter * opspace::ParameterReflection::lookupParameter | ( | std::string const & | name, | |
parameter_type_t | type | |||
) |
You can use getParameterTable() to inspect the list of parameters.
Definition at line 376 of file Parameter.cpp.
Parameter const * opspace::ParameterReflection::lookupParameter | ( | std::string const & | name, | |
parameter_type_t | type | |||
) | const |
You can use getParameterTable() to inspect the list of parameters.
Definition at line 390 of file Parameter.cpp.
parameter_lookup_t const& opspace::ParameterReflection::getParameterTable | ( | ) | const [inline] |
Definition at line 245 of file Parameter.hpp.
void opspace::ParameterReflection::dump | ( | std::ostream & | os, | |
std::string const & | title, | |||
std::string const & | prefix | |||
) | const [virtual] |
Reimplemented in opspace::Skill, and opspace::Task.
Definition at line 443 of file Parameter.cpp.
Referenced by opspace::Skill::dbg(), opspace::Task::dump(), and opspace::Skill::dump().
IntegerParameter * opspace::ParameterReflection::declareParameter | ( | std::string const & | name, | |
int * | integer, | |||
parameter_flags_t | flags = PARAMETER_FLAG_DEFAULT | |||
) | [protected] |
Used by subclasse to make one of their fields accessible to the outside.
The parameter then becomes available through the lookupParameter() and getParameterTable() methods.
Definition at line 456 of file Parameter.cpp.
Referenced by opspace::CartPosTask::CartPosTask(), opspace::CartPosTrjTask::CartPosTrjTask(), opspace::ClassicTaskPostureController::ClassicTaskPostureController(), opspace::DraftPIDTask::DraftPIDTask(), opspace::JointLimitTask::JointLimitTask(), opspace::OrientationTask::OrientationTask(), opspace::PDTask::PDTask(), tut05::PTask::PTask(), opspace::SelectedJointPostureTask::SelectedJointPostureTask(), opspace::Task::Task(), and opspace::TrajectoryTask::TrajectoryTask().
StringParameter * opspace::ParameterReflection::declareParameter | ( | std::string const & | name, | |
std::string * | instance, | |||
parameter_flags_t | flags = PARAMETER_FLAG_DEFAULT | |||
) | [protected] |
See also declareParameter(std::string const &, int *).
..
Definition at line 465 of file Parameter.cpp.
RealParameter * opspace::ParameterReflection::declareParameter | ( | std::string const & | name, | |
double * | real, | |||
parameter_flags_t | flags = PARAMETER_FLAG_DEFAULT | |||
) | [protected] |
See also declareParameter(std::string const &, int *).
..
Definition at line 474 of file Parameter.cpp.
VectorParameter * opspace::ParameterReflection::declareParameter | ( | std::string const & | name, | |
Vector * | vector, | |||
parameter_flags_t | flags = PARAMETER_FLAG_DEFAULT | |||
) | [protected] |
See also declareParameter(std::string const &, int *).
..
Definition at line 483 of file Parameter.cpp.
MatrixParameter * opspace::ParameterReflection::declareParameter | ( | std::string const & | name, | |
Matrix * | matrix, | |||
parameter_flags_t | flags = PARAMETER_FLAG_DEFAULT | |||
) | [protected] |
See also declareParameter(std::string const &, int *).
..
Definition at line 492 of file Parameter.cpp.
std::string const opspace::ParameterReflection::type_name_ [protected] |
std::string const opspace::ParameterReflection::instance_name_ [protected] |
Definition at line 253 of file Parameter.hpp.
Referenced by opspace::OrientationTask::dbg(), opspace::JointLimitTask::dbg(), opspace::TrajectoryTask::dbg(), opspace::DraftPIDTask::dbg(), opspace::Skill::dbg(), opspace::Task::dump(), opspace::Skill::dump(), and getName().