4 #include <dynamic-graph/entity.h>
5 #include <dynamic-graph/factory.h>
7 #include <dynamic-graph/pool.h>
17 #if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 2))
18 #pragma GCC diagnostic ignored "-Wstrict-aliasing"
33 using namespace convert;
39 Entity& entity = bp::extract<Entity&>(obj);
41 obj.attr(el.first.c_str()) = bp::object(bp::ptr(el.second));
46 Entity& entity = bp::extract<Entity&>(obj);
51 obj.attr(el.first.c_str()) = bp::object(bp::ptr(el.second));
63 throw std::invalid_argument(
"Found an object named " +
64 std::string(instanceName) +
66 "but this object is of type " +
68 " and not " + std::string(className));
73 std::string(className), std::string(instanceName));
80 Command& command = bp::template extract<Command&>(args[0]);
81 if (bp::len(args) !=
int(command.
valueTypes().size() + 1))
83 throw std::out_of_range(
"Wrong number of arguments");
84 std::vector<Value> values;
86 for (bp::ssize_t i = 1; i < bp::len(args); ++i)
90 .
valueTypes()[
static_cast<std::vector<Value>::size_type
>(i - 1)]));