task-command.h
Go to the documentation of this file.
1 /*
2  * Copyright 2010,
3  * Florent Lamiraux
4  *
5  * CNRS
6  *
7  */
8 
9 #ifndef TASK_COMMAND_H
10 #define TASK_COMMAND_H
11 
14 #include <dynamic-graph/command.h>
15 
16 #include <boost/assign/list_of.hpp>
17 
18 namespace dynamicgraph {
19 namespace sot {
20 namespace command {
21 namespace task {
22 using ::dynamicgraph::command::Command;
23 using ::dynamicgraph::command::Value;
24 
25 // Command ListFeatures
26 class ListFeatures : public Command {
27  public:
28  virtual ~ListFeatures() {}
32  ListFeatures(Task &entity, const std::string &docstring)
33  : Command(entity, std::vector<Value::Type>(), docstring) {}
34  virtual Value doExecute() {
35  typedef Task::FeatureList_t FeatureList_t;
36  Task &task = static_cast<Task &>(owner());
37  const FeatureList_t &fl = task.getFeatureList();
38  std::string result("[");
39  for (FeatureList_t::const_iterator it = fl.begin(); it != fl.end(); it++) {
40  result += "'" + (*it)->getName() + "',";
41  }
42  result += "]";
43  return Value(result);
44  }
45 }; // class ListFeatures
46 } // namespace task
47 } // namespace command
48 } /* namespace sot */
49 } /* namespace dynamicgraph */
50 
51 #endif // TASK_COMMAND_H
Eigen::Block< Mat > Type
Class that defines the basic elements of a task.
Definition: task.hh:72
std::list< FeatureAbstract * > FeatureList_t
Definition: task.hh:74
FeatureList_t & getFeatureList(void)
Definition: task.hh:89
ListFeatures(Task &entity, const std::string &docstring)
Definition: task-command.h:32


sot-core
Author(s): Olivier Stasse, ostasse@laas.fr
autogenerated on Wed Jun 21 2023 02:51:26