File indexing completed on 2025-01-30 09:48:14
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011 #ifndef BOOST_MSM_INTERNAL_ROW_HPP
0012 #define BOOST_MSM_INTERNAL_ROW_HPP
0013
0014 #include <boost/type_traits/is_base_of.hpp>
0015 #include <boost/mpl/bool.hpp>
0016 #include <boost/fusion/include/at_key.hpp>
0017 #include <boost/msm/back/common_types.hpp>
0018 #include <boost/msm/row_tags.hpp>
0019 #include <boost/msm/front/detail/row2_helper.hpp>
0020
0021 namespace boost { namespace msm { namespace front
0022 {
0023 template<
0024 class Event
0025 , typename CalledForAction
0026 , void (CalledForAction::*action)(Event const&)
0027 >
0028 struct a_internal
0029 {
0030 typedef sm_a_i_row_tag row_type_tag;
0031 typedef Event Evt;
0032 template <class FSM,class SourceState,class TargetState,class AllStates>
0033 static ::boost::msm::back::HandledEnum action_call(FSM& fsm,Event const& evt,SourceState& src,TargetState& tgt,
0034 AllStates& all_states)
0035 {
0036
0037 ::boost::msm::front::detail::row2_action_helper<CalledForAction,Event,action>::call_helper
0038 (fsm,evt,src,tgt,all_states,
0039 ::boost::mpl::bool_< ::boost::is_base_of<CalledForAction,FSM>::type::value>());
0040 return ::boost::msm::back::HANDLED_TRUE;
0041 }
0042 };
0043
0044 template<
0045 class Event
0046 , typename CalledForAction
0047 , void (CalledForAction::*action)(Event const&)
0048 , typename CalledForGuard
0049 , bool (CalledForGuard::*guard)(Event const&)
0050 >
0051 struct internal
0052 {
0053 typedef sm_i_row_tag row_type_tag;
0054 typedef Event Evt;
0055 template <class FSM,class SourceState,class TargetState,class AllStates>
0056 static ::boost::msm::back::HandledEnum action_call(FSM& fsm,Event const& evt,SourceState& src,TargetState& tgt,
0057 AllStates& all_states)
0058 {
0059
0060 ::boost::msm::front::detail::row2_action_helper<CalledForAction,Event,action>::call_helper
0061 (fsm,evt,src,tgt,all_states,
0062 ::boost::mpl::bool_< ::boost::is_base_of<CalledForAction,FSM>::type::value>());
0063 return ::boost::msm::back::HANDLED_TRUE;
0064 }
0065 template <class FSM,class SourceState,class TargetState,class AllStates>
0066 static bool guard_call(FSM& fsm,Event const& evt,SourceState& src,TargetState& tgt,
0067 AllStates& all_states)
0068 {
0069
0070 return ::boost::msm::front::detail::row2_guard_helper<CalledForGuard,Event,guard>::call_helper
0071 (fsm,evt,src,tgt,all_states,
0072 ::boost::mpl::bool_< ::boost::is_base_of<CalledForGuard,FSM>::type::value>());
0073 }
0074 };
0075 template<
0076 class Event
0077 , typename CalledForGuard
0078 , bool (CalledForGuard::*guard)(Event const&)
0079 >
0080 struct g_internal
0081 {
0082 typedef sm_g_i_row_tag row_type_tag;
0083 typedef Event Evt;
0084 template <class FSM,class SourceState,class TargetState,class AllStates>
0085 static bool guard_call(FSM& fsm,Event const& evt,SourceState& src,TargetState& tgt,
0086 AllStates& all_states)
0087 {
0088
0089 return ::boost::msm::front::detail::row2_guard_helper<CalledForGuard,Event,guard>::call_helper
0090 (fsm,evt,src,tgt,all_states,
0091 ::boost::mpl::bool_< ::boost::is_base_of<CalledForGuard,FSM>::type::value>());
0092 }
0093 };
0094 template<
0095 class Event
0096 >
0097 struct _internal
0098 {
0099 typedef sm__i_row_tag row_type_tag;
0100 typedef Event Evt;
0101 };
0102 }}}
0103
0104 #endif
0105