File indexing completed on 2025-01-18 09:41:58
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010 #ifndef BOOST_MSM_BACK_FOLD_TO_LIST_H
0011 #define BOOST_MSM_BACK_FOLD_TO_LIST_H
0012
0013 #include <boost/msm/proto_config.hpp>
0014 #include <boost/proto/core.hpp>
0015 #include <boost/proto/transform.hpp>
0016 #include <boost/msm/msm_grammar.hpp>
0017 #include <boost/fusion/container/list/cons.hpp>
0018
0019 namespace boost { namespace msm { namespace back
0020 {
0021 struct state_copy_tag
0022 {
0023 };
0024
0025 template<class X = proto::is_proto_expr>
0026 struct define_states_creation
0027 {
0028 BOOST_PROTO_BASIC_EXTENDS(
0029 proto::terminal<state_copy_tag>::type
0030 , define_states_creation
0031 , boost::msm::msm_domain
0032 )
0033 };
0034
0035 define_states_creation<> const states_ = {{{}}};
0036
0037 struct FoldToList
0038 : ::boost::proto::or_<
0039
0040 ::boost::proto::when<
0041 ::boost::proto::terminal< state_copy_tag >
0042 , ::boost::proto::_state
0043 >
0044
0045
0046
0047 , ::boost::proto::when<
0048 ::boost::proto::terminal< state_tag >
0049 , boost::fusion::cons< ::boost::proto::_, ::boost::proto::_state>(
0050 ::boost::proto::_, ::boost::proto::_state
0051 )
0052 >
0053
0054 , ::boost::proto::when<
0055 ::boost::proto::terminal< proto::_ >
0056 , boost::fusion::cons< ::boost::proto::_value, ::boost::proto::_state>(
0057 ::boost::proto::_value, ::boost::proto::_state
0058 )
0059 >
0060
0061
0062
0063
0064 , ::boost::proto::when<
0065 ::boost::proto::shift_left<FoldToList, FoldToList>
0066 , FoldToList(
0067 ::boost::proto::_left
0068 , ::boost::proto::call<FoldToList( ::boost::proto::_right, ::boost::proto::_state )>
0069 )
0070 >
0071 >
0072 {};
0073
0074 }}}
0075
0076 #endif
0077