1 // Copyright Nikolay Mladenov 2007.
2 // Distributed under the Boost Software License, Version 1.0. (See
3 // accompanying file LICENSE_1_0.txt or copy at
4 // http://www.boost.org/LICENSE_1_0.txt)
5 #ifndef BOOST_PYTHON_OBJECT_PYTHON_TYPE_H
6 #define BOOST_PYTHON_OBJECT_PYTHON_TYPE_H
8 #include <boost/python/converter/registered.hpp>
10 namespace boost {namespace python {namespace detail{
13 template <class T> struct python_class : PyObject
15 typedef python_class<T> this_type;
19 static void *converter (PyObject *p){
23 static void register_()
25 static bool first_time = true;
27 if ( !first_time ) return;
30 converter::registry::insert(&converter, boost::python::type_id<this_type>(), &converter::registered_pytype_direct<T>::get_pytype);
35 }}} //namespace boost :: python :: detail
37 #endif //BOOST_PYTHON_OBJECT_PYTHON_TYPE_H