Commit fb705aa1 authored by Guilhem Saurel's avatar Guilhem Saurel
Browse files

format

parent b67b31b9
...@@ -19,15 +19,11 @@ auto exposeSignal(const std::string& name) { ...@@ -19,15 +19,11 @@ auto exposeSignal(const std::string& name) {
namespace bp = boost::python; namespace bp = boost::python;
typedef Signal<T, Time> S_t; typedef Signal<T, Time> S_t;
bp::class_<S_t, bp::bases<SignalBase<Time> >, boost::noncopyable> obj( bp::class_<S_t, bp::bases<SignalBase<Time> >, boost::noncopyable> obj(name.c_str(), bp::init<std::string>());
name.c_str(), bp::init<std::string>()); obj.add_property("value", bp::make_function(&S_t::accessCopy, bp::return_value_policy<bp::copy_const_reference>()),
obj.add_property( &S_t::setConstant, // TODO check the setter
"value", "the signal value.\n"
bp::make_function(&S_t::accessCopy, "warning: for Eigen objects, sig.value[0] = 1. may not work).");
bp::return_value_policy<bp::copy_const_reference>()),
&S_t::setConstant, // TODO check the setter
"the signal value.\n"
"warning: for Eigen objects, sig.value[0] = 1. may not work).");
return obj; return obj;
} }
...@@ -36,8 +32,7 @@ auto exposeSignalWrapper(const std::string& name) { ...@@ -36,8 +32,7 @@ auto exposeSignalWrapper(const std::string& name) {
namespace bp = boost::python; namespace bp = boost::python;
typedef SignalWrapper<T, Time> S_t; typedef SignalWrapper<T, Time> S_t;
bp::class_<S_t, bp::bases<Signal<T, Time> >, boost::noncopyable> obj( bp::class_<S_t, bp::bases<Signal<T, Time> >, boost::noncopyable> obj(name.c_str(), bp::no_init);
name.c_str(), bp::no_init);
return obj; return obj;
} }
...@@ -46,8 +41,7 @@ auto exposeSignalPtr(const std::string& name) { ...@@ -46,8 +41,7 @@ auto exposeSignalPtr(const std::string& name) {
namespace bp = boost::python; namespace bp = boost::python;
typedef SignalPtr<T, Time> S_t; typedef SignalPtr<T, Time> S_t;
bp::class_<S_t, bp::bases<Signal<T, Time> >, boost::noncopyable> obj( bp::class_<S_t, bp::bases<Signal<T, Time> >, boost::noncopyable> obj(name.c_str(), bp::no_init);
name.c_str(), bp::no_init);
return obj; return obj;
} }
...@@ -56,8 +50,7 @@ auto exposeSignalTimeDependent(const std::string& name) { ...@@ -56,8 +50,7 @@ auto exposeSignalTimeDependent(const std::string& name) {
namespace bp = boost::python; namespace bp = boost::python;
typedef SignalTimeDependent<T, Time> S_t; typedef SignalTimeDependent<T, Time> S_t;
bp::class_<S_t, bp::bases<Signal<T, Time> >, boost::noncopyable> obj( bp::class_<S_t, bp::bases<Signal<T, Time> >, boost::noncopyable> obj(name.c_str(), bp::no_init);
name.c_str(), bp::no_init);
return obj; return obj;
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment