registration.hpp
Go to the documentation of this file.
1 //
2 // Copyright (c) 2019 INRIA
3 //
4 
5 #ifndef __pinocchio_python_utils_registration_hpp__
6 #define __pinocchio_python_utils_registration_hpp__
7 
8 #include <boost/python.hpp>
9 #include <boost/python/scope.hpp>
10 
11 #include <eigenpy/registration.hpp>
12 
13 namespace pinocchio
14 {
15  namespace python
16  {
17 
18  template<typename T>
20  {
21  namespace bp = boost::python;
22  if(eigenpy::check_registration<T>())
23  {
24  const bp::type_info info = bp::type_id<T>();
25  const bp::converter::registration* reg = bp::converter::registry::query(info);
26  bp::handle<> class_obj(reg->get_class_object());
27  bp::scope().attr(reg->get_class_object()->tp_name) = bp::object(class_obj);
28  return true;
29  }
30 
31  return false;
32  }
33 
34  } // namespace python
35 } // namespace pinocchio
36 
37 #endif // ifndef __pinocchio_python_utils_registration_hpp__
38 
bool register_symbolic_link_to_registered_type()
Main pinocchio namespace.
Definition: timings.cpp:28
info
Definition: ocp.py:61


pinocchio
Author(s):
autogenerated on Fri Jun 23 2023 02:38:32