1 #ifndef BOOST_STATECHART_EXCEPTION_TRANSLATOR_HPP_INCLUDED
2 #define BOOST_STATECHART_EXCEPTION_TRANSLATOR_HPP_INCLUDED
3 //////////////////////////////////////////////////////////////////////////////
4 // Copyright 2002-2006 Andreas Huber Doenni
5 // Distributed under the Boost Software License, Version 1.0. (See accompany-
6 // ing file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
7 //////////////////////////////////////////////////////////////////////////////
11 #include <boost/statechart/event.hpp>
12 #include <boost/statechart/result.hpp>
23 //////////////////////////////////////////////////////////////////////////////
24 class exception_thrown
: public event
< exception_thrown
> {};
28 //////////////////////////////////////////////////////////////////////////////
29 template< class ExceptionEvent
= exception_thrown
>
30 class exception_translator
33 //////////////////////////////////////////////////////////////////////////
34 // The following declarations should be private.
35 // They are only public because many compilers lack template friends.
36 //////////////////////////////////////////////////////////////////////////
37 template< class Action
, class ExceptionEventHandler
>
38 result
operator()( Action action
, ExceptionEventHandler eventHandler
)
46 return eventHandler( ExceptionEvent() );
53 } // namespace statechart