File indexing completed on 2025-01-18 09:50:38
0001
0002
0003
0004
0005 #ifndef BOOST_PYTHON_OBJECT_PYTHON_TYPE_H
0006 #define BOOST_PYTHON_OBJECT_PYTHON_TYPE_H
0007
0008 #include <boost/python/converter/registered.hpp>
0009
0010 namespace boost {namespace python {namespace detail{
0011
0012
0013 template <class T> struct python_class : PyObject
0014 {
0015 typedef python_class<T> this_type;
0016
0017 typedef T type;
0018
0019 static void *converter (PyObject *p){
0020 return p;
0021 }
0022
0023 static void register_()
0024 {
0025 static bool first_time = true;
0026
0027 if ( !first_time ) return;
0028
0029 first_time = false;
0030 converter::registry::insert(&converter, boost::python::type_id<this_type>(), &converter::registered_pytype_direct<T>::get_pytype);
0031 }
0032 };
0033
0034
0035 }}}
0036
0037 #endif