Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/boost/python/exception_translator.hpp was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 // Copyright David Abrahams 2002.
0002 // Distributed under the Boost Software License, Version 1.0. (See
0003 // accompanying file LICENSE_1_0.txt or copy at
0004 // http://www.boost.org/LICENSE_1_0.txt)
0005 #ifndef EXCEPTION_TRANSLATOR_DWA2002810_HPP
0006 # define EXCEPTION_TRANSLATOR_DWA2002810_HPP
0007 
0008 # include <boost/python/detail/prefix.hpp>
0009 
0010 # include <boost/bind/bind.hpp>
0011 # include <boost/bind/placeholders.hpp>
0012 # include <boost/type.hpp>
0013 # include <boost/python/detail/translate_exception.hpp>
0014 # include <boost/python/detail/exception_handler.hpp>
0015 
0016 namespace boost { namespace python { 
0017 
0018 template <class ExceptionType, class Translate>
0019 void register_exception_translator(Translate translate, boost::type<ExceptionType>* = 0)
0020 {
0021     using namespace boost::placeholders;
0022     detail::register_exception_handler(
0023         boost::bind<bool>(detail::translate_exception<ExceptionType,Translate>(), _1, _2, translate)
0024         );
0025 }
0026 
0027 }} // namespace boost::python
0028 
0029 #endif // EXCEPTION_TRANSLATOR_DWA2002810_HPP