switch-python-module-py.cc
Go to the documentation of this file.
1 #include <sot/core/switch.hh>
2 
4 
5 namespace dg = dynamicgraph;
6 typedef bp::return_value_policy<bp::reference_existing_object>
8 
9 template <typename T, typename Time>
10 void exposeSwitch() {
11  typedef dg::sot::Switch<T, Time> E_t;
12  typedef typename E_t::Base B_t;
13  dg::python::exposeEntity<E_t, bp::bases<dg::Entity>,
14  dg::python::AddCommands>()
15  .def_readonly("sout", &E_t::SOUT)
16  .def("sin", &B_t::getSignalIn, reference_existing_object())
17  .add_property("n_sin", &B_t::getSignalNumber, &B_t::setSignalNumber,
18  "the number of input signal.")
19  .def_readonly("selection", &E_t::selectionSIN)
20  .def_readonly("boolSelection", &E_t::boolSelectionSIN)
21 
22  .def("setSignalNumber", &B_t::setSignalNumber,
23  "set the number of input signal.", bp::arg("size"))
24  .def("getSignalNumber", &B_t::getSignalNumber,
25  "get the number of input signal.", bp::arg("size"));
26 }
27 
29  exposeSwitch<bool, int>();
30  exposeSwitch<dg::Vector, int>();
31  exposeSwitch<dg::sot::MatrixHomogeneous, int>();
32 }
BVNodeBase Base
BOOST_PYTHON_MODULE(wrap)
bp::return_value_policy< bp::reference_existing_object > reference_existing_object
void exposeSwitch()


sot-core
Author(s): Olivier Stasse, ostasse@laas.fr
autogenerated on Wed Jun 21 2023 02:51:26