7 #ifndef __dg_command_direct_setter_h__
8 #define __dg_command_direct_setter_h__
18 #include <boost/assign/list_of.hpp>
20 #include "dynamic-graph/command.h"
26 template <
class E,
typename T>
29 DirectSetter(E &entity, T *ptr,
const std::string &docString)
37 T val = values[0].value();
46 template <
class E,
typename T>
47 DirectSetter<E, T> *makeDirectSetter(E &entity, T *ptr,
48 const std::string &docString) {
49 return new DirectSetter<E, T>(entity, ptr, docString);
52 inline std::string docDirectSetter(
const std::string &name,
53 const std::string &type) {
54 return std::string(
"\nSet the ") + name +
".\n\nInput:\n - a " + type +
55 ".\nVoid return.\n\n";
const std::vector< Value > & getParameterValues() const
Get parameter values.
Command(Entity &entity, const std::vector< Value::Type > &valueTypes, const std::string &docstring)
virtual Value doExecute()
Specific action performed by the command.
This class implements a variant design pattern to handle basic types in Command.