Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-12-15 10:07:13

0001 // Copyright David Abrahams 2002.
0002 // Distributed under the Boost Software License, Version 1.0. (See
0003 // accompanying file LICENSE_1_0.txt or copy at
0004 // http://www.boost.org/LICENSE_1_0.txt)
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 }} // namespace boost::python
0028 
0029 #endif // REGISTER_PTR_TO_PYTHON_HPP
0030 
0031