Mercurial > hg > vamp-build-and-test
annotate DEPENDENCIES/generic/include/boost/python/exception_translator.hpp @ 125:34e428693f5d vext
Vext -> Repoint
author | Chris Cannam |
---|---|
date | Thu, 14 Jun 2018 11:15:39 +0100 |
parents | c530137014c0 |
children |
rev | line source |
---|---|
Chris@16 | 1 // Copyright David Abrahams 2002. |
Chris@16 | 2 // Distributed under the Boost Software License, Version 1.0. (See |
Chris@16 | 3 // accompanying file LICENSE_1_0.txt or copy at |
Chris@16 | 4 // http://www.boost.org/LICENSE_1_0.txt) |
Chris@16 | 5 #ifndef EXCEPTION_TRANSLATOR_DWA2002810_HPP |
Chris@16 | 6 # define EXCEPTION_TRANSLATOR_DWA2002810_HPP |
Chris@16 | 7 |
Chris@16 | 8 # include <boost/python/detail/prefix.hpp> |
Chris@16 | 9 |
Chris@16 | 10 # include <boost/bind.hpp> |
Chris@101 | 11 # include <boost/bind/placeholders.hpp> |
Chris@16 | 12 # include <boost/type.hpp> |
Chris@16 | 13 # include <boost/python/detail/translate_exception.hpp> |
Chris@16 | 14 # include <boost/python/detail/exception_handler.hpp> |
Chris@16 | 15 |
Chris@16 | 16 namespace boost { namespace python { |
Chris@16 | 17 |
Chris@16 | 18 template <class ExceptionType, class Translate> |
Chris@16 | 19 void register_exception_translator(Translate translate, boost::type<ExceptionType>* = 0) |
Chris@16 | 20 { |
Chris@16 | 21 detail::register_exception_handler( |
Chris@16 | 22 boost::bind<bool>(detail::translate_exception<ExceptionType,Translate>(), _1, _2, translate) |
Chris@16 | 23 ); |
Chris@16 | 24 } |
Chris@16 | 25 |
Chris@16 | 26 }} // namespace boost::python |
Chris@16 | 27 |
Chris@16 | 28 #endif // EXCEPTION_TRANSLATOR_DWA2002810_HPP |