sl@0
|
1 |
// Copyright David Abrahams 2004. Distributed under the Boost
|
sl@0
|
2 |
// Software License, Version 1.0. (See accompanying
|
sl@0
|
3 |
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
sl@0
|
4 |
#ifndef WRAPPER_DWA2004720_HPP
|
sl@0
|
5 |
# define WRAPPER_DWA2004720_HPP
|
sl@0
|
6 |
|
sl@0
|
7 |
# include <boost/python/detail/wrapper_base.hpp>
|
sl@0
|
8 |
# include <boost/python/override.hpp>
|
sl@0
|
9 |
# include <boost/python/converter/registered.hpp>
|
sl@0
|
10 |
# include <boost/python/detail/sfinae.hpp>
|
sl@0
|
11 |
|
sl@0
|
12 |
namespace boost { namespace python {
|
sl@0
|
13 |
|
sl@0
|
14 |
template <class T>
|
sl@0
|
15 |
class wrapper : public detail::wrapper_base
|
sl@0
|
16 |
{
|
sl@0
|
17 |
public:
|
sl@0
|
18 |
// Do not touch this implementation detail!
|
sl@0
|
19 |
typedef T _wrapper_wrapped_type_;
|
sl@0
|
20 |
|
sl@0
|
21 |
protected:
|
sl@0
|
22 |
override get_override(char const* name) const
|
sl@0
|
23 |
{
|
sl@0
|
24 |
typedef detail::wrapper_base base;
|
sl@0
|
25 |
converter::registration const& r
|
sl@0
|
26 |
= converter::registered<T>::converters;
|
sl@0
|
27 |
PyTypeObject* type = r.get_class_object();
|
sl@0
|
28 |
|
sl@0
|
29 |
return this->base::get_override(name, type);
|
sl@0
|
30 |
}
|
sl@0
|
31 |
};
|
sl@0
|
32 |
|
sl@0
|
33 |
}} // namespace boost::python
|
sl@0
|
34 |
|
sl@0
|
35 |
#endif // WRAPPER_DWA2004720_HPP
|