source: NonGTP/Boost/boost/python/wrapper.hpp @ 857

Revision 857, 1.0 KB checked in by igarcia, 19 years ago (diff)
Line 
1// Copyright David Abrahams 2004. Distributed under the Boost
2// Software License, Version 1.0. (See accompanying
3// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
4#ifndef WRAPPER_DWA2004720_HPP
5# define WRAPPER_DWA2004720_HPP
6
7# include <boost/python/detail/wrapper_base.hpp>
8# include <boost/python/override.hpp>
9# include <boost/python/converter/registered.hpp>
10# include <boost/python/detail/sfinae.hpp>
11
12namespace boost { namespace python {
13
14template <class T>
15class wrapper : public detail::wrapper_base
16{
17#   if defined(BOOST_PYTHON_NO_SFINAE)
18 public:
19    typedef T _wrapper_wrapped_type_;
20#   endif
21 protected:
22    override get_override(char const* name) const
23    {
24        typedef detail::wrapper_base base;
25        converter::registration const& r
26            = converter::registered<T>::converters;
27        PyTypeObject* type = r.get_class_object();
28       
29        return this->base::get_override(name, type);
30    }
31};
32
33}} // namespace boost::python
34
35#endif // WRAPPER_DWA2004720_HPP
Note: See TracBrowser for help on using the repository browser.