Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:41:58

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_BACK_MPL_GRAPH_FSM_CHECK_H
0012 #define BOOST_MSM_BACK_MPL_GRAPH_FSM_CHECK_H
0013 
0014 #include <boost/mpl/assert.hpp>
0015 
0016 #include <boost/msm/back/metafunctions.hpp>
0017 
0018 namespace boost { namespace msm { namespace back
0019 {
0020     struct mpl_graph_fsm_check
0021     {
0022         typedef int fsm_check;
0023         // checks that regions are truly orthogonal (one state belongs to 1 region)
0024         // using the mpl_graph library (part of metagraph)
0025         template <class Fsm>
0026         static void check_orthogonality()
0027         {
0028             BOOST_MPL_ASSERT_RELATION( ::boost::msm::back::check_regions_orthogonality<Fsm>::states_in_regions_raw,
0029                                        ==, 
0030                                        ::boost::msm::back::check_regions_orthogonality<Fsm>::cumulated_states_in_regions_raw );
0031 
0032         }
0033         // checks that all states are reachable or created using the explicit_creation typedef
0034         // using the mpl_graph library (part of metagraph)
0035         template <class Fsm>
0036         static void check_unreachable_states()
0037         {
0038             BOOST_MPL_ASSERT_RELATION( ::boost::msm::back::check_no_unreachable_state<Fsm>::states_in_fsm,
0039                                        ==, 
0040                                        ::boost::msm::back::check_no_unreachable_state<Fsm>::cumulated_states_in_regions );
0041 
0042         }
0043     };
0044 
0045 } } }//boost::msm::back
0046 
0047 
0048 #endif //BOOST_MSM_BACK_MPL_GRAPH_FSM_CHECK_H