File indexing completed on 2025-01-30 09:48:14
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011 #ifndef BOOST_MSM_FRONT_STATES_H
0012 #define BOOST_MSM_FRONT_STATES_H
0013
0014 #include <boost/mpl/bool.hpp>
0015 #include <boost/mpl/vector.hpp>
0016 #include <boost/msm/front/common_states.hpp>
0017 #include <boost/msm/row_tags.hpp>
0018 #include <boost/msm/back/metafunctions.hpp>
0019
0020 namespace boost { namespace msm { namespace front
0021 {
0022
0023 struct no_sm_ptr
0024 {
0025
0026 typedef ::boost::mpl::bool_<false> needs_sm;
0027 };
0028 struct sm_ptr
0029 {
0030
0031 typedef ::boost::mpl::bool_<true> needs_sm;
0032 };
0033
0034 struct NoSMPtr
0035 {
0036
0037 typedef ::boost::mpl::bool_<false> needs_sm;
0038 };
0039 struct SMPtr
0040 {
0041
0042 typedef ::boost::mpl::bool_<true> needs_sm;
0043 };
0044
0045
0046
0047 template<class BASE = default_base_state,class SMPtrPolicy = no_sm_ptr>
0048 struct state : public boost::msm::front::detail::state_base<BASE>, SMPtrPolicy
0049 {
0050
0051
0052 typedef ::boost::mpl::vector0<> flag_list;
0053 typedef ::boost::mpl::vector0<> internal_flag_list;
0054
0055 typedef ::boost::mpl::vector0<> deferred_events;
0056 };
0057
0058
0059
0060 template<class BASE = default_base_state,class SMPtrPolicy = no_sm_ptr>
0061 struct terminate_state : public boost::msm::front::detail::state_base<BASE>, SMPtrPolicy
0062 {
0063
0064 typedef ::boost::mpl::vector0<> flag_list;
0065 typedef ::boost::mpl::vector< boost::msm::TerminateFlag> internal_flag_list;
0066
0067 typedef ::boost::mpl::vector0<> deferred_events;
0068 };
0069
0070
0071
0072
0073 template <class EndInterruptEvent,class BASE = default_base_state,class SMPtrPolicy = no_sm_ptr>
0074 struct interrupt_state : public boost::msm::front::detail::state_base<BASE>, SMPtrPolicy
0075 {
0076
0077 typedef ::boost::mpl::vector0<> flag_list;
0078 typedef typename boost::msm::back::build_interrupt_state_flag_list<
0079 typename boost::msm::back::get_interrupt_events<EndInterruptEvent>::type
0080 >::type internal_flag_list;
0081
0082
0083 typedef ::boost::mpl::vector0<> deferred_events;
0084 };
0085
0086
0087
0088 template <int ZoneIndex=-1>
0089 struct explicit_entry
0090 {
0091 typedef int explicit_entry_state;
0092 enum {zone_index=ZoneIndex};
0093 };
0094
0095
0096
0097
0098
0099 template<int ZoneIndex=-1,class BASE = default_base_state,class SMPtrPolicy = no_sm_ptr>
0100 struct entry_pseudo_state
0101 : public boost::msm::front::detail::state_base<BASE>,SMPtrPolicy
0102 {
0103
0104 typedef int pseudo_entry;
0105 enum {zone_index=ZoneIndex};
0106 typedef int explicit_entry_state;
0107
0108 typedef ::boost::mpl::vector0<> flag_list;
0109 typedef ::boost::mpl::vector0<> internal_flag_list;
0110
0111 typedef ::boost::mpl::vector0<> deferred_events;
0112 };
0113
0114
0115
0116
0117 template<class Event,class BASE = default_base_state,class SMPtrPolicy = no_sm_ptr>
0118 struct exit_pseudo_state : public boost::msm::front::detail::state_base<BASE> , SMPtrPolicy
0119 {
0120 typedef Event event;
0121 typedef BASE Base;
0122 typedef SMPtrPolicy PtrPolicy;
0123 typedef int pseudo_exit;
0124
0125
0126 typedef ::boost::mpl::vector0<> flag_list;
0127 typedef ::boost::mpl::vector0<> internal_flag_list;
0128
0129 typedef ::boost::mpl::vector0<> deferred_events;
0130 };
0131
0132 }}}
0133
0134 #endif
0135