Mercurial > hg > vamp-build-and-test
comparison DEPENDENCIES/generic/include/boost/python/wrapper.hpp @ 16:2665513ce2d3
Add boost headers
author | Chris Cannam |
---|---|
date | Tue, 05 Aug 2014 11:11:38 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
15:663ca0da4350 | 16:2665513ce2d3 |
---|---|
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 | |
12 namespace boost { namespace python { | |
13 | |
14 template <class T> | |
15 class wrapper : public detail::wrapper_base | |
16 { | |
17 public: | |
18 // Do not touch this implementation detail! | |
19 typedef T _wrapper_wrapped_type_; | |
20 | |
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 |