7 #ifndef DYNAMIC_GRAPH_COMMAND_SETTER_T_CPP
8 #define DYNAMIC_GRAPH_COMMAND_SETTER_T_CPP
10 #include "dynamic-graph/command-setter.h"
12 #include <boost/assign/list_of.hpp>
15 #include "dynamic-graph/linear-algebra.h"
41 const std::string &docString)
42 :
Command(entity, boost::assign::list_of(
Value::BOOL), docString),
43 setterMethod_(setterMethod) {}
49 bool value = values[0].value();
50 E &entity =
static_cast<E &
>(
owner());
51 (entity.*setterMethod_)(value);
75 const std::string &docString)
76 :
Command(entity, boost::assign::list_of(
Value::UNSIGNED), docString),
77 setterMethod_(setterMethod) {}
83 unsigned value = values[0].value();
84 E &entity =
static_cast<E &
>(
owner());
85 (entity.*setterMethod_)(value);
109 const std::string &docString)
110 :
Command(entity, boost::assign::list_of(
Value::INT), docString),
111 setterMethod_(setterMethod) {}
117 int value = values[0].value();
118 E &entity =
static_cast<E &
>(
owner());
119 (entity.*setterMethod_)(value);
143 const std::string &docString)
144 :
Command(entity, boost::assign::list_of(
Value::FLOAT), docString),
145 setterMethod_(setterMethod) {}
151 float value = values[0].value();
152 E &entity =
static_cast<E &
>(
owner());
153 (entity.*setterMethod_)(value);
177 const std::string &docString)
178 :
Command(entity, boost::assign::list_of(
Value::DOUBLE), docString),
179 setterMethod_(setterMethod) {}
185 double value = values[0].value();
186 E &entity =
static_cast<E &
>(
owner());
187 (entity.*setterMethod_)(value);
211 const std::string &docString)
212 :
Command(entity, boost::assign::list_of(
Value::STRING), docString),
213 setterMethod_(setterMethod) {}
219 std::string value = values[0].value();
220 E &entity =
static_cast<E &
>(
owner());
221 (entity.*setterMethod_)(value);
245 const std::string &docString)
246 :
Command(entity, boost::assign::list_of(
Value::VECTOR), docString),
247 setterMethod_(setterMethod) {}
253 Vector value = values[0].value();
254 E &entity =
static_cast<E &
>(
owner());
255 (entity.*setterMethod_)(value);
279 const std::string &docString)
280 :
Command(entity, boost::assign::list_of(
Value::MATRIX), docString),
281 setterMethod_(setterMethod) {}
287 Matrix value = values[0].value();
288 E &entity =
static_cast<E &
>(
owner());
289 (entity.*setterMethod_)(value);
296 #endif // DYNAMIC_GRAPH_COMMAND_SETTER_T_CPP