pinocchio 4.1.0
A fast and flexible implementation of Rigid Body Dynamics algorithms and their analytical derivatives
Loading...
Searching...
No Matches
printable.hpp
1//
2// Copyright (c) 2016 CNRS
3//
4
5#pragma once
6
7#include <boost/python.hpp>
8
9namespace pinocchio
10{
11 namespace python
12 {
13
14 namespace bp = boost::python;
15
19 template<class C>
20 struct PrintableVisitor : public bp::def_visitor<PrintableVisitor<C>>
21 {
22 template<class PyClass>
23 void visit(PyClass & cl) const
24 {
25 cl.def(bp::self_ns::str(bp::self_ns::self)).def(bp::self_ns::repr(bp::self_ns::self));
26 }
27 };
28 } // namespace python
29} // namespace pinocchio
Main pinocchio namespace.
Definition treeview.dox:11
Set the Python method str and repr to use the overloading operator<<.
Definition printable.hpp:21