5 #ifndef __pinocchio_python_utils_copyable_hpp__ 6 #define __pinocchio_python_utils_copyable_hpp__ 8 #include <boost/python.hpp> 22 :
public bp::def_visitor< CopyableVisitor<C> >
24 template<
class PyClass>
26 { cl.def(
"copy",&
copy,bp::arg(
"self"),
"Returns a copy of *this."); }
29 static C copy(
const C &
self) {
return C(
self); }
34 #endif // ifndef __pinocchio_python_utils_copyable_hpp__ static C copy(const C &self)
void visit(PyClass &cl) const
Add the Python method copy to allow a copy of this by calling the copy constructor.
Main pinocchio namespace.