GCC Code Coverage Report
Directory: ./ Exec Total Coverage
File: src/dynamic-python-module-py.cc Lines: 12 14 85.7 %
Date: 2023-01-28 11:04:48 Branches: 13 26 50.0 %

Line Branch Exec Source
1
#include <sot/dynamic-pinocchio/dynamic-pinocchio.h>
2
3
#include <dynamic-graph/python/module.hh>
4
5
namespace dg = dynamicgraph;
6
namespace dgs = dynamicgraph::sot;
7
8
typedef bp::return_value_policy<bp::reference_existing_object>
9
    reference_existing_object;
10
11

4
BOOST_PYTHON_MODULE(wrap) {
12
2
  bp::import("dynamic_graph");
13
2
  bp::import("pinocchio");
14
15
  dg::python::exposeEntity<dgs::DynamicPinocchio, bp::bases<dg::Entity>,
16
2
                           dg::python::AddCommands>()
17
      .add_property("model",
18
2
                    bp::make_function(&dgs::DynamicPinocchio::getModel,
19
                                      reference_existing_object()),
20

6
                    bp::make_function(&dgs::DynamicPinocchio::setModel))
21
      .add_property("data",
22
4
                    bp::make_function(&dgs::DynamicPinocchio::getData,
23
                                      reference_existing_object()),
24

6
                    bp::make_function(&dgs::DynamicPinocchio::setData))
25
2
      .def("setModel", &dgs::DynamicPinocchio::setModel)
26
2
      .def("createData", &dgs::DynamicPinocchio::createData)
27
2
      .def("setData", &dgs::DynamicPinocchio::setData);
28
2
}