Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-30 09:48:15

0001 // Copyright 2008 Christophe Henry
0002 // henry UNDERSCORE christophe AT hotmail DOT com
0003 // This is an extended version of the state machine available in the boost::mpl library
0004 // Distributed under the same license as the original.
0005 // Copyright for the original version:
0006 // Copyright 2005 David Abrahams and Aleksey Gurtovoy. Distributed
0007 // under the Boost Software License, Version 1.0. (See accompanying
0008 // file LICENSE_1_0.txt or copy at
0009 // http://www.boost.org/LICENSE_1_0.txt)
0010 
0011 #ifndef BOOST_MSM_ACTIVE_STATE_SWITCHING_POLICIES_H
0012 #define BOOST_MSM_ACTIVE_STATE_SWITCHING_POLICIES_H
0013 
0014 namespace boost { namespace msm
0015 {
0016 // policy classes
0017 
0018 // Default: new active state set after the transition (after entry)
0019 struct active_state_switch_after_entry 
0020 {
0021     static int after_guard(int current_state,int){return current_state;}
0022     static int after_exit(int current_state,int){return current_state;}
0023     static int after_action(int current_state,int){return current_state;}
0024     static int after_entry(int,int next_state){return next_state;}
0025 };
0026 
0027 // new state set before the transition starts
0028 struct active_state_switch_before_transition 
0029 {
0030     static int after_guard(int,int next_state){return next_state;}
0031     static int after_exit(int,int next_state){return next_state;}
0032     static int after_action(int,int next_state){return next_state;}
0033     static int after_entry(int,int next_state){return next_state;}
0034 };
0035 
0036 // new state set after exit action completed
0037 struct active_state_switch_after_exit 
0038 {
0039     static int after_guard(int current_state,int){return current_state;}
0040     static int after_exit(int,int next_state){return next_state;}
0041     static int after_action(int,int next_state){return next_state;}
0042     static int after_entry(int,int next_state){return next_state;}
0043 };
0044 
0045 // new state set after transition action completed
0046 struct active_state_switch_after_transition_action 
0047 {
0048     static int after_guard(int current_state,int){return current_state;}
0049     static int after_exit(int current_state,int){return current_state;}
0050     static int after_action(int,int next_state){return next_state;}
0051     static int after_entry(int,int next_state){return next_state;}
0052 };
0053 
0054 } }//boost::msm
0055 #endif //BOOST_MSM_ACTIVE_STATE_SWITCHING_POLICIES_H