vector-constant-command.h
Go to the documentation of this file.
1 /*
2  * Copyright 2010,
3  * Florent Lamiraux
4  *
5  * CNRS/AIST
6  *
7  */
8 
9 #ifndef VECTOR_CONSTANT_COMMAND_H
10 #define VECTOR_CONSTANT_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 vectorConstant {
22 using ::dynamicgraph::command::Command;
23 using ::dynamicgraph::command::Value;
24 
25 // Command Resize
26 class Resize : public Command {
27  public:
28  virtual ~Resize() {}
32  Resize(VectorConstant &entity, const std::string &docstring)
33  : Command(entity, boost::assign::list_of(Value::LONGINT), docstring) {}
34  virtual Value doExecute() {
35  VectorConstant &vc = static_cast<VectorConstant &>(owner());
36  std::vector<Value> values = getParameterValues();
37  size_type size = values[0].value();
38  Vector m(Vector::Zero(size));
39  vc.SOUT.setConstant(m);
40 
41  // return void
42  return Value();
43  }
44 }; // class Resize
45 } // namespace vectorConstant
46 } // namespace command
47 } /* namespace sot */
48 } /* namespace dynamicgraph */
49 
50 #endif // VECTOR_CONSTANT_COMMAND_H
m
float m
dynamicgraph::sot::command::vectorConstant::Resize::doExecute
virtual Value doExecute()
Definition: vector-constant-command.h:34
dynamicgraph::sot::command::vectorConstant::Resize
Definition: vector-constant-command.h:26
dynamicgraph
command-getter.h
dynamicgraph::sot::VectorConstant
Definition: vector-constant.hh:31
boost
dynamicgraph::command::Command::getParameterValues
const std::vector< Value > & getParameterValues() const
command-setter.h
size
FCL_REAL size() const
dynamicgraph::command::Command
dynamicgraph::size_type
Matrix::Index size_type
dynamicgraph::Vector
Eigen::VectorXd Vector
dynamicgraph::sot::VectorConstant::SOUT
SignalTimeDependent< dynamicgraph::Vector, sigtime_t > SOUT
Definition: vector-constant.hh:43
values
list values
command.h
dynamicgraph::command::Value
dynamicgraph::sot::command::vectorConstant::Resize::Resize
Resize(VectorConstant &entity, const std::string &docstring)
Definition: vector-constant-command.h:32
dynamicgraph::sot::command::vectorConstant::Resize::~Resize
virtual ~Resize()
Definition: vector-constant-command.h:28
dynamicgraph::command::Command::owner
Entity & owner()


sot-core
Author(s): Olivier Stasse, ostasse@laas.fr
autogenerated on Tue Oct 24 2023 02:26:32