dynamic-graph  4.2.2
Dynamic graph library
command-getter.h
1 //
2 // Copyright 2010 CNRS
3 //
4 // Author: Florent Lamiraux
5 //
6 
7 #ifndef DYNAMIC_GRAPH_COMMAND_GETTER_H
8 #define DYNAMIC_GRAPH_COMMAND_GETTER_H
9 
10 #include "dynamic-graph/command.h"
11 
12 namespace dynamicgraph {
13 namespace command {
14 
44 template <class E, typename T> class Getter : public Command {
45 public:
47  typedef T (E::*GetterMethod)() const;
49  Getter(E &entity, GetterMethod getterMethod, const std::string &docString);
50 
51 protected:
52  virtual Value doExecute();
53 
54 private:
55  GetterMethod getterMethod_;
56 };
57 } // namespace command
58 } // namespace dynamicgraph
59 
60 #include "dynamic-graph/command-getter.t.cpp"
61 #endif // DYNAMIC_GRAPH_COMMAND_GETTER_H
dynamicgraph::command::Getter::GetterMethod
T(E::* GetterMethod)() const
Pointer to method that sets parameter of type T.
Definition: command-getter.h:47
dynamicgraph
Definition: command-bind.h:29
dynamicgraph::command::Getter::doExecute
virtual Value doExecute()
Specific action performed by the command.
Definition: command-getter.t.cpp:23
dynamicgraph::command::Command
Definition: command.h:34
dynamicgraph::command::Getter::Getter
Getter(E &entity, GetterMethod getterMethod, const std::string &docString)
Constructor.
Definition: command-getter.t.cpp:18
dynamicgraph::command::Getter
Definition: command-getter.h:44
dynamicgraph::command::Value
This class implements a variant design pattern to handle basic types in Command.
Definition: value.h:46