command.h
Go to the documentation of this file.
1 //
2 // Copyright 2010 CNRS
3 //
4 // Author: Florent Lamiraux
5 //
6 
7 #ifndef DYNAMIC_GRAPH_COMMAND_H
8 #define DYNAMIC_GRAPH_COMMAND_H
9 
10 #include <vector>
11 
13 #include "dynamic-graph/value.h"
14 
15 namespace dynamicgraph {
16 class Entity;
17 namespace command {
35 class DYNAMIC_GRAPH_DLLAPI Command {
36  public:
37  virtual ~Command();
42  Command(Entity &entity, const std::vector<Value::Type> &valueTypes,
43  const std::string &docstring);
45  const std::vector<Value::Type> &valueTypes() const;
47  void setParameterValues(const std::vector<Value> &values);
49  const std::vector<Value> &getParameterValues() const;
51  Value execute();
53  Entity &owner();
55  std::string getDocstring() const;
56 
57  protected:
59  virtual Value doExecute() = 0;
60 
61  private:
63  std::vector<Value::Type> valueTypeVector_;
64  std::vector<Value> valueVector_;
65  std::string docstring_;
66 
67  public:
68  static const std::vector<Value::Type> EMPTY_ARG;
69 };
70 } // namespace command
71 } // namespace dynamicgraph
72 
73 #endif // DYNAMIC_GRAPH_COMMAND_H
dynamic-graph-api.h
dynamicgraph
dynamicgraph::Entity
This class represents an entity, i.e. a generic computational unit that provides input and output sig...
Definition: include/dynamic-graph/entity.h:52
dynamicgraph::command::Command::EMPTY_ARG
static const std::vector< Value::Type > EMPTY_ARG
Definition: command.h:68
dynamicgraph::command::Command::valueTypeVector_
std::vector< Value::Type > valueTypeVector_
Definition: command.h:63
dynamicgraph::command::Command::docstring_
std::string docstring_
Definition: command.h:65
dynamicgraph::command::Command::valueVector_
std::vector< Value > valueVector_
Definition: command.h:64
dynamicgraph::command::Command
Definition: command.h:35
dynamicgraph::command::Command::owner_
Entity & owner_
Definition: command.h:62
dynamicgraph::command::Value
This class implements a variant design pattern to handle basic types in Command.
Definition: value.h:51
value.h


dynamic-graph
Author(s): Nicolas Mansard, Olivier Stasse
autogenerated on Sun Oct 22 2023 02:27:08