File indexing completed on 2025-12-15 10:07:13
0001
0002
0003
0004
0005 #ifndef REGISTER_PTR_TO_PYTHON_HPP
0006 #define REGISTER_PTR_TO_PYTHON_HPP
0007
0008 #include <boost/python/pointee.hpp>
0009 #include <boost/python/object.hpp>
0010 #include <boost/python/object/class_wrapper.hpp>
0011
0012 namespace boost { namespace python {
0013
0014 template <class P>
0015 void register_ptr_to_python()
0016 {
0017 typedef typename boost::python::pointee<P>::type X;
0018 objects::class_value_wrapper<
0019 P
0020 , objects::make_ptr_instance<
0021 X
0022 , objects::pointer_holder<P,X>
0023 >
0024 >();
0025 }
0026
0027 }}
0028
0029 #endif
0030
0031