123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899 |
- #ifndef REGISTRATIONS_DWA2002223_HPP
- # define REGISTRATIONS_DWA2002223_HPP
- # include <boost/python/detail/prefix.hpp>
- # include <boost/python/type_id.hpp>
- # include <boost/python/converter/convertible_function.hpp>
- # include <boost/python/converter/constructor_function.hpp>
- # include <boost/python/converter/to_python_function_type.hpp>
- # include <boost/detail/workaround.hpp>
- namespace boost { namespace python { namespace converter {
- struct lvalue_from_python_chain
- {
- convertible_function convert;
- lvalue_from_python_chain* next;
- };
- struct rvalue_from_python_chain
- {
- convertible_function convertible;
- constructor_function construct;
- PyTypeObject const* (*expected_pytype)();
- rvalue_from_python_chain* next;
- };
- struct BOOST_PYTHON_DECL registration
- {
- public:
- explicit registration(type_info target, bool is_shared_ptr = false);
- ~registration();
-
-
- PyObject* to_python(void const volatile*) const;
-
-
- PyTypeObject* get_class_object() const;
-
-
- PyTypeObject const* expected_from_python_type() const;
- PyTypeObject const* to_python_target_type() const;
- public:
- const python::type_info target_type;
-
- lvalue_from_python_chain* lvalue_chain;
-
- rvalue_from_python_chain* rvalue_chain;
-
-
- PyTypeObject* m_class_object;
-
- to_python_function_t m_to_python;
- PyTypeObject const* (*m_to_python_target_type)();
-
-
- const bool is_shared_ptr;
- # if BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3003))
- private:
- void operator=(registration);
- # endif
- };
- inline registration::registration(type_info target_type, bool is_shared_ptr)
- : target_type(target_type)
- , lvalue_chain(0)
- , rvalue_chain(0)
- , m_class_object(0)
- , m_to_python(0)
- , m_to_python_target_type(0)
- , is_shared_ptr(is_shared_ptr)
- {}
- inline bool operator<(registration const& lhs, registration const& rhs)
- {
- return lhs.target_type < rhs.target_type;
- }
- }}}
- #endif
|