2 #ifndef BOOST_FSM_TRANSITION_INCLUDED
3 #define BOOST_FSM_TRANSITION_INCLUDED
5 // Copyright Aleksey Gurtovoy 2002-2004
7 // Distributed under the Boost Software License, Version 1.0.
8 // (See accompanying file LICENSE_1_0.txt or copy at
9 // http://www.boost.org/LICENSE_1_0.txt)
11 // See http://www.boost.org/libs/mpl for documentation.
19 namespace fsm { namespace aux {
21 // represent a signle transition between states |From| and |To|
28 , bool (T::* transition_func)(Event const&)
33 typedef From from_state_t;
34 typedef Event event_t;
35 typedef To to_state_t;
37 typedef typename Event::base_t base_event_t;
38 static bool do_transition(T& x, base_event_t const& e)
40 assert(dynamic_cast<event_t const*>(&e) == &e);
41 return (x.*transition_func)(static_cast<event_t const &>(e));
47 #endif // BOOST_FSM_TRANSITION_INCLUDED