Mercurial > hg > vamp-build-and-test
annotate DEPENDENCIES/generic/include/boost/python/wrapper.hpp @ 133:4acb5d8d80b6 tip
Don't fail environmental check if README.md exists (but .txt and no-suffix don't)
author | Chris Cannam |
---|---|
date | Tue, 30 Jul 2019 12:25:44 +0100 |
parents | 2665513ce2d3 |
children |
rev | line source |
---|---|
Chris@16 | 1 // Copyright David Abrahams 2004. Distributed under the Boost |
Chris@16 | 2 // Software License, Version 1.0. (See accompanying |
Chris@16 | 3 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) |
Chris@16 | 4 #ifndef WRAPPER_DWA2004720_HPP |
Chris@16 | 5 # define WRAPPER_DWA2004720_HPP |
Chris@16 | 6 |
Chris@16 | 7 # include <boost/python/detail/wrapper_base.hpp> |
Chris@16 | 8 # include <boost/python/override.hpp> |
Chris@16 | 9 # include <boost/python/converter/registered.hpp> |
Chris@16 | 10 # include <boost/python/detail/sfinae.hpp> |
Chris@16 | 11 |
Chris@16 | 12 namespace boost { namespace python { |
Chris@16 | 13 |
Chris@16 | 14 template <class T> |
Chris@16 | 15 class wrapper : public detail::wrapper_base |
Chris@16 | 16 { |
Chris@16 | 17 public: |
Chris@16 | 18 // Do not touch this implementation detail! |
Chris@16 | 19 typedef T _wrapper_wrapped_type_; |
Chris@16 | 20 |
Chris@16 | 21 protected: |
Chris@16 | 22 override get_override(char const* name) const |
Chris@16 | 23 { |
Chris@16 | 24 typedef detail::wrapper_base base; |
Chris@16 | 25 converter::registration const& r |
Chris@16 | 26 = converter::registered<T>::converters; |
Chris@16 | 27 PyTypeObject* type = r.get_class_object(); |
Chris@16 | 28 |
Chris@16 | 29 return this->base::get_override(name, type); |
Chris@16 | 30 } |
Chris@16 | 31 }; |
Chris@16 | 32 |
Chris@16 | 33 }} // namespace boost::python |
Chris@16 | 34 |
Chris@16 | 35 #endif // WRAPPER_DWA2004720_HPP |