Command that calls a parameter getter function. More...
#include <dynamic-graph/command-getter.h>
Public Types | |
| typedef T(E::* | GetterMethod) () const |
| Pointer to method that sets parameter of type T. More... | |
Public Member Functions | |
| Getter (E &entity, GetterMethod getterMethod, const std::string &docString) | |
| Constructor. More... | |
Public Member Functions inherited from dynamicgraph::command::Command | |
| virtual | ~Command () |
| Command (Entity &entity, const std::vector< Value::Type > &valueTypes, const std::string &docstring) | |
| Store the owner entity and a vector of value types. More... | |
| const std::vector< Value::Type > & | valueTypes () const |
| Return the value type of all parameters. More... | |
| void | setParameterValues (const std::vector< Value > &values) |
| Set parameter values. More... | |
| const std::vector< Value > & | getParameterValues () const |
| Get parameter values. More... | |
| Value | execute () |
| Execute the command after checking parameters. More... | |
| Entity & | owner () |
| Get a reference to the Entity owning this command. More... | |
| std::string | getDocstring () const |
| Get documentation string. More... | |
Protected Member Functions | |
| virtual Value | doExecute () |
| Specific action performed by the command. More... | |
Additional Inherited Members | |
Static Public Attributes inherited from dynamicgraph::command::Command | |
| static const std::vector< Value::Type > | EMPTY_ARG |
Command that calls a parameter getter function.
This class is templated by a type E deriving from entity and a type T of data.
Let us assume that class E has a private member of type T and a public getter function for this member:
Then the command defined by:
returns the value of entity.parameter_ upon invocation.
| typedef T(E::* dynamicgraph::command::Getter< E, T >::GetterMethod) () const |
Pointer to method that sets parameter of type T.
| dynamicgraph::command::Getter< E, T >::Getter | ( | E & | entity, |
| GetterMethod | getterMethod, | ||
| const std::string & | docString | ||
| ) |
Constructor.
|
protectedvirtual |
Specific action performed by the command.
Implements dynamicgraph::command::Command.
References dynamicgraph::command::Command::owner().