123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- #ifndef INSTANCE_HOLDER_DWA2002517_HPP
- # define INSTANCE_HOLDER_DWA2002517_HPP
- # include <boost/python/detail/prefix.hpp>
- # include <boost/noncopyable.hpp>
- # include <boost/python/type_id.hpp>
- # include <cstddef>
- namespace boost { namespace python {
- struct BOOST_PYTHON_DECL instance_holder : private noncopyable
- {
- public:
- instance_holder();
- virtual ~instance_holder();
-
-
- instance_holder* next() const;
-
-
-
-
-
-
- virtual void* holds(type_info, bool null_ptr_only) = 0;
- void install(PyObject* inst) throw();
-
-
-
-
-
- static void* allocate(PyObject*, std::size_t offset, std::size_t size, std::size_t alignment = 1);
-
-
- static void deallocate(PyObject*, void* storage) throw();
- private:
- instance_holder* m_next;
- };
- # define BOOST_PYTHON_UNFORWARD(N,ignored) (typename unforward<A##N>::type)(a##N)
- inline instance_holder* instance_holder::next() const
- {
- return m_next;
- }
- }}
- #endif
|