1 #ifndef BOOST_STATECHART_IN_STATE_REACTION_HPP_INCLUDED
2 #define BOOST_STATECHART_IN_STATE_REACTION_HPP_INCLUDED
13 #include <boost/statechart/detail/reaction_dispatcher.hpp>
27 template<
class Event,
28 class ReactionContext = detail::no_context< Event >,
29 void ( ReactionContext::*pAction )(
const Event & ) =
30 &detail::no_context< Event >::no_function >
35 template<
class State >
38 static result react_without_action( State & stt )
40 return stt.discard_event();
43 static result react_with_action( State & stt,
const Event & evt )
45 ( stt.template context< ReactionContext >().*pAction )( evt );
46 return react_without_action( stt );
55 template<
class State,
class EventBase,
class IdType >
57 State & stt,
const EventBase & evt,
const IdType & eventType )
59 typedef detail::reaction_dispatcher<
60 reactions< State >, State, EventBase, Event, ReactionContext, IdType
62 return dispatcher::react( stt, evt, eventType );