common.hpp 138 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715
  1. // Copyright 2008 Christophe Henry
  2. // henry UNDERSCORE christophe AT hotmail DOT com
  3. // This is an extended version of the state machine available in the boost::mpl library
  4. // Distributed under the same license as the original.
  5. // Copyright for the original version:
  6. // Copyright 2005 David Abrahams and Aleksey Gurtovoy. Distributed
  7. // under the Boost Software License, Version 1.0. (See accompanying
  8. // file LICENSE_1_0.txt or copy at
  9. // http://www.boost.org/LICENSE_1_0.txt)
  10. #ifndef BOOST_MSM_FRONT_EUML_COMMON_H
  11. #define BOOST_MSM_FRONT_EUML_COMMON_H
  12. #include <boost/config.hpp>
  13. #include <boost/msm/proto_config.hpp>
  14. #include <iterator>
  15. #include <utility>
  16. #include <boost/proto/core.hpp>
  17. #include <boost/proto/transform.hpp>
  18. #include <boost/utility/enable_if.hpp>
  19. #include <boost/type_traits/is_same.hpp>
  20. #include <boost/type_traits/remove_reference.hpp>
  21. #include <boost/type_traits/add_const.hpp>
  22. #include <boost/mpl/vector.hpp>
  23. #include <boost/mpl/set.hpp>
  24. #include <boost/mpl/has_key.hpp>
  25. #include <boost/mpl/int.hpp>
  26. #include <boost/mpl/less_equal.hpp>
  27. #if BOOST_VERSION >= 104000
  28. #include <boost/mpl/string.hpp>
  29. #endif
  30. #include <boost/fusion/container/vector.hpp>
  31. #include <boost/fusion/container/set.hpp>
  32. #include <boost/fusion/include/at_c.hpp>
  33. #include <boost/fusion/include/make_map.hpp>
  34. #include <boost/fusion/include/pair.hpp>
  35. #include <boost/fusion/include/as_vector.hpp>
  36. #include <boost/fusion/include/pair.hpp>
  37. #include <boost/fusion/include/is_sequence.hpp>
  38. #include <boost/type_traits/remove_reference.hpp>
  39. #include <boost/preprocessor/repetition/enum_params.hpp>
  40. #include <boost/preprocessor/arithmetic/sub.hpp>
  41. #include <boost/preprocessor/punctuation/comma_if.hpp>
  42. #include <boost/preprocessor/control/expr_if.hpp>
  43. #include <boost/preprocessor/punctuation/comma.hpp>
  44. #include <boost/preprocessor/arithmetic/add.hpp>
  45. #include <boost/preprocessor/cat.hpp>
  46. #include <boost/preprocessor/comparison/less.hpp>
  47. #include <boost/preprocessor/arithmetic/dec.hpp>
  48. #include <boost/preprocessor/repetition/repeat_from_to.hpp>
  49. #include <boost/preprocessor/cat.hpp>
  50. #include <boost/msm/msm_grammar.hpp>
  51. #include <boost/msm/active_state_switching_policies.hpp>
  52. #include <boost/msm/event_traits.hpp>
  53. #include <boost/msm/front/functor_row.hpp>
  54. namespace proto = boost::proto;
  55. BOOST_MPL_HAS_XXX_TRAIT_DEF(tag_type)
  56. BOOST_MPL_HAS_XXX_TRAIT_DEF(action_name)
  57. BOOST_MPL_HAS_XXX_TRAIT_DEF(not_intern_euml_state)
  58. namespace boost { namespace msm { namespace front { namespace euml
  59. {
  60. template <class T>
  61. struct get_iterator
  62. {
  63. typedef typename T::iterator type;
  64. };
  65. template <class T>
  66. struct get_reverse_iterator
  67. {
  68. typedef typename T::reverse_iterator type;
  69. };
  70. template <class T>
  71. struct get_reference
  72. {
  73. typedef typename T::reference type;
  74. };
  75. template <class T>
  76. struct get_size_type
  77. {
  78. typedef typename T::size_type type;
  79. };
  80. template <class T>
  81. struct get_value_type
  82. {
  83. typedef typename T::value_type type;
  84. };
  85. template <class T>
  86. struct get_first_type
  87. {
  88. typedef typename T::first_type type;
  89. };
  90. template <class T>
  91. struct get_second_type
  92. {
  93. typedef typename T::second_type type;
  94. };
  95. template <class T>
  96. struct get_action_tag_type
  97. {
  98. typedef typename ::boost::mpl::has_key<
  99. typename T::tag_type,action_tag>::type type;
  100. };
  101. template <class T>
  102. struct get_state_action_tag_type
  103. {
  104. typedef typename ::boost::mpl::has_key<
  105. typename T::tag_type,state_action_tag>::type type;
  106. };
  107. template <class T,class EVT,class FSM,class SourceState,class TargetState>
  108. struct get_result_type
  109. {
  110. typedef typename T::template transition_action_result<EVT,FSM,SourceState,TargetState>::type type;
  111. };
  112. template <class T,class Event,class FSM,class STATE>
  113. struct get_result_type2
  114. {
  115. typedef typename T::template state_action_result<Event,FSM,STATE>::type type;
  116. };
  117. template<class SEQ>
  118. struct get_sequence
  119. {
  120. typedef typename SEQ::sequence type;
  121. };
  122. template <class T>
  123. struct get_attributes_type
  124. {
  125. typedef typename T::attributes_type type;
  126. };
  127. template <class T>
  128. struct get_euml_tag_type
  129. {
  130. typedef typename T::euml_tag_type type;
  131. };
  132. template <class T,class Arg1=void,class Arg2=void,class Arg3=void,class Arg4=void,class Arg5=void
  133. #ifdef BOOST_MSVC
  134. ,class Arg6=void
  135. #endif
  136. >
  137. struct get_fct
  138. {
  139. typedef typename T::template In<Arg1,Arg2,Arg3,Arg4,Arg5
  140. #ifdef BOOST_MSVC
  141. ,Arg6
  142. #endif
  143. >::type type;
  144. };
  145. // used to differentiate between different types of euml_state's
  146. template <class T,class Enable=void>
  147. struct get_state_name
  148. {
  149. typedef T type;
  150. };
  151. template <class T>
  152. struct get_state_name<T,typename ::boost::enable_if<has_not_intern_euml_state<T> >::type>
  153. {
  154. typedef typename T::In::type type;
  155. };
  156. template <class T>
  157. struct get_action_name
  158. {
  159. typedef typename T::action_name type;
  160. };
  161. template <class T>
  162. struct get_event_name
  163. {
  164. typedef typename T::event_name type;
  165. };
  166. template <class EVT>
  167. struct euml_event: proto::extends<typename proto::terminal<event_tag>::type, EVT, boost::msm::sm_domain>
  168. {
  169. typedef event_tag euml_tag_type;
  170. typedef EVT event_name;
  171. using proto::extends<typename proto::terminal<event_tag>::type, EVT, boost::msm::sm_domain>::operator=;
  172. template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5
  173. #ifdef BOOST_MSVC
  174. ,class Arg6
  175. #endif
  176. >
  177. struct In
  178. {
  179. typedef EVT type;
  180. };
  181. };
  182. template <class STATE>
  183. struct euml_state_intern: proto::extends<typename proto::terminal< boost::msm::state_tag>::type, STATE, boost::msm::state_domain>
  184. {
  185. typedef state_tag euml_tag_type;
  186. using proto::extends<typename proto::terminal<state_tag>::type, STATE, boost::msm::state_domain>::operator=;
  187. template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5
  188. #ifdef BOOST_MSVC
  189. ,class Arg6
  190. #endif
  191. >
  192. struct In
  193. {
  194. typedef STATE type;
  195. };
  196. };
  197. template <class STATE>
  198. struct euml_state: proto::extends<typename proto::terminal< boost::msm::state_tag>::type, STATE, boost::msm::state_domain>
  199. {
  200. typedef state_tag euml_tag_type;
  201. typedef int not_intern_euml_state;
  202. using proto::extends<typename proto::terminal<state_tag>::type, STATE, boost::msm::state_domain>::operator=;
  203. struct In
  204. {
  205. typedef STATE type;
  206. };
  207. };
  208. template <class ACTION>
  209. struct euml_action: proto::extends<typename proto::terminal<action_tag>::type, ACTION, boost::msm::sm_domain>
  210. {
  211. typedef action_tag euml_tag_type;
  212. typedef ACTION action_name;
  213. using proto::extends<typename proto::terminal<action_tag>::type, ACTION, boost::msm::sm_domain>::operator=;
  214. template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5
  215. #ifdef BOOST_MSVC
  216. ,class Arg6
  217. #endif
  218. >
  219. struct In
  220. {
  221. typedef ACTION type;
  222. };
  223. };
  224. template <class FLAG>
  225. struct euml_flag: proto::extends<typename proto::terminal<flag_tag>::type, FLAG, boost::msm::sm_domain>
  226. {
  227. typedef flag_tag euml_tag_type;
  228. using proto::extends<typename proto::terminal<flag_tag>::type, FLAG, boost::msm::sm_domain>::operator=;
  229. template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5
  230. #ifdef BOOST_MSVC
  231. ,class Arg6
  232. #endif
  233. >
  234. struct In
  235. {
  236. typedef FLAG type;
  237. };
  238. };
  239. template <class CONFIG>
  240. struct euml_config: proto::extends<typename proto::terminal<config_tag>::type, CONFIG, boost::msm::sm_domain>
  241. {
  242. typedef config_tag euml_tag_type;
  243. using proto::extends<typename proto::terminal<config_tag>::type, CONFIG, boost::msm::sm_domain>::operator=;
  244. template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5
  245. #ifdef BOOST_MSVC
  246. ,class Arg6
  247. #endif
  248. >
  249. struct In
  250. {
  251. typedef CONFIG type;
  252. };
  253. };
  254. struct No_Exception : euml_config<No_Exception>
  255. {
  256. typedef int no_exception_thrown;
  257. No_Exception(){}
  258. };
  259. struct No_Msg_Queue : euml_config<No_Msg_Queue>
  260. {
  261. typedef int no_message_queue;
  262. No_Msg_Queue(){}
  263. };
  264. struct Deferred_Events : euml_config<Deferred_Events>
  265. {
  266. typedef int activate_deferred_events;
  267. Deferred_Events(){}
  268. };
  269. No_Exception const no_exception=No_Exception();
  270. No_Msg_Queue const no_msg_queue=No_Msg_Queue();
  271. Deferred_Events const deferred_events=Deferred_Events();
  272. struct ActiveStateSwitchBeforeTransition : euml_config<ActiveStateSwitchBeforeTransition>
  273. {
  274. typedef boost::msm::active_state_switch_before_transition active_state_switch_policy;
  275. ActiveStateSwitchBeforeTransition(){}
  276. };
  277. ActiveStateSwitchBeforeTransition const switch_active_before_transition = ActiveStateSwitchBeforeTransition();
  278. struct ActiveStateSwitchAfterExit : euml_config<ActiveStateSwitchAfterExit>
  279. {
  280. typedef boost::msm::active_state_switch_after_exit active_state_switch_policy;
  281. ActiveStateSwitchAfterExit(){}
  282. };
  283. ActiveStateSwitchAfterExit const switch_active_after_exit = ActiveStateSwitchAfterExit();
  284. struct ActiveStateSwitchAfterAction : euml_config<ActiveStateSwitchAfterAction>
  285. {
  286. typedef boost::msm::active_state_switch_after_transition_action active_state_switch_policy;
  287. ActiveStateSwitchAfterAction(){}
  288. };
  289. ActiveStateSwitchAfterAction const switch_active_after_action = ActiveStateSwitchAfterAction();
  290. struct invalid_type{};
  291. struct make_invalid_type
  292. {
  293. typedef invalid_type type;
  294. };
  295. template <class ROW>
  296. struct make_vector_one_row
  297. {
  298. typedef boost::fusion::vector<ROW> type;
  299. };
  300. template <class T>
  301. T make_T(T t) {return t;}
  302. struct make_vector_no_row
  303. {
  304. typedef boost::fusion::vector<> type;
  305. };
  306. struct NoAction : euml_action<NoAction>
  307. {
  308. NoAction(){}
  309. // return value if used inside a state action (entry/exit)
  310. template <class Event,class FSM,class STATE >
  311. struct state_action_result
  312. {
  313. typedef bool type;
  314. };
  315. // return value if used inside a transition (action/guard)
  316. template <class EVT,class FSM,class SourceState,class TargetState>
  317. struct transition_action_result
  318. {
  319. typedef bool type;
  320. };
  321. // this functor can be used in both modes, state action and transition action
  322. typedef ::boost::fusion::set<state_action_tag,action_tag> tag_type;
  323. template <class Event,class FSM,class STATE>
  324. bool operator()(Event const&,FSM&,STATE& )
  325. {
  326. // does nothing
  327. return true;
  328. }
  329. template <class EVT,class FSM,class SourceState,class TargetState>
  330. bool operator()(EVT const& ,FSM& ,SourceState& ,TargetState&)const
  331. {
  332. // does nothing
  333. return true;
  334. }
  335. };
  336. NoAction const no_action = NoAction();
  337. struct fsm_artefact_tag {};
  338. template <class Index=void>
  339. struct GetSource_ : euml_action<GetSource_<Index> >
  340. {
  341. template <class EVT,class FSM,class SourceState,class TargetState>
  342. struct transition_action_result
  343. {
  344. typedef typename ::boost::fusion::result_of::at_key<typename SourceState::attributes_type,
  345. Index >::type type;
  346. };
  347. typedef ::boost::fusion::set<action_tag> tag_type;
  348. template <class EVT,class FSM,class SourceState,class TargetState>
  349. typename transition_action_result<EVT,FSM,SourceState,TargetState>::type
  350. operator()(EVT const& ,FSM& ,SourceState& src,TargetState&)const
  351. {
  352. return src.get_attribute(Index());
  353. }
  354. };
  355. template<>
  356. struct GetSource_<void> : euml_action<GetSource_<void> >
  357. {
  358. template <class EVT,class FSM,class SourceState,class TargetState>
  359. struct transition_action_result
  360. {
  361. typedef SourceState& type;
  362. };
  363. typedef ::boost::fusion::set<action_tag> tag_type;
  364. template <class EVT,class FSM,class SourceState,class TargetState>
  365. typename transition_action_result<EVT,FSM,SourceState,TargetState>::type
  366. operator()(EVT const& , FSM&,SourceState& src,TargetState& )const
  367. {
  368. return src;
  369. }
  370. };
  371. struct GetSource_Helper: proto::extends< proto::terminal<fsm_artefact_tag>::type, GetSource_Helper, boost::msm::sm_domain>
  372. {
  373. GetSource_Helper(){}
  374. template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5
  375. #ifdef BOOST_MSVC
  376. ,class Arg6
  377. #endif
  378. >
  379. struct In
  380. {
  381. typedef GetSource_<Arg1> type;
  382. };
  383. };
  384. GetSource_Helper const source_ = GetSource_Helper();
  385. template <class Index=void>
  386. struct GetTarget_ : euml_action<GetTarget_<Index> >
  387. {
  388. template <class EVT,class FSM,class SourceState,class TargetState>
  389. struct transition_action_result
  390. {
  391. typedef typename ::boost::fusion::result_of::at_key<typename TargetState::attributes_type,
  392. Index >::type type;
  393. };
  394. typedef ::boost::fusion::set<action_tag> tag_type;
  395. template <class EVT,class FSM,class SourceState,class TargetState>
  396. typename transition_action_result<EVT,FSM,SourceState,TargetState>::type
  397. operator()(EVT const& ,FSM& ,SourceState& ,TargetState& tgt)const
  398. {
  399. return tgt.get_attribute(Index());
  400. }
  401. };
  402. template<>
  403. struct GetTarget_<void> : euml_action<GetTarget_<void> >
  404. {
  405. template <class EVT,class FSM,class SourceState,class TargetState>
  406. struct transition_action_result
  407. {
  408. typedef TargetState& type;
  409. };
  410. typedef ::boost::fusion::set<action_tag> tag_type;
  411. template <class EVT,class FSM,class SourceState,class TargetState>
  412. typename transition_action_result<EVT,FSM,SourceState,TargetState>::type
  413. operator()(EVT const& , FSM&,SourceState& ,TargetState& tgt)const
  414. {
  415. return tgt;
  416. }
  417. };
  418. struct GetTarget_Helper: proto::extends< proto::terminal<fsm_artefact_tag>::type, GetTarget_Helper, boost::msm::sm_domain>
  419. {
  420. GetTarget_Helper(){}
  421. template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5
  422. #ifdef BOOST_MSVC
  423. ,class Arg6
  424. #endif
  425. >
  426. struct In
  427. {
  428. typedef GetTarget_<Arg1> type;
  429. };
  430. };
  431. GetTarget_Helper const target_ = GetTarget_Helper();
  432. template <class Index=void>
  433. struct GetState_ : euml_action<GetState_<Index> >
  434. {
  435. template <class Event,class FSM,class STATE >
  436. struct state_action_result
  437. {
  438. typedef typename ::boost::fusion::result_of::at_key<typename STATE::attributes_type,
  439. Index >::type type;
  440. };
  441. typedef ::boost::fusion::set<state_action_tag> tag_type;
  442. template <class Event,class FSM,class STATE>
  443. typename state_action_result<Event,FSM,STATE>::type
  444. operator()(Event const&,FSM& ,STATE& state )
  445. {
  446. return state.get_attribute(Index());
  447. }
  448. };
  449. template<>
  450. struct GetState_<void> : euml_action<GetState_<void> >
  451. {
  452. using euml_action<GetState_ >::operator=;
  453. template <class Event,class FSM,class STATE >
  454. struct state_action_result
  455. {
  456. typedef STATE& type;
  457. };
  458. typedef ::boost::fusion::set<state_action_tag> tag_type;
  459. template <class Event,class FSM,class STATE>
  460. typename state_action_result<Event,FSM,STATE>::type
  461. operator()(Event const&,FSM& ,STATE& state )
  462. {
  463. return state;
  464. }
  465. };
  466. struct GetState_Helper: proto::extends< proto::terminal<fsm_artefact_tag>::type, GetState_Helper, boost::msm::sm_domain>
  467. {
  468. GetState_Helper(){}
  469. template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5
  470. #ifdef BOOST_MSVC
  471. ,class Arg6
  472. #endif
  473. >
  474. struct In
  475. {
  476. typedef GetState_<Arg1> type;
  477. };
  478. };
  479. GetState_Helper const state_ = GetState_Helper();
  480. template <class Index=void>
  481. struct GetEvent_ : euml_action<GetEvent_<Index> >
  482. {
  483. template <class Event,class FSM,class STATE >
  484. struct state_action_result
  485. {
  486. typedef typename ::boost::add_const<
  487. typename ::boost::fusion::result_of::at_key<typename Event::attributes_type,
  488. Index >::type>::type type;
  489. };
  490. template <class EVT,class FSM,class SourceState,class TargetState>
  491. struct transition_action_result
  492. {
  493. typedef typename ::boost::add_const<
  494. typename ::boost::fusion::result_of::at_key<typename EVT::attributes_type,
  495. Index >::type>::type type;
  496. };
  497. typedef ::boost::fusion::set<state_action_tag,action_tag> tag_type;
  498. template <class Event,class FSM,class STATE>
  499. typename state_action_result<Event,FSM,STATE>::type
  500. operator()(Event const& evt,FSM& ,STATE& )
  501. {
  502. return evt.get_attribute(Index());
  503. }
  504. template <class EVT,class FSM,class SourceState,class TargetState>
  505. typename transition_action_result<EVT,FSM,SourceState,TargetState>::type
  506. operator()(EVT const& evt ,FSM& ,SourceState& ,TargetState&)const
  507. {
  508. return evt.get_attribute(Index());
  509. }
  510. };
  511. template <>
  512. struct GetEvent_<void> : euml_action<GetEvent_<void> >
  513. {
  514. template <class Event,class FSM,class STATE >
  515. struct state_action_result
  516. {
  517. typedef Event const& type;
  518. };
  519. template <class EVT,class FSM,class SourceState,class TargetState>
  520. struct transition_action_result
  521. {
  522. typedef EVT const& type;
  523. };
  524. typedef ::boost::fusion::set<state_action_tag,action_tag> tag_type;
  525. template <class Event,class FSM,class STATE>
  526. typename state_action_result<Event,FSM,STATE>::type
  527. operator()(Event const& evt,FSM& ,STATE& )
  528. {
  529. return evt;
  530. }
  531. template <class EVT,class FSM,class SourceState,class TargetState>
  532. typename transition_action_result<EVT,FSM,SourceState,TargetState>::type
  533. operator()(EVT const& evt ,FSM& ,SourceState& ,TargetState&)const
  534. {
  535. return evt;
  536. }
  537. };
  538. struct GetEvent_Helper: proto::extends< proto::terminal<fsm_artefact_tag>::type, GetEvent_Helper, boost::msm::sm_domain>
  539. {
  540. GetEvent_Helper(){}
  541. template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5
  542. #ifdef BOOST_MSVC
  543. ,class Arg6
  544. #endif
  545. >
  546. struct In
  547. {
  548. typedef GetEvent_<Arg1> type;
  549. };
  550. };
  551. GetEvent_Helper const event_ = GetEvent_Helper();
  552. template <class Index=void>
  553. struct GetFsm_ : euml_action<GetFsm_<Index> >
  554. {
  555. template <class Event,class FSM,class STATE >
  556. struct state_action_result
  557. {
  558. typedef typename ::boost::fusion::result_of::at_key<typename FSM::attributes_type,
  559. Index >::type type;
  560. };
  561. template <class EVT,class FSM,class SourceState,class TargetState>
  562. struct transition_action_result
  563. {
  564. typedef typename ::boost::fusion::result_of::at_key<typename FSM::attributes_type,
  565. Index >::type type;
  566. };
  567. typedef ::boost::fusion::set<state_action_tag,action_tag> tag_type;
  568. template <class Event,class FSM,class STATE>
  569. typename state_action_result<Event,FSM,STATE>::type
  570. operator()(Event const&,FSM& fsm,STATE& )
  571. {
  572. return fsm.get_attribute(Index());
  573. }
  574. template <class EVT,class FSM,class SourceState,class TargetState>
  575. typename transition_action_result<EVT,FSM,SourceState,TargetState>::type
  576. operator()(EVT const& ,FSM& fsm,SourceState& ,TargetState&)const
  577. {
  578. return fsm.get_attribute(Index());
  579. }
  580. };
  581. template<>
  582. struct GetFsm_<void> : euml_action<GetFsm_<void> >
  583. {
  584. using euml_action<GetFsm_>::operator=;
  585. template <class Event,class FSM,class STATE >
  586. struct state_action_result
  587. {
  588. typedef FSM& type;
  589. };
  590. template <class EVT,class FSM,class SourceState,class TargetState>
  591. struct transition_action_result
  592. {
  593. typedef FSM& type;
  594. };
  595. typedef ::boost::fusion::set<state_action_tag,action_tag> tag_type;
  596. template <class Event,class FSM,class STATE>
  597. typename state_action_result<Event,FSM,STATE>::type
  598. operator()(Event const&,FSM& fsm,STATE& )
  599. {
  600. return fsm;
  601. }
  602. template <class EVT,class FSM,class SourceState,class TargetState>
  603. typename transition_action_result<EVT,FSM,SourceState,TargetState>::type
  604. operator()(EVT const& ,FSM& fsm,SourceState& ,TargetState&)const
  605. {
  606. return fsm;
  607. }
  608. };
  609. struct GetFsm_Helper: proto::extends< proto::terminal<fsm_artefact_tag>::type, GetFsm_Helper, boost::msm::sm_domain>
  610. {
  611. GetFsm_Helper(){}
  612. template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5
  613. #ifdef BOOST_MSVC
  614. ,class Arg6
  615. #endif
  616. >
  617. struct In
  618. {
  619. typedef GetFsm_<Arg1> type;
  620. };
  621. };
  622. GetFsm_Helper const fsm_ = GetFsm_Helper();
  623. template <class StateName,class Param1>
  624. struct SubState_ : euml_action<SubState_<StateName, Param1> >
  625. {
  626. template <class Event,class FSM,class STATE >
  627. struct state_action_result
  628. {
  629. typedef StateName& type;
  630. };
  631. template <class EVT,class FSM,class SourceState,class TargetState>
  632. struct transition_action_result
  633. {
  634. typedef StateName& type;
  635. };
  636. typedef ::boost::fusion::set<state_action_tag,action_tag> tag_type;
  637. template <class EVT,class FSM,class SourceState,class TargetState>
  638. StateName& operator()(EVT const& evt,FSM& fsm,SourceState& src,TargetState& tgt)const
  639. {
  640. return (Param1()(evt,fsm,src,tgt)).template get_state<StateName&>();
  641. }
  642. template <class Event,class FSM,class STATE>
  643. StateName& operator()(Event const& evt,FSM& fsm,STATE& state)const
  644. {
  645. return (Param1()(evt,fsm,state)).template get_state<StateName&>();
  646. }
  647. };
  648. template <class StateName>
  649. struct SubState_ <StateName,void>
  650. : euml_action<SubState_<StateName, void > >
  651. {
  652. template <class Event,class FSM,class STATE >
  653. struct state_action_result
  654. {
  655. typedef StateName& type;
  656. };
  657. template <class EVT,class FSM,class SourceState,class TargetState>
  658. struct transition_action_result
  659. {
  660. typedef StateName& type;
  661. };
  662. typedef ::boost::fusion::set<state_action_tag,action_tag> tag_type;
  663. template <class EVT,class FSM,class SourceState,class TargetState>
  664. StateName& operator()(EVT const&,FSM& fsm,SourceState& ,TargetState& )const
  665. {
  666. return fsm.template get_state<StateName&>();
  667. }
  668. template <class Event,class FSM,class STATE>
  669. StateName& operator()(Event const& ,FSM& fsm,STATE& )const
  670. {
  671. return fsm.template get_state<StateName&>();
  672. }
  673. };
  674. struct SubState_Helper: proto::extends< proto::terminal<fsm_artefact_tag>::type, SubState_Helper, boost::msm::sm_domain>
  675. {
  676. SubState_Helper(){}
  677. using proto::extends< proto::terminal<fsm_artefact_tag>::type, SubState_Helper, boost::msm::sm_domain>::operator=;
  678. template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5
  679. #ifdef BOOST_MSVC
  680. ,class Arg6
  681. #endif
  682. >
  683. struct In
  684. {
  685. typedef SubState_<Arg1,Arg2> type;
  686. };
  687. };
  688. SubState_Helper const substate_ = SubState_Helper();
  689. template <class Target,class Index>
  690. struct GetAttribute_ : euml_action<GetAttribute_<Target, Index> >
  691. {
  692. using euml_action<GetAttribute_<Target,Index> >::operator=;
  693. template <class Event,class FSM,class STATE >
  694. struct state_action_result
  695. {
  696. typedef typename
  697. ::boost::fusion::result_of::at_key<
  698. typename get_attributes_type<
  699. typename ::boost::remove_reference<
  700. typename get_result_type2<Target,Event,FSM,STATE>::type>::type>::type,
  701. Index >::type type;
  702. };
  703. template <class EVT,class FSM,class SourceState,class TargetState>
  704. struct transition_action_result
  705. {
  706. typedef typename
  707. ::boost::fusion::result_of::at_key<
  708. typename get_attributes_type<
  709. typename ::boost::remove_reference<
  710. typename get_result_type<Target,EVT,FSM,SourceState,TargetState>::type>::type>::type,
  711. Index >::type type;
  712. };
  713. typedef ::boost::fusion::set<state_action_tag,action_tag> tag_type;
  714. template <class EVT,class FSM,class SourceState,class TargetState>
  715. typename ::boost::enable_if<
  716. typename ::boost::mpl::has_key<
  717. typename Target::tag_type,action_tag>::type,
  718. typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type
  719. operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const
  720. {
  721. return (Target()(evt,fsm,src,tgt)).get_attribute(Index());
  722. }
  723. template <class Event,class FSM,class STATE>
  724. typename ::boost::enable_if<
  725. typename ::boost::mpl::has_key<
  726. typename Target::tag_type,state_action_tag>::type,
  727. typename state_action_result<Event,FSM,STATE>::type >::type
  728. operator()(Event const& evt,FSM& fsm,STATE& state )const
  729. {
  730. return (Target()(evt,fsm,state)).get_attribute(Index());
  731. }
  732. };
  733. struct GetAttribute_Helper: proto::extends< proto::terminal<fsm_artefact_tag>::type, GetAttribute_Helper, boost::msm::sm_domain>
  734. {
  735. GetAttribute_Helper(){}
  736. template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5
  737. #ifdef BOOST_MSVC
  738. ,class Arg6
  739. #endif
  740. >
  741. struct In
  742. {
  743. typedef GetAttribute_<Arg1,Arg2> type;
  744. };
  745. };
  746. GetAttribute_Helper const attribute_ = GetAttribute_Helper();
  747. template <class Index>
  748. struct Source_ : euml_action<Source_<Index> >
  749. {
  750. using euml_action<Source_<Index> >::operator=;
  751. template <class EVT,class FSM,class SourceState,class TargetState>
  752. struct transition_action_result
  753. {
  754. typedef typename
  755. ::boost::fusion::result_of::at_key<typename SourceState::attributes_type,
  756. Index >::type type;
  757. };
  758. typedef ::boost::fusion::set<action_tag> tag_type;
  759. template <class EVT,class FSM,class SourceState,class TargetState>
  760. typename transition_action_result<EVT,FSM,SourceState,TargetState>::type
  761. operator()(EVT const& , FSM&,SourceState& src,TargetState& )const
  762. {
  763. return src.get_attribute(Index());
  764. }
  765. };
  766. template <class Index>
  767. struct Target_ : euml_action<Target_<Index> >
  768. {
  769. using euml_action<Target_<Index> >::operator=;
  770. template <class EVT,class FSM,class SourceState,class TargetState>
  771. struct transition_action_result
  772. {
  773. typedef typename
  774. ::boost::fusion::result_of::at_key<typename TargetState::attributes_type,
  775. Index >::type type;
  776. };
  777. typedef ::boost::fusion::set<action_tag> tag_type;
  778. template <class EVT,class FSM,class SourceState,class TargetState>
  779. typename transition_action_result<EVT,FSM,SourceState,TargetState>::type
  780. operator()(EVT const& ,FSM& ,SourceState& ,TargetState& tgt)const
  781. {
  782. return tgt.get_attribute(Index());
  783. }
  784. };
  785. template <class Index>
  786. struct State_ : euml_action<State_<Index> >
  787. {
  788. using euml_action<State_<Index> >::operator=;
  789. template <class Event,class FSM,class STATE >
  790. struct state_action_result
  791. {
  792. typedef typename
  793. ::boost::fusion::result_of::at_key<typename STATE::attributes_type,
  794. Index >::type type;
  795. };
  796. typedef ::boost::fusion::set<state_action_tag> tag_type;
  797. template <class Event,class FSM,class STATE>
  798. typename state_action_result<Event,FSM,STATE>::type
  799. operator()(Event const&,FSM& ,STATE& state )
  800. {
  801. return state.get_attribute(Index());
  802. }
  803. };
  804. template <class Index>
  805. struct Event_ : euml_action<Event_<Index> >
  806. {
  807. using euml_action<Event_<Index> >::operator=;
  808. template <class Event,class FSM,class STATE >
  809. struct state_action_result
  810. {
  811. typedef typename ::boost::add_const<
  812. typename ::boost::fusion::result_of::at_key<typename Event::attributes_type,
  813. Index >::type>::type type;
  814. };
  815. template <class EVT,class FSM,class SourceState,class TargetState>
  816. struct transition_action_result
  817. {
  818. typedef typename ::boost::add_const<
  819. typename ::boost::fusion::result_of::at_key<typename EVT::attributes_type,
  820. Index >::type>::type type;
  821. };
  822. typedef ::boost::fusion::set<state_action_tag,action_tag> tag_type;
  823. template <class Event,class FSM,class STATE>
  824. typename state_action_result<Event,FSM,STATE>::type
  825. operator()(Event const& evt,FSM& ,STATE& )
  826. {
  827. return evt.get_attribute(Index());
  828. }
  829. template <class EVT,class FSM,class SourceState,class TargetState>
  830. typename transition_action_result<EVT,FSM,SourceState,TargetState>::type
  831. operator()(EVT const& evt ,FSM& ,SourceState& ,TargetState&)const
  832. {
  833. return evt.get_attribute(Index());
  834. }
  835. };
  836. template <class StateType,class Index>
  837. struct State_Attribute_ : euml_action<State_Attribute_<StateType,Index> >
  838. {
  839. using euml_action<State_Attribute_<StateType,Index> >::operator=;
  840. template <class Event,class FSM,class STATE >
  841. struct state_action_result
  842. {
  843. typedef typename
  844. ::boost::fusion::result_of::at_key<typename StateType::attributes_type,
  845. Index >::type type;
  846. };
  847. typedef ::boost::fusion::set<state_action_tag> tag_type;
  848. template <class Event,class FSM,class STATE>
  849. typename state_action_result<Event,FSM,STATE>::type
  850. operator()(Event const&,FSM& fsm,STATE& )
  851. {
  852. return fsm.template get_state<StateType&>().get_attribute(Index());
  853. }
  854. };
  855. template <class Index>
  856. struct Fsm_ : euml_action<Fsm_<Index> >
  857. {
  858. using euml_action<Fsm_<Index> >::operator=;
  859. template <class Event,class FSM,class STATE >
  860. struct state_action_result
  861. {
  862. typedef typename
  863. ::boost::fusion::result_of::at_key<typename FSM::attributes_type,
  864. Index >::type type;
  865. };
  866. template <class EVT,class FSM,class SourceState,class TargetState>
  867. struct transition_action_result
  868. {
  869. typedef typename
  870. ::boost::fusion::result_of::at_key<typename FSM::attributes_type,
  871. Index >::type type;
  872. };
  873. typedef ::boost::fusion::set<state_action_tag,action_tag> tag_type;
  874. template <class Event,class FSM,class STATE>
  875. typename state_action_result<Event,FSM,STATE>::type
  876. operator()(Event const&,FSM& fsm,STATE& )
  877. {
  878. return fsm.get_attribute(Index());
  879. }
  880. template <class EVT,class FSM,class SourceState,class TargetState>
  881. typename transition_action_result<EVT,FSM,SourceState,TargetState>::type
  882. operator()(EVT const& ,FSM& fsm,SourceState& ,TargetState&)const
  883. {
  884. return fsm.get_attribute(Index());
  885. }
  886. };
  887. struct True_ : euml::euml_action<True_>
  888. {
  889. using euml_action<True_>::operator=;
  890. True_(){}
  891. template <class Event,class FSM,class STATE >
  892. struct state_action_result
  893. {
  894. typedef bool type;
  895. };
  896. template <class EVT,class FSM,class SourceState,class TargetState>
  897. struct transition_action_result
  898. {
  899. typedef bool type;
  900. };
  901. typedef ::boost::fusion::set<state_action_tag,action_tag> tag_type;
  902. template <class EVT,class FSM,class SourceState,class TargetState>
  903. bool operator()(EVT const&,FSM&,SourceState& ,TargetState& )
  904. {
  905. return true;
  906. }
  907. template <class Event,class FSM,class STATE>
  908. bool operator()(Event const&,FSM&,STATE& )
  909. {
  910. return true;
  911. }
  912. };
  913. True_ const true_ = True_();
  914. struct False_ : euml::euml_action<False_>
  915. {
  916. using euml_action<False_>::operator=;
  917. False_(){}
  918. template <class Event,class FSM,class STATE >
  919. struct state_action_result
  920. {
  921. typedef bool type;
  922. };
  923. template <class EVT,class FSM,class SourceState,class TargetState>
  924. struct transition_action_result
  925. {
  926. typedef bool type;
  927. };
  928. typedef ::boost::fusion::set<state_action_tag,action_tag> tag_type;
  929. template <class EVT,class FSM,class SourceState,class TargetState>
  930. bool operator()(EVT const&,FSM&,SourceState& ,TargetState& )
  931. {
  932. return false;
  933. }
  934. template <class Event,class FSM,class STATE>
  935. bool operator()(Event const&,FSM&,STATE& )
  936. {
  937. return false;
  938. }
  939. };
  940. False_ const false_ = False_();
  941. template <int Val>
  942. struct Int_ : euml_action<Int_<Val> >
  943. {
  944. using euml_action<Int_<Val> >::operator=;
  945. typedef ::boost::mpl::int_<Val> value_type;
  946. enum {value = Val};
  947. template <class Event,class FSM,class STATE >
  948. struct state_action_result
  949. {
  950. typedef int type;
  951. };
  952. template <class EVT,class FSM,class SourceState,class TargetState>
  953. struct transition_action_result
  954. {
  955. typedef int type;
  956. };
  957. typedef ::boost::fusion::set<state_action_tag,action_tag> tag_type;
  958. template <class EVT,class FSM,class SourceState,class TargetState>
  959. int operator()(EVT const& , FSM& ,SourceState& ,TargetState& )
  960. {
  961. return Val;
  962. }
  963. template <class Event,class FSM,class STATE>
  964. int operator()(Event const& ,FSM& ,STATE& )
  965. {
  966. return Val;
  967. }
  968. };
  969. template <char Val>
  970. struct Char_ : euml_action<Char_<Val> >
  971. {
  972. using euml_action<Char_<Val> >::operator=;
  973. template <class Event,class FSM,class STATE >
  974. struct state_action_result
  975. {
  976. typedef char type;
  977. };
  978. template <class EVT,class FSM,class SourceState,class TargetState>
  979. struct transition_action_result
  980. {
  981. typedef char type;
  982. };
  983. typedef ::boost::fusion::set<state_action_tag,action_tag> tag_type;
  984. template <class EVT,class FSM,class SourceState,class TargetState>
  985. char operator()(EVT const& , FSM& ,SourceState& ,TargetState& )
  986. {
  987. return Val;
  988. }
  989. template <class Event,class FSM,class STATE>
  990. char operator()(Event const& ,FSM& ,STATE& )
  991. {
  992. return Val;
  993. }
  994. };
  995. template <size_t Val>
  996. struct Size_t_ : euml_action<Size_t_<Val> >
  997. {
  998. using euml_action<Size_t_<Val> >::operator=;
  999. template <class Event,class FSM,class STATE >
  1000. struct state_action_result
  1001. {
  1002. typedef size_t type;
  1003. };
  1004. template <class EVT,class FSM,class SourceState,class TargetState>
  1005. struct transition_action_result
  1006. {
  1007. typedef size_t type;
  1008. };
  1009. typedef ::boost::fusion::set<state_action_tag,action_tag> tag_type;
  1010. template <class EVT,class FSM,class SourceState,class TargetState>
  1011. size_t operator()(EVT const& , FSM& ,SourceState& ,TargetState& )
  1012. {
  1013. return Val;
  1014. }
  1015. template <class Event,class FSM,class STATE>
  1016. size_t operator()(Event const& ,FSM& ,STATE& )
  1017. {
  1018. return Val;
  1019. }
  1020. };
  1021. #if BOOST_VERSION >= 104000
  1022. template <class T>
  1023. struct String_ : euml_action<String_<T> >
  1024. {
  1025. using euml_action<String_<T> >::operator=;
  1026. template <class Event,class FSM,class STATE >
  1027. struct state_action_result
  1028. {
  1029. typedef char const* type;
  1030. };
  1031. template <class EVT,class FSM,class SourceState,class TargetState>
  1032. struct transition_action_result
  1033. {
  1034. typedef char const* type;
  1035. };
  1036. typedef ::boost::fusion::set<state_action_tag,action_tag> tag_type;
  1037. template <class EVT,class FSM,class SourceState,class TargetState>
  1038. char const* operator()(EVT const& , FSM& ,SourceState& ,TargetState& )
  1039. {
  1040. return ::boost::mpl::c_str<T>::value;
  1041. }
  1042. template <class Event,class FSM,class STATE>
  1043. char const* operator()(Event const& ,FSM& ,STATE& )
  1044. {
  1045. return ::boost::mpl::c_str<T>::value;
  1046. }
  1047. };
  1048. #endif
  1049. template <class T>
  1050. struct Predicate_ : euml_action<Predicate_<T> >
  1051. {
  1052. using euml_action<Predicate_<T> >::operator=;
  1053. template <class Event,class FSM,class STATE >
  1054. struct state_action_result
  1055. {
  1056. typedef T type;
  1057. };
  1058. template <class EVT,class FSM,class SourceState,class TargetState>
  1059. struct transition_action_result
  1060. {
  1061. typedef T type;
  1062. };
  1063. typedef ::boost::fusion::set<state_action_tag,action_tag> tag_type;
  1064. template <class EVT,class FSM,class SourceState,class TargetState>
  1065. T operator()(EVT const& , FSM& ,SourceState& ,TargetState& )
  1066. {
  1067. return T();
  1068. }
  1069. template <class Event,class FSM,class STATE>
  1070. T operator()(Event const& ,FSM& ,STATE& )
  1071. {
  1072. return T();
  1073. }
  1074. };
  1075. template <class ToProcessEvt,class Param1, class Param2, class Param3, class Param4>
  1076. struct Process_ : euml_action<Process_<ToProcessEvt, Param1, Param2, Param3, Param4> >
  1077. {
  1078. template <class Event,class FSM,class STATE >
  1079. struct state_action_result
  1080. {
  1081. typedef void type;
  1082. };
  1083. template <class EVT,class FSM,class SourceState,class TargetState>
  1084. struct transition_action_result
  1085. {
  1086. typedef void type;
  1087. };
  1088. typedef ::boost::fusion::set<state_action_tag,action_tag> tag_type;
  1089. template <class EVT,class FSM,class SourceState,class TargetState>
  1090. void operator()(EVT const& evt,FSM& fsm,SourceState& src,TargetState& tgt)const
  1091. {
  1092. (Param1()(evt,fsm,src,tgt)).process_event(ToProcessEvt());
  1093. (Param2()(evt,fsm,src,tgt)).process_event(ToProcessEvt());
  1094. (Param3()(evt,fsm,src,tgt)).process_event(ToProcessEvt());
  1095. (Param4()(evt,fsm,src,tgt)).process_event(ToProcessEvt());
  1096. }
  1097. template <class Event,class FSM,class STATE>
  1098. void operator()(Event const& evt,FSM& fsm,STATE& state)const
  1099. {
  1100. (Param1()(evt,fsm,state)).process_event(ToProcessEvt());
  1101. (Param2()(evt,fsm,state)).process_event(ToProcessEvt());
  1102. (Param3()(evt,fsm,state)).process_event(ToProcessEvt());
  1103. (Param4()(evt,fsm,state)).process_event(ToProcessEvt());
  1104. }
  1105. };
  1106. template <class ToProcessEvt>
  1107. struct Process_ <ToProcessEvt,void,void,void,void>
  1108. : euml_action<Process_<ToProcessEvt, void, void, void, void > >
  1109. {
  1110. template <class Event,class FSM,class STATE >
  1111. struct state_action_result
  1112. {
  1113. typedef void type;
  1114. };
  1115. template <class EVT,class FSM,class SourceState,class TargetState>
  1116. struct transition_action_result
  1117. {
  1118. typedef void type;
  1119. };
  1120. typedef ::boost::fusion::set<state_action_tag,action_tag> tag_type;
  1121. template <class EVT,class FSM,class SourceState,class TargetState>
  1122. void operator()(EVT const&,FSM& fsm,SourceState& ,TargetState& )const
  1123. {
  1124. fsm.process_event(ToProcessEvt());
  1125. }
  1126. template <class Event,class FSM,class STATE>
  1127. void operator()(Event const& ,FSM& fsm,STATE& )const
  1128. {
  1129. fsm.process_event(ToProcessEvt());
  1130. }
  1131. };
  1132. template <class ToProcessEvt,class Param1>
  1133. struct Process_ <ToProcessEvt,Param1,void,void,void>
  1134. : euml_action<Process_<ToProcessEvt, Param1, void, void, void> >
  1135. {
  1136. template <class Event,class FSM,class STATE >
  1137. struct state_action_result
  1138. {
  1139. typedef void type;
  1140. };
  1141. template <class EVT,class FSM,class SourceState,class TargetState>
  1142. struct transition_action_result
  1143. {
  1144. typedef void type;
  1145. };
  1146. typedef ::boost::fusion::set<state_action_tag,action_tag> tag_type;
  1147. template <class EVT,class FSM,class SourceState,class TargetState>
  1148. void operator()(EVT const& evt,FSM& fsm,SourceState& src,TargetState& tgt)const
  1149. {
  1150. (Param1()(evt,fsm,src,tgt)).process_event(ToProcessEvt());
  1151. }
  1152. template <class Event,class FSM,class STATE>
  1153. void operator()(Event const& evt,FSM& fsm,STATE& state)const
  1154. {
  1155. (Param1()(evt,fsm,state)).process_event(ToProcessEvt());
  1156. }
  1157. };
  1158. template <class ToProcessEvt,class Param1, class Param2>
  1159. struct Process_ <ToProcessEvt,Param1,Param2,void,void>
  1160. : euml_action<Process_<ToProcessEvt, Param1, Param2, void, void> >
  1161. {
  1162. template <class Event,class FSM,class STATE >
  1163. struct state_action_result
  1164. {
  1165. typedef void type;
  1166. };
  1167. template <class EVT,class FSM,class SourceState,class TargetState>
  1168. struct transition_action_result
  1169. {
  1170. typedef void type;
  1171. };
  1172. typedef ::boost::fusion::set<state_action_tag,action_tag> tag_type;
  1173. template <class EVT,class FSM,class SourceState,class TargetState>
  1174. void operator()(EVT const& evt,FSM& fsm,SourceState& src,TargetState& tgt)const
  1175. {
  1176. (Param1()(evt,fsm,src,tgt)).process_event(ToProcessEvt());
  1177. (Param2()(evt,fsm,src,tgt)).process_event(ToProcessEvt());
  1178. }
  1179. template <class Event,class FSM,class STATE>
  1180. void operator()(Event const& evt,FSM& fsm,STATE& state)const
  1181. {
  1182. (Param1()(evt,fsm,state)).process_event(ToProcessEvt());
  1183. (Param2()(evt,fsm,state)).process_event(ToProcessEvt());
  1184. }
  1185. };
  1186. template <class ToProcessEvt,class Param1, class Param2, class Param3>
  1187. struct Process_ <ToProcessEvt,Param1,Param2,Param3,void>
  1188. : euml_action<Process_<ToProcessEvt, Param1, Param2, Param3, void> >
  1189. {
  1190. template <class Event,class FSM,class STATE >
  1191. struct state_action_result
  1192. {
  1193. typedef void type;
  1194. };
  1195. template <class EVT,class FSM,class SourceState,class TargetState>
  1196. struct transition_action_result
  1197. {
  1198. typedef void type;
  1199. };
  1200. typedef ::boost::fusion::set<state_action_tag,action_tag> tag_type;
  1201. template <class EVT,class FSM,class SourceState,class TargetState>
  1202. void operator()(EVT const& evt,FSM& fsm,SourceState& src,TargetState& tgt)const
  1203. {
  1204. (Param1()(evt,fsm,src,tgt)).process_event(ToProcessEvt());
  1205. (Param2()(evt,fsm,src,tgt)).process_event(ToProcessEvt());
  1206. (Param3()(evt,fsm,src,tgt)).process_event(ToProcessEvt());
  1207. }
  1208. template <class Event,class FSM,class STATE>
  1209. void operator()(Event const& evt,FSM& fsm,STATE& state)const
  1210. {
  1211. (Param1()(evt,fsm,state)).process_event(ToProcessEvt());
  1212. (Param2()(evt,fsm,state)).process_event(ToProcessEvt());
  1213. (Param3()(evt,fsm,state)).process_event(ToProcessEvt());
  1214. }
  1215. };
  1216. //version for process_(event_)
  1217. template <>
  1218. struct Process_ <GetEvent_<void>,void,void,void,void>
  1219. : euml_action<Process_<GetEvent_<void>, void, void, void, void > >
  1220. {
  1221. template <class Event,class FSM,class STATE >
  1222. struct state_action_result
  1223. {
  1224. typedef void type;
  1225. };
  1226. template <class EVT,class FSM,class SourceState,class TargetState>
  1227. struct transition_action_result
  1228. {
  1229. typedef void type;
  1230. };
  1231. typedef ::boost::fusion::set<state_action_tag,action_tag> tag_type;
  1232. template <class EVT,class FSM,class SourceState,class TargetState>
  1233. void operator()(EVT const& evt,FSM& fsm,SourceState& ,TargetState& )const
  1234. {
  1235. fsm.process_event(evt);
  1236. }
  1237. template <class Event,class FSM,class STATE>
  1238. void operator()(Event const& evt,FSM& fsm,STATE& )const
  1239. {
  1240. fsm.process_event(evt);
  1241. }
  1242. };
  1243. struct process_tag {};
  1244. struct Process_Helper: proto::extends< proto::terminal<process_tag>::type, Process_Helper, boost::msm::sm_domain>
  1245. {
  1246. Process_Helper(){}
  1247. using proto::extends< proto::terminal<process_tag>::type, Process_Helper, boost::msm::sm_domain>::operator=;
  1248. template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5
  1249. #ifdef BOOST_MSVC
  1250. ,class Arg6
  1251. #endif
  1252. >
  1253. struct In
  1254. {
  1255. typedef Process_<Arg1,Arg2,Arg3,Arg4,Arg5> type;
  1256. };
  1257. };
  1258. Process_Helper const process_ = Process_Helper();
  1259. template <class Param1, class Param2, class Param3, class Param4>
  1260. struct Reprocess_ : euml_action<Reprocess_<Param1, Param2, Param3, Param4> >
  1261. {
  1262. template <class Event,class FSM,class STATE >
  1263. struct state_action_result
  1264. {
  1265. typedef void type;
  1266. };
  1267. template <class EVT,class FSM,class SourceState,class TargetState>
  1268. struct transition_action_result
  1269. {
  1270. typedef void type;
  1271. };
  1272. typedef ::boost::fusion::set<state_action_tag,action_tag> tag_type;
  1273. template <class EVT,class FSM,class SourceState,class TargetState>
  1274. void operator()(EVT const& evt,FSM& fsm,SourceState& src,TargetState& tgt)const
  1275. {
  1276. (Param1()(evt,fsm,src,tgt)).process_event(evt);
  1277. (Param2()(evt,fsm,src,tgt)).process_event(evt);
  1278. (Param3()(evt,fsm,src,tgt)).process_event(evt);
  1279. (Param4()(evt,fsm,src,tgt)).process_event(evt);
  1280. }
  1281. template <class Event,class FSM,class STATE>
  1282. void operator()(Event const& evt,FSM& fsm,STATE& state)const
  1283. {
  1284. (Param1()(evt,fsm,state)).process_event(evt);
  1285. (Param2()(evt,fsm,state)).process_event(evt);
  1286. (Param3()(evt,fsm,state)).process_event(evt);
  1287. (Param4()(evt,fsm,state)).process_event(evt);
  1288. }
  1289. };
  1290. template <>
  1291. struct Reprocess_ <void,void,void,void>
  1292. : euml_action<Reprocess_<void, void, void, void > >
  1293. {
  1294. template <class Event,class FSM,class STATE >
  1295. struct state_action_result
  1296. {
  1297. typedef void type;
  1298. };
  1299. template <class EVT,class FSM,class SourceState,class TargetState>
  1300. struct transition_action_result
  1301. {
  1302. typedef void type;
  1303. };
  1304. typedef ::boost::fusion::set<state_action_tag,action_tag> tag_type;
  1305. template <class EVT,class FSM,class SourceState,class TargetState>
  1306. void operator()(EVT const& evt,FSM& fsm,SourceState& ,TargetState& )const
  1307. {
  1308. fsm.process_event(evt);
  1309. }
  1310. template <class Event,class FSM,class STATE>
  1311. void operator()(Event const& evt,FSM& fsm,STATE& )const
  1312. {
  1313. fsm.process_event(evt);
  1314. }
  1315. };
  1316. template <class Param1>
  1317. struct Reprocess_ <Param1,void,void,void>
  1318. : euml_action<Reprocess_<Param1, void, void, void> >
  1319. {
  1320. template <class Event,class FSM,class STATE >
  1321. struct state_action_result
  1322. {
  1323. typedef void type;
  1324. };
  1325. template <class EVT,class FSM,class SourceState,class TargetState>
  1326. struct transition_action_result
  1327. {
  1328. typedef void type;
  1329. };
  1330. typedef ::boost::fusion::set<state_action_tag,action_tag> tag_type;
  1331. template <class EVT,class FSM,class SourceState,class TargetState>
  1332. void operator()(EVT const& evt,FSM& fsm,SourceState& src,TargetState& tgt)const
  1333. {
  1334. (Param1()(evt,fsm,src,tgt)).process_event(evt);
  1335. }
  1336. template <class Event,class FSM,class STATE>
  1337. void operator()(Event const& evt,FSM& fsm,STATE& state)const
  1338. {
  1339. (Param1()(evt,fsm,state)).process_event(evt);
  1340. }
  1341. };
  1342. template <class Param1, class Param2>
  1343. struct Reprocess_ <Param1,Param2,void,void>
  1344. : euml_action<Reprocess_<Param1, Param2, void, void> >
  1345. {
  1346. template <class Event,class FSM,class STATE >
  1347. struct state_action_result
  1348. {
  1349. typedef void type;
  1350. };
  1351. template <class EVT,class FSM,class SourceState,class TargetState>
  1352. struct transition_action_result
  1353. {
  1354. typedef void type;
  1355. };
  1356. typedef ::boost::fusion::set<state_action_tag,action_tag> tag_type;
  1357. template <class EVT,class FSM,class SourceState,class TargetState>
  1358. void operator()(EVT const& evt,FSM& fsm,SourceState& src,TargetState& tgt)const
  1359. {
  1360. (Param1()(evt,fsm,src,tgt)).process_event(evt);
  1361. (Param2()(evt,fsm,src,tgt)).process_event(evt);
  1362. }
  1363. template <class Event,class FSM,class STATE>
  1364. void operator()(Event const& evt,FSM& fsm,STATE& state)const
  1365. {
  1366. (Param1()(evt,fsm,state)).process_event(evt);
  1367. (Param2()(evt,fsm,state)).process_event(evt);
  1368. }
  1369. };
  1370. template <class Param1, class Param2, class Param3>
  1371. struct Reprocess_ <Param1,Param2,Param3,void>
  1372. : euml_action<Reprocess_<Param1, Param2, Param3, void> >
  1373. {
  1374. template <class Event,class FSM,class STATE >
  1375. struct state_action_result
  1376. {
  1377. typedef void type;
  1378. };
  1379. template <class EVT,class FSM,class SourceState,class TargetState>
  1380. struct transition_action_result
  1381. {
  1382. typedef void type;
  1383. };
  1384. typedef ::boost::fusion::set<state_action_tag,action_tag> tag_type;
  1385. template <class EVT,class FSM,class SourceState,class TargetState>
  1386. void operator()(EVT const& evt,FSM& fsm,SourceState& src,TargetState& tgt)const
  1387. {
  1388. (Param1()(evt,fsm,src,tgt)).process_event(evt);
  1389. (Param2()(evt,fsm,src,tgt)).process_event(evt);
  1390. (Param3()(evt,fsm,src,tgt)).process_event(evt);
  1391. }
  1392. template <class Event,class FSM,class STATE>
  1393. void operator()(Event const& evt,FSM& fsm,STATE& state)const
  1394. {
  1395. (Param1()(evt,fsm,state)).process_event(evt);
  1396. (Param2()(evt,fsm,state)).process_event(evt);
  1397. (Param3()(evt,fsm,state)).process_event(evt);
  1398. }
  1399. };
  1400. struct reprocess_tag {};
  1401. struct Reprocess_Helper: proto::extends< proto::terminal<reprocess_tag>::type, Reprocess_Helper, boost::msm::sm_domain>
  1402. {
  1403. Reprocess_Helper(){}
  1404. using proto::extends< proto::terminal<reprocess_tag>::type, Reprocess_Helper, boost::msm::sm_domain>::operator=;
  1405. template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5
  1406. #ifdef BOOST_MSVC
  1407. ,class Arg6
  1408. #endif
  1409. >
  1410. struct In
  1411. {
  1412. typedef Reprocess_<Arg1,Arg2,Arg3,Arg4> type;
  1413. };
  1414. };
  1415. Reprocess_Helper const reprocess_ = Reprocess_Helper();
  1416. template <class ToProcessEvt,class Value,class Param1, class Param2, class Param3>
  1417. struct Process2_ : euml_action<Process2_<ToProcessEvt,Value, Param1, Param2, Param3> >
  1418. {
  1419. template <class Event,class FSM,class STATE >
  1420. struct state_action_result
  1421. {
  1422. typedef void type;
  1423. };
  1424. template <class EVT,class FSM,class SourceState,class TargetState>
  1425. struct transition_action_result
  1426. {
  1427. typedef void type;
  1428. };
  1429. typedef ::boost::fusion::set<state_action_tag,action_tag> tag_type;
  1430. template <class EVT,class FSM,class SourceState,class TargetState>
  1431. void operator()(EVT const& evt,FSM& fsm,SourceState& src,TargetState& tgt)const
  1432. {
  1433. (Param1()(evt,fsm,src,tgt)).process_event(ToProcessEvt(Value()(evt,fsm,src,tgt)));
  1434. (Param2()(evt,fsm,src,tgt)).process_event(ToProcessEvt(Value()(evt,fsm,src,tgt)));
  1435. (Param3()(evt,fsm,src,tgt)).process_event(ToProcessEvt(Value()(evt,fsm,src,tgt)));
  1436. }
  1437. template <class Event,class FSM,class STATE>
  1438. void operator()(Event const& evt,FSM& fsm,STATE& state)const
  1439. {
  1440. (Param1()(evt,fsm,state)).process_event(ToProcessEvt(Value()(evt,fsm,state)));
  1441. (Param2()(evt,fsm,state)).process_event(ToProcessEvt(Value()(evt,fsm,state)));
  1442. (Param3()(evt,fsm,state)).process_event(ToProcessEvt(Value()(evt,fsm,state)));
  1443. }
  1444. };
  1445. template <class ToProcessEvt,class Value>
  1446. struct Process2_ <ToProcessEvt,Value,void,void,void>
  1447. : euml_action<Process2_<ToProcessEvt,Value, void, void, void > >
  1448. {
  1449. template <class Event,class FSM,class STATE >
  1450. struct state_action_result
  1451. {
  1452. typedef void type;
  1453. };
  1454. template <class EVT,class FSM,class SourceState,class TargetState>
  1455. struct transition_action_result
  1456. {
  1457. typedef void type;
  1458. };
  1459. typedef ::boost::fusion::set<state_action_tag,action_tag> tag_type;
  1460. template <class EVT,class FSM,class SourceState,class TargetState>
  1461. void operator()(EVT const& evt,FSM& fsm,SourceState& src,TargetState& tgt)const
  1462. {
  1463. fsm.process_event(ToProcessEvt(Value()(evt,fsm,src,tgt)));
  1464. }
  1465. template <class Event,class FSM,class STATE>
  1466. void operator()(Event const& evt,FSM& fsm,STATE& state)const
  1467. {
  1468. fsm.process_event(ToProcessEvt(Value()(evt,fsm,state)));
  1469. }
  1470. };
  1471. template <class ToProcessEvt,class Value,class Param1>
  1472. struct Process2_ <ToProcessEvt,Value,Param1,void,void>
  1473. : euml_action<Process2_<ToProcessEvt,Value, Param1, void, void> >
  1474. {
  1475. template <class Event,class FSM,class STATE >
  1476. struct state_action_result
  1477. {
  1478. typedef void type;
  1479. };
  1480. template <class EVT,class FSM,class SourceState,class TargetState>
  1481. struct transition_action_result
  1482. {
  1483. typedef void type;
  1484. };
  1485. typedef ::boost::fusion::set<state_action_tag,action_tag> tag_type;
  1486. template <class EVT,class FSM,class SourceState,class TargetState>
  1487. void operator()(EVT const& evt,FSM& fsm,SourceState& src,TargetState& tgt)const
  1488. {
  1489. (Param1()(evt,fsm,src,tgt)).process_event(ToProcessEvt(Value()(evt,fsm,src,tgt)));
  1490. }
  1491. template <class Event,class FSM,class STATE>
  1492. void operator()(Event const& evt,FSM& fsm,STATE& state)const
  1493. {
  1494. (Param1()(evt,fsm,state)).process_event(ToProcessEvt(Value()(evt,fsm,state)));
  1495. }
  1496. };
  1497. template <class ToProcessEvt,class Value,class Param1, class Param2>
  1498. struct Process2_ <ToProcessEvt,Value,Param1,Param2,void>
  1499. : euml_action<Process2_<ToProcessEvt,Value, Param1, Param2, void> >
  1500. {
  1501. template <class Event,class FSM,class STATE >
  1502. struct state_action_result
  1503. {
  1504. typedef void type;
  1505. };
  1506. template <class EVT,class FSM,class SourceState,class TargetState>
  1507. struct transition_action_result
  1508. {
  1509. typedef void type;
  1510. };
  1511. typedef ::boost::fusion::set<state_action_tag,action_tag> tag_type;
  1512. template <class EVT,class FSM,class SourceState,class TargetState>
  1513. void operator()(EVT const& evt,FSM& fsm,SourceState& src,TargetState& tgt)const
  1514. {
  1515. (Param1()(evt,fsm,src,tgt)).process_event(ToProcessEvt(Value()(evt,fsm,src,tgt)));
  1516. (Param2()(evt,fsm,src,tgt)).process_event(ToProcessEvt(Value()(evt,fsm,src,tgt)));
  1517. }
  1518. template <class Event,class FSM,class STATE>
  1519. void operator()(Event const& evt,FSM& fsm,STATE& state)const
  1520. {
  1521. (Param1()(evt,fsm,state)).process_event(ToProcessEvt(Value()(evt,fsm,state)));
  1522. (Param2()(evt,fsm,state)).process_event(ToProcessEvt(Value()(evt,fsm,state)));
  1523. }
  1524. };
  1525. struct process2_tag {};
  1526. struct Process2_Helper : proto::extends< proto::terminal<process2_tag>::type, Process2_Helper, boost::msm::sm_domain>
  1527. {
  1528. Process2_Helper(){}
  1529. using proto::extends< proto::terminal<process2_tag>::type, Process2_Helper, boost::msm::sm_domain>::operator=;
  1530. template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5
  1531. #ifdef BOOST_MSVC
  1532. ,class Arg6
  1533. #endif
  1534. >
  1535. struct In
  1536. {
  1537. typedef Process2_<Arg1,Arg2,Arg3,Arg4,Arg5> type;
  1538. };
  1539. };
  1540. Process2_Helper const process2_ = Process2_Helper();
  1541. template <class Flag,class Param1=void, class Enable=void >
  1542. struct Get_Flag_ : euml_action<Get_Flag_<Flag,Param1,Enable> > {};
  1543. template <class Flag,class Param1>
  1544. struct Get_Flag_ <Flag,Param1
  1545. , typename ::boost::enable_if<typename ::boost::is_same<Param1,void>::type >::type>
  1546. : euml_action<Get_Flag_<Flag, Param1> >
  1547. {
  1548. template <class Event,class FSM,class STATE >
  1549. struct state_action_result
  1550. {
  1551. typedef bool type;
  1552. };
  1553. template <class EVT,class FSM,class SourceState,class TargetState>
  1554. struct transition_action_result
  1555. {
  1556. typedef bool type;
  1557. };
  1558. typedef ::boost::fusion::set<state_action_tag,action_tag> tag_type;
  1559. template <class EVT,class FSM,class SourceState,class TargetState>
  1560. bool operator()(EVT const&,FSM& fsm,SourceState& ,TargetState& )const
  1561. {
  1562. return fsm.template is_flag_active<Flag>();
  1563. }
  1564. template <class Event,class FSM,class STATE>
  1565. bool operator()(Event const& ,FSM& fsm,STATE& )const
  1566. {
  1567. return fsm.template is_flag_active<Flag>();
  1568. }
  1569. };
  1570. template <class Flag,class Param1>
  1571. struct Get_Flag_ <Flag,Param1
  1572. , typename ::boost::disable_if<
  1573. typename ::boost::is_same<Param1,void>::type
  1574. >::type>
  1575. : euml_action<Get_Flag_<Flag, Param1> >
  1576. {
  1577. template <class Event,class FSM,class STATE >
  1578. struct state_action_result
  1579. {
  1580. typedef bool type;
  1581. };
  1582. template <class EVT,class FSM,class SourceState,class TargetState>
  1583. struct transition_action_result
  1584. {
  1585. typedef bool type;
  1586. };
  1587. typedef ::boost::fusion::set<state_action_tag,action_tag> tag_type;
  1588. template <class EVT,class FSM,class SourceState,class TargetState>
  1589. bool operator()(EVT const& evt,FSM& fsm,SourceState& src,TargetState& tgt)const
  1590. {
  1591. return (Param1()(evt,fsm,src,tgt)).template is_flag_active<Flag>();
  1592. }
  1593. template <class Event,class FSM,class STATE>
  1594. bool operator()(Event const& evt,FSM& fsm,STATE& state)const
  1595. {
  1596. return (Param1()(evt,fsm,state)).template is_flag_active<Flag>();
  1597. }
  1598. };
  1599. struct Get_Flag_Helper: proto::extends< proto::terminal<fsm_artefact_tag>::type, Get_Flag_Helper, boost::msm::sm_domain>
  1600. {
  1601. Get_Flag_Helper(){}
  1602. template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5
  1603. #ifdef BOOST_MSVC
  1604. ,class Arg6
  1605. #endif
  1606. >
  1607. struct In
  1608. {
  1609. typedef Get_Flag_<Arg1,Arg2> type;
  1610. };
  1611. };
  1612. Get_Flag_Helper const is_flag_ = Get_Flag_Helper();
  1613. // deferring an event
  1614. struct DeferEvent_ : euml_action< DeferEvent_ >
  1615. {
  1616. typedef ::boost::fusion::set<action_tag> tag_type;
  1617. // mark as deferring to avoid stack overflows in certain conditions
  1618. typedef int deferring_action;
  1619. template <class EVT,class FSM,class SourceState,class TargetState>
  1620. void operator()(EVT const& evt,FSM& fsm,SourceState& ,TargetState& ) const
  1621. {
  1622. fsm.defer_event(evt);
  1623. }
  1624. };
  1625. struct Defer_Helper : proto::extends< proto::terminal<fsm_artefact_tag>::type, Defer_Helper, boost::msm::sm_domain>
  1626. {
  1627. Defer_Helper(){}
  1628. using proto::extends< proto::terminal<fsm_artefact_tag>::type, Defer_Helper, boost::msm::sm_domain>::operator=;
  1629. template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5
  1630. #ifdef BOOST_MSVC
  1631. ,class Arg6
  1632. #endif
  1633. >
  1634. struct In
  1635. {
  1636. typedef DeferEvent_ type;
  1637. };
  1638. };
  1639. Defer_Helper const defer_ = Defer_Helper();
  1640. struct explicit_tag {};
  1641. struct Explicit_Helper : proto::extends< proto::terminal<explicit_tag>::type, Explicit_Helper, boost::msm::sm_domain>
  1642. {
  1643. Explicit_Helper(){}
  1644. using proto::extends< proto::terminal<explicit_tag>::type, Explicit_Helper, boost::msm::sm_domain>::operator=;
  1645. template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5
  1646. #ifdef BOOST_MSVC
  1647. ,class Arg6
  1648. #endif
  1649. >
  1650. struct In
  1651. {
  1652. typedef typename Arg1::template direct<Arg2> type;
  1653. };
  1654. };
  1655. Explicit_Helper const explicit_ = Explicit_Helper();
  1656. struct entry_pt_tag {};
  1657. struct Entry_Pt_Helper : proto::extends< proto::terminal<entry_pt_tag>::type, Entry_Pt_Helper, boost::msm::sm_domain>
  1658. {
  1659. Entry_Pt_Helper(){}
  1660. using proto::extends< proto::terminal<entry_pt_tag>::type, Entry_Pt_Helper, boost::msm::sm_domain>::operator=;
  1661. template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5
  1662. #ifdef BOOST_MSVC
  1663. ,class Arg6
  1664. #endif
  1665. >
  1666. struct In
  1667. {
  1668. typedef typename Arg1::template entry_pt<Arg2> type;
  1669. };
  1670. };
  1671. Entry_Pt_Helper const entry_pt_ = Entry_Pt_Helper();
  1672. struct exit_pt_tag {};
  1673. struct Exit_Pt_Helper : proto::extends< proto::terminal<exit_pt_tag>::type, Exit_Pt_Helper, boost::msm::sm_domain>
  1674. {
  1675. Exit_Pt_Helper(){}
  1676. using proto::extends< proto::terminal<exit_pt_tag>::type, Exit_Pt_Helper, boost::msm::sm_domain>::operator=;
  1677. template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5
  1678. #ifdef BOOST_MSVC
  1679. ,class Arg6
  1680. #endif
  1681. >
  1682. struct In
  1683. {
  1684. typedef typename Arg1::template exit_pt<Arg2> type;
  1685. };
  1686. };
  1687. Exit_Pt_Helper const exit_pt_ = Exit_Pt_Helper();
  1688. #ifdef BOOST_MSVC
  1689. #define BOOST_MSM_EUML_FUNCTION(functor,function,function_name,result_trans,result_state) \
  1690. template <class Param1=void , class Param2=void , class Param3=void , class Param4=void, \
  1691. class Param5=void,class Param6=void,class Enable=void > \
  1692. struct functor : euml_action<functor<Param1,Param2,Param3,Param4,Param5,Param6,Enable> > {}; \
  1693. template <class Param1, class Param2, class Param3, class Param4, class Param5, class Param6> \
  1694. struct functor<Param1,Param2,Param3,Param4,Param5,Param6, \
  1695. typename ::boost::enable_if<typename ::boost::is_same<Param1,void>::type>::type> \
  1696. : euml_action<functor<Param1,Param2,Param3,Param4,Param5,Param6> > { \
  1697. template <class Event,class FSM,class STATE > struct state_action_result { \
  1698. typedef result_state type;} ; \
  1699. template <class EVT,class FSM,class SourceState,class TargetState> \
  1700. struct transition_action_result { typedef result_trans type;}; \
  1701. typedef ::boost::fusion::set<boost::msm::front::state_action_tag,boost::msm::front::action_tag> tag_type; \
  1702. template <class EVT,class FSM,class SourceState,class TargetState> \
  1703. typename transition_action_result<EVT,FSM,SourceState,TargetState>::type \
  1704. operator()(EVT const& , FSM& ,SourceState& ,TargetState& )const { \
  1705. return function ();} \
  1706. template <class Event,class FSM,class STATE> \
  1707. typename state_action_result<Event,FSM,STATE>::type \
  1708. operator()(Event const& ,FSM& ,STATE& )const { \
  1709. return function ();} }; \
  1710. template <class Param1, class Param2, class Param3, class Param4, class Param5,class Param6> \
  1711. struct functor<Param1,Param2,Param3,Param4,Param5,Param6, \
  1712. typename ::boost::disable_if<typename ::boost::mpl::or_< \
  1713. typename ::boost::is_same<Param1,void>::type,typename ::boost::mpl::not_< \
  1714. typename ::boost::is_same<Param2,void>::type>::type>::type >::type> \
  1715. : euml_action<functor<Param1,Param2,Param3,Param4,Param5,Param6> > { \
  1716. template <class Event,class FSM,class STATE > struct state_action_result { \
  1717. typedef result_state type;} ; \
  1718. template <class EVT,class FSM,class SourceState,class TargetState> \
  1719. struct transition_action_result { typedef result_trans type;}; \
  1720. typedef ::boost::fusion::set<boost::msm::front::state_action_tag,boost::msm::front::action_tag> tag_type; \
  1721. template <class EVT,class FSM,class SourceState,class TargetState> \
  1722. typename ::boost::enable_if<typename ::boost::mpl::has_key< \
  1723. typename Param1::tag_type,boost::msm::front::action_tag>::type, \
  1724. typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type \
  1725. operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const { \
  1726. return function (Param1()(evt,fsm,src,tgt));} \
  1727. template <class Event,class FSM,class STATE> \
  1728. typename ::boost::enable_if<typename ::boost::mpl::has_key< \
  1729. typename Param1::tag_type,boost::msm::front::state_action_tag>::type, \
  1730. typename state_action_result<Event,FSM,STATE>::type >::type \
  1731. operator()(Event const& evt,FSM& fsm,STATE& state )const { \
  1732. return function (Param1()(evt,fsm,state));} }; \
  1733. template <class Param1, class Param2, class Param3, class Param4, class Param5,class Param6> \
  1734. struct functor<Param1,Param2,Param3,Param4,Param5,Param6, \
  1735. typename ::boost::disable_if<typename ::boost::mpl::or_< \
  1736. typename ::boost::is_same<Param2,void>::type,typename ::boost::mpl::not_< \
  1737. typename ::boost::is_same<Param3,void>::type>::type>::type >::type> \
  1738. : euml_action<functor<Param1,Param2,Param3,Param4,Param5,Param6> > { \
  1739. template <class Event,class FSM,class STATE > struct state_action_result { \
  1740. typedef result_state type;} ; \
  1741. template <class EVT,class FSM,class SourceState,class TargetState> \
  1742. struct transition_action_result { typedef result_trans type;}; \
  1743. typedef ::boost::fusion::set<boost::msm::front::state_action_tag,boost::msm::front::action_tag> tag_type; \
  1744. template <class EVT,class FSM,class SourceState,class TargetState> \
  1745. typename ::boost::enable_if<typename ::boost::mpl::has_key< \
  1746. typename Param1::tag_type,boost::msm::front::action_tag>::type, \
  1747. typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type \
  1748. operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const { \
  1749. return function (Param1()(evt,fsm,src,tgt),Param2()(evt,fsm,src,tgt));} \
  1750. template <class Event,class FSM,class STATE> \
  1751. typename ::boost::enable_if<typename ::boost::mpl::has_key< \
  1752. typename Param1::tag_type,boost::msm::front::state_action_tag>::type, \
  1753. typename state_action_result<Event,FSM,STATE>::type >::type \
  1754. operator()(Event const& evt,FSM& fsm,STATE& state )const { \
  1755. return function (Param1()(evt,fsm,state),Param2()(evt,fsm,state));} }; \
  1756. template <class Param1, class Param2, class Param3, class Param4, class Param5,class Param6> \
  1757. struct functor<Param1,Param2,Param3,Param4,Param5,Param6, \
  1758. typename ::boost::disable_if<typename ::boost::mpl::or_< \
  1759. typename ::boost::is_same<Param3,void>::type,typename ::boost::mpl::not_< \
  1760. typename ::boost::is_same<Param4,void>::type>::type>::type >::type> \
  1761. : euml_action<functor<Param1,Param2,Param3,Param4,Param5,Param6> > { \
  1762. template <class Event,class FSM,class STATE > struct state_action_result { \
  1763. typedef result_state type;} ; \
  1764. template <class EVT,class FSM,class SourceState,class TargetState> \
  1765. struct transition_action_result { typedef result_trans type;}; \
  1766. typedef ::boost::fusion::set<boost::msm::front::state_action_tag,boost::msm::front::action_tag> tag_type; \
  1767. template <class EVT,class FSM,class SourceState,class TargetState> \
  1768. typename ::boost::enable_if<typename ::boost::mpl::has_key< \
  1769. typename Param1::tag_type,boost::msm::front::action_tag>::type, \
  1770. typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type \
  1771. operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const { \
  1772. return function (Param1()(evt,fsm,src,tgt),Param2()(evt,fsm,src,tgt),Param3()(evt,fsm,src,tgt));} \
  1773. template <class Event,class FSM,class STATE> \
  1774. typename ::boost::enable_if<typename ::boost::mpl::has_key< \
  1775. typename Param1::tag_type,boost::msm::front::state_action_tag>::type, \
  1776. typename state_action_result<Event,FSM,STATE>::type >::type \
  1777. operator()(Event const& evt,FSM& fsm,STATE& state )const { \
  1778. return function (Param1()(evt,fsm,state),Param2()(evt,fsm,state),Param3()(evt,fsm,state));} }; \
  1779. template <class Param1, class Param2, class Param3, class Param4, class Param5,class Param6> \
  1780. struct functor<Param1,Param2,Param3,Param4,Param5,Param6, \
  1781. typename ::boost::disable_if<typename ::boost::mpl::or_< \
  1782. typename ::boost::is_same<Param4,void>::type,typename ::boost::mpl::not_< \
  1783. typename ::boost::is_same<Param5,void>::type>::type>::type >::type> \
  1784. : euml_action<functor<Param1,Param2,Param3,Param4,Param5,Param6> > { \
  1785. template <class Event,class FSM,class STATE > struct state_action_result { \
  1786. typedef result_state type;} ; \
  1787. template <class EVT,class FSM,class SourceState,class TargetState> \
  1788. struct transition_action_result { typedef result_trans type;}; \
  1789. typedef ::boost::fusion::set<boost::msm::front::state_action_tag,boost::msm::front::action_tag> tag_type; \
  1790. template <class EVT,class FSM,class SourceState,class TargetState> \
  1791. typename ::boost::enable_if<typename ::boost::mpl::has_key< \
  1792. typename Param1::tag_type,boost::msm::front::action_tag>::type, \
  1793. typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type \
  1794. operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const { \
  1795. return function (Param1()(evt,fsm,src,tgt),Param2()(evt,fsm,src,tgt),Param3()(evt,fsm,src,tgt) \
  1796. ,Param4()(evt,fsm,src,tgt));} \
  1797. template <class Event,class FSM,class STATE> \
  1798. typename ::boost::enable_if<typename ::boost::mpl::has_key< \
  1799. typename Param1::tag_type,boost::msm::front::state_action_tag>::type, \
  1800. typename state_action_result<Event,FSM,STATE>::type >::type \
  1801. operator()(Event const& evt,FSM& fsm,STATE& state )const { \
  1802. return function (Param1()(evt,fsm,state),Param2()(evt,fsm,state),Param3()(evt,fsm,state) \
  1803. ,Param4()(evt,fsm,state));} }; \
  1804. template <class Param1, class Param2, class Param3, class Param4, class Param5,class Param6> \
  1805. struct functor<Param1,Param2,Param3,Param4,Param5,Param6, \
  1806. typename ::boost::disable_if<typename ::boost::mpl::or_< \
  1807. typename ::boost::is_same<Param5,void>::type,typename ::boost::mpl::not_< \
  1808. typename ::boost::is_same<Param6,void>::type>::type>::type >::type> \
  1809. : euml_action<functor<Param1,Param2,Param3,Param4,Param5,Param6> > { \
  1810. template <class Event,class FSM,class STATE > struct state_action_result { \
  1811. typedef result_state type;} ; \
  1812. template <class EVT,class FSM,class SourceState,class TargetState> \
  1813. struct transition_action_result { typedef result_trans type;}; \
  1814. typedef ::boost::fusion::set<boost::msm::front::state_action_tag,boost::msm::front::action_tag> tag_type; \
  1815. template <class EVT,class FSM,class SourceState,class TargetState> \
  1816. typename ::boost::enable_if<typename ::boost::mpl::has_key< \
  1817. typename Param1::tag_type,boost::msm::front::action_tag>::type, \
  1818. typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type \
  1819. operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const { \
  1820. return function (Param1()(evt,fsm,src,tgt),Param2()(evt,fsm,src,tgt),Param3()(evt,fsm,src,tgt) \
  1821. ,Param4()(evt,fsm,src,tgt),Param5()(evt,fsm,src,tgt));} \
  1822. template <class Event,class FSM,class STATE> \
  1823. typename ::boost::enable_if<typename ::boost::mpl::has_key< \
  1824. typename Param1::tag_type,boost::msm::front::state_action_tag>::type, \
  1825. typename state_action_result<Event,FSM,STATE>::type >::type \
  1826. operator()(Event const& evt,FSM& fsm,STATE& state )const { \
  1827. return function (Param1()(evt,fsm,state),Param2()(evt,fsm,state),Param3()(evt,fsm,state) \
  1828. ,Param4()(evt,fsm,state),Param5()(evt,fsm,state));} }; \
  1829. template <class Param1, class Param2, class Param3, class Param4, class Param5,class Param6> \
  1830. struct functor<Param1,Param2,Param3,Param4,Param5,Param6, \
  1831. typename ::boost::disable_if<typename ::boost::is_same<Param6,void>::type>::type> \
  1832. : euml_action<functor<Param1,Param2,Param3,Param4,Param5,Param6> > { \
  1833. template <class Event,class FSM,class STATE > struct state_action_result { \
  1834. typedef result_state type;} ; \
  1835. template <class EVT,class FSM,class SourceState,class TargetState> \
  1836. struct transition_action_result { typedef result_trans type;}; \
  1837. typedef ::boost::fusion::set<boost::msm::front::state_action_tag,boost::msm::front::action_tag> tag_type; \
  1838. template <class EVT,class FSM,class SourceState,class TargetState> \
  1839. typename ::boost::enable_if<typename ::boost::mpl::has_key< \
  1840. typename Param1::tag_type,boost::msm::front::action_tag>::type, \
  1841. typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type \
  1842. operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const { \
  1843. return function (Param1()(evt,fsm,src,tgt),Param2()(evt,fsm,src,tgt),Param3()(evt,fsm,src,tgt) \
  1844. ,Param4()(evt,fsm,src,tgt),Param5()(evt,fsm,src,tgt),Param6()(evt,fsm,src,tgt));} \
  1845. template <class Event,class FSM,class STATE> \
  1846. typename ::boost::enable_if<typename ::boost::mpl::has_key< \
  1847. typename Param1::tag_type,boost::msm::front::state_action_tag>::type, \
  1848. typename state_action_result<Event,FSM,STATE>::type >::type \
  1849. operator()(Event const& evt,FSM& fsm,STATE& state )const { \
  1850. return function (Param1()(evt,fsm,state),Param2()(evt,fsm,state),Param3()(evt,fsm,state) \
  1851. ,Param4()(evt,fsm,state),Param5()(evt,fsm,state),Param6()(evt,fsm,state));} }; \
  1852. struct function_name ## tag{}; \
  1853. struct functor ## Helper : proto::extends< proto::terminal< function_name ## tag >::type, \
  1854. functor ## Helper , boost::msm::sm_domain> { functor ## Helper(){} \
  1855. template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5,class Arg6> \
  1856. struct In {typedef functor <Arg1,Arg2,Arg3,Arg4,Arg5,Arg6> type;}; }; \
  1857. functor ## Helper const function_name = functor ## Helper ();
  1858. #define BOOST_MSM_EUML_METHOD(functor,function,function_name,result_trans,result_state) \
  1859. template <class Param1=void , class Param2=void , class Param3=void , class Param4=void, \
  1860. class Param5=void,class Param6=void,class Enable=void > \
  1861. struct functor : euml_action<functor<Param1,Param2,Param3,Param4,Param5,Param6,Enable> > {}; \
  1862. template <class Param1, class Param2, class Param3, class Param4, class Param5, class Param6> \
  1863. struct functor<Param1,Param2,Param3,Param4,Param5,Param6, \
  1864. typename ::boost::enable_if<typename ::boost::is_same<Param2,void>::type>::type> \
  1865. : euml_action<functor<Param1,Param2,Param3,Param4,Param5,Param6> > { \
  1866. template <class Event,class FSM,class STATE > struct state_action_result { \
  1867. typedef result_state type;} ; \
  1868. template <class EVT,class FSM,class SourceState,class TargetState> \
  1869. struct transition_action_result { typedef result_trans type;}; \
  1870. typedef ::boost::fusion::set<boost::msm::front::state_action_tag,boost::msm::front::action_tag> tag_type; \
  1871. template <class EVT,class FSM,class SourceState,class TargetState> \
  1872. typename ::boost::enable_if<typename ::boost::mpl::has_key< \
  1873. typename Param1::tag_type,boost::msm::front::action_tag>::type, \
  1874. typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type \
  1875. operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const { \
  1876. return (Param1()(evt,fsm,src,tgt)).function();} \
  1877. template <class Event,class FSM,class STATE> \
  1878. typename ::boost::enable_if<typename ::boost::mpl::has_key< \
  1879. typename Param1::tag_type,boost::msm::front::state_action_tag>::type, \
  1880. typename state_action_result<Event,FSM,STATE>::type >::type \
  1881. operator()(Event const& evt,FSM& fsm,STATE& state )const { \
  1882. return (Param1()(evt,fsm,state)).function();} }; \
  1883. template <class Param1, class Param2, class Param3, class Param4, class Param5,class Param6> \
  1884. struct functor<Param1,Param2,Param3,Param4,Param5,Param6, \
  1885. typename ::boost::disable_if<typename ::boost::mpl::or_< \
  1886. typename ::boost::is_same<Param2,void>::type,typename ::boost::mpl::not_< \
  1887. typename ::boost::is_same<Param3,void>::type>::type>::type >::type> \
  1888. : euml_action<functor<Param1,Param2,Param3,Param4,Param5,Param6> > { \
  1889. template <class Event,class FSM,class STATE > struct state_action_result { \
  1890. typedef result_state type;} ; \
  1891. template <class EVT,class FSM,class SourceState,class TargetState> \
  1892. struct transition_action_result { typedef result_trans type;}; \
  1893. typedef ::boost::fusion::set<boost::msm::front::state_action_tag,boost::msm::front::action_tag> tag_type; \
  1894. template <class EVT,class FSM,class SourceState,class TargetState> \
  1895. typename ::boost::enable_if<typename ::boost::mpl::has_key< \
  1896. typename Param1::tag_type,boost::msm::front::action_tag>::type, \
  1897. typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type \
  1898. operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const { \
  1899. return (Param1()(evt,fsm,src,tgt)).function(Param2()(evt,fsm,src,tgt));} \
  1900. template <class Event,class FSM,class STATE> \
  1901. typename ::boost::enable_if<typename ::boost::mpl::has_key< \
  1902. typename Param1::tag_type,boost::msm::front::state_action_tag>::type, \
  1903. typename state_action_result<Event,FSM,STATE>::type >::type \
  1904. operator()(Event const& evt,FSM& fsm,STATE& state )const { \
  1905. return (Param1()(evt,fsm,state)).function(Param2()(evt,fsm,state));} }; \
  1906. template <class Param1, class Param2, class Param3, class Param4, class Param5,class Param6> \
  1907. struct functor<Param1,Param2,Param3,Param4,Param5,Param6, \
  1908. typename ::boost::disable_if<typename ::boost::mpl::or_< \
  1909. typename ::boost::is_same<Param3,void>::type,typename ::boost::mpl::not_< \
  1910. typename ::boost::is_same<Param4,void>::type>::type>::type >::type> \
  1911. : euml_action<functor<Param1,Param2,Param3,Param4,Param5,Param6> > { \
  1912. template <class Event,class FSM,class STATE > struct state_action_result { \
  1913. typedef result_state type;} ; \
  1914. template <class EVT,class FSM,class SourceState,class TargetState> \
  1915. struct transition_action_result { typedef result_trans type;}; \
  1916. typedef ::boost::fusion::set<boost::msm::front::state_action_tag,boost::msm::front::action_tag> tag_type; \
  1917. template <class EVT,class FSM,class SourceState,class TargetState> \
  1918. typename ::boost::enable_if<typename ::boost::mpl::has_key< \
  1919. typename Param1::tag_type,boost::msm::front::action_tag>::type, \
  1920. typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type \
  1921. operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const { \
  1922. return (Param1()(evt,fsm,src,tgt)).function(Param2()(evt,fsm,src,tgt),Param3()(evt,fsm,src,tgt));} \
  1923. template <class Event,class FSM,class STATE> \
  1924. typename ::boost::enable_if<typename ::boost::mpl::has_key< \
  1925. typename Param1::tag_type,boost::msm::front::state_action_tag>::type, \
  1926. typename state_action_result<Event,FSM,STATE>::type >::type \
  1927. operator()(Event const& evt,FSM& fsm,STATE& state )const { \
  1928. return (Param1()(evt,fsm,state)).function(Param2()(evt,fsm,state),Param3()(evt,fsm,state));} }; \
  1929. template <class Param1, class Param2, class Param3, class Param4, class Param5,class Param6> \
  1930. struct functor<Param1,Param2,Param3,Param4,Param5,Param6, \
  1931. typename ::boost::disable_if<typename ::boost::mpl::or_< \
  1932. typename ::boost::is_same<Param4,void>::type,typename ::boost::mpl::not_< \
  1933. typename ::boost::is_same<Param5,void>::type>::type>::type >::type> \
  1934. : euml_action<functor<Param1,Param2,Param3,Param4,Param5,Param6> > { \
  1935. template <class Event,class FSM,class STATE > struct state_action_result { \
  1936. typedef result_state type;} ; \
  1937. template <class EVT,class FSM,class SourceState,class TargetState> \
  1938. struct transition_action_result { typedef result_trans type;}; \
  1939. typedef ::boost::fusion::set<boost::msm::front::state_action_tag,boost::msm::front::action_tag> tag_type; \
  1940. template <class EVT,class FSM,class SourceState,class TargetState> \
  1941. typename ::boost::enable_if<typename ::boost::mpl::has_key< \
  1942. typename Param1::tag_type,boost::msm::front::action_tag>::type, \
  1943. typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type \
  1944. operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const { \
  1945. return (Param1()(evt,fsm,src,tgt)).function(Param2()(evt,fsm,src,tgt),Param3()(evt,fsm,src,tgt) \
  1946. ,Param4()(evt,fsm,src,tgt));} \
  1947. template <class Event,class FSM,class STATE> \
  1948. typename ::boost::enable_if<typename ::boost::mpl::has_key< \
  1949. typename Param1::tag_type,boost::msm::front::state_action_tag>::type, \
  1950. typename state_action_result<Event,FSM,STATE>::type >::type \
  1951. operator()(Event const& evt,FSM& fsm,STATE& state )const { \
  1952. return (Param1()(evt,fsm,state)).function(Param2()(evt,fsm,state),Param3()(evt,fsm,state) \
  1953. ,Param4()(evt,fsm,state));} }; \
  1954. template <class Param1, class Param2, class Param3, class Param4, class Param5,class Param6> \
  1955. struct functor<Param1,Param2,Param3,Param4,Param5,Param6, \
  1956. typename ::boost::disable_if<typename ::boost::mpl::or_< \
  1957. typename ::boost::is_same<Param5,void>::type,typename ::boost::mpl::not_< \
  1958. typename ::boost::is_same<Param6,void>::type>::type>::type >::type> \
  1959. : euml_action<functor<Param1,Param2,Param3,Param4,Param5,Param6> > { \
  1960. template <class Event,class FSM,class STATE > struct state_action_result { \
  1961. typedef result_state type;} ; \
  1962. template <class EVT,class FSM,class SourceState,class TargetState> \
  1963. struct transition_action_result { typedef result_trans type;}; \
  1964. typedef ::boost::fusion::set<boost::msm::front::state_action_tag,boost::msm::front::action_tag> tag_type; \
  1965. template <class EVT,class FSM,class SourceState,class TargetState> \
  1966. typename ::boost::enable_if<typename ::boost::mpl::has_key< \
  1967. typename Param1::tag_type,boost::msm::front::action_tag>::type, \
  1968. typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type \
  1969. operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const { \
  1970. return (Param1()(evt,fsm,src,tgt)).function(Param2()(evt,fsm,src,tgt),Param3()(evt,fsm,src,tgt) \
  1971. ,Param4()(evt,fsm,src,tgt),Param5()(evt,fsm,src,tgt));} \
  1972. template <class Event,class FSM,class STATE> \
  1973. typename ::boost::enable_if<typename ::boost::mpl::has_key< \
  1974. typename Param1::tag_type,boost::msm::front::state_action_tag>::type, \
  1975. typename state_action_result<Event,FSM,STATE>::type >::type \
  1976. operator()(Event const& evt,FSM& fsm,STATE& state )const { \
  1977. return (Param1()(evt,fsm,state)).function(Param2()(evt,fsm,state),Param3()(evt,fsm,state) \
  1978. ,Param4()(evt,fsm,state),Param5()(evt,fsm,state));} }; \
  1979. template <class Param1, class Param2, class Param3, class Param4, class Param5,class Param6> \
  1980. struct functor<Param1,Param2,Param3,Param4,Param5,Param6, \
  1981. typename ::boost::disable_if<typename ::boost::is_same<Param6,void>::type>::type> \
  1982. : euml_action<functor<Param1,Param2,Param3,Param4,Param5,Param6> > { \
  1983. template <class Event,class FSM,class STATE > struct state_action_result { \
  1984. typedef result_state type;} ; \
  1985. template <class EVT,class FSM,class SourceState,class TargetState> \
  1986. struct transition_action_result { typedef result_trans type;}; \
  1987. typedef ::boost::fusion::set<boost::msm::front::state_action_tag,boost::msm::front::action_tag> tag_type; \
  1988. template <class EVT,class FSM,class SourceState,class TargetState> \
  1989. typename ::boost::enable_if<typename ::boost::mpl::has_key< \
  1990. typename Param1::tag_type,boost::msm::front::action_tag>::type, \
  1991. typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type \
  1992. operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const { \
  1993. return (Param1()(evt,fsm,src,tgt)).function(Param2()(evt,fsm,src,tgt),Param3()(evt,fsm,src,tgt) \
  1994. ,Param4()(evt,fsm,src,tgt),Param5()(evt,fsm,src,tgt),Param6()(evt,fsm,src,tgt));} \
  1995. template <class Event,class FSM,class STATE> \
  1996. typename ::boost::enable_if<typename ::boost::mpl::has_key< \
  1997. typename Param1::tag_type,boost::msm::front::state_action_tag>::type, \
  1998. typename state_action_result<Event,FSM,STATE>::type >::type \
  1999. operator()(Event const& evt,FSM& fsm,STATE& state )const { \
  2000. return (Param1()(evt,fsm,state)).function(Param2()(evt,fsm,state),Param3()(evt,fsm,state) \
  2001. ,Param4()(evt,fsm,state),Param5()(evt,fsm,state),Param6()(evt,fsm,state));} }; \
  2002. struct function_name ## tag{}; \
  2003. struct functor ## Helper : proto::extends< proto::terminal< function_name ## tag >::type, \
  2004. functor ## Helper , boost::msm::sm_domain> { functor ## Helper(){} \
  2005. template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5,class Arg6> \
  2006. struct In {typedef functor <Arg1,Arg2,Arg3,Arg4,Arg5,Arg6> type;}; }; \
  2007. functor ## Helper const function_name = functor ## Helper ();
  2008. #else
  2009. #define BOOST_MSM_EUML_FUNCTION(functor,function,function_name,result_trans,result_state) \
  2010. template <class Param1=void , class Param2=void , class Param3=void , class Param4=void, \
  2011. class Param5=void,class Enable=void > \
  2012. struct functor : euml_action<functor<Param1,Param2,Param3,Param4,Param5,Enable> > {}; \
  2013. template <class Param1, class Param2, class Param3, class Param4, class Param5> \
  2014. struct functor<Param1,Param2,Param3,Param4,Param5, \
  2015. typename ::boost::disable_if<typename ::boost::mpl::or_< \
  2016. typename ::boost::is_same<Param1,void>::type,typename ::boost::mpl::not_< \
  2017. typename ::boost::is_same<Param2,void>::type>::type>::type >::type> \
  2018. : euml_action<functor<Param1,Param2,Param3,Param4,Param5> > { \
  2019. template <class Event,class FSM,class STATE > struct state_action_result { \
  2020. typedef result_state type;} ; \
  2021. template <class EVT,class FSM,class SourceState,class TargetState> \
  2022. struct transition_action_result { typedef result_trans type;}; \
  2023. typedef ::boost::fusion::set<boost::msm::front::state_action_tag,boost::msm::front::action_tag> tag_type; \
  2024. template <class EVT,class FSM,class SourceState,class TargetState> \
  2025. typename ::boost::enable_if<typename ::boost::mpl::has_key< \
  2026. typename Param1::tag_type,boost::msm::front::action_tag>::type, \
  2027. typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type \
  2028. operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const { \
  2029. return function (Param1()(evt,fsm,src,tgt));} \
  2030. template <class Event,class FSM,class STATE> \
  2031. typename ::boost::enable_if<typename ::boost::mpl::has_key< \
  2032. typename Param1::tag_type,boost::msm::front::state_action_tag>::type, \
  2033. typename state_action_result<Event,FSM,STATE>::type >::type \
  2034. operator()(Event const& evt,FSM& fsm,STATE& state )const { \
  2035. return function (Param1()(evt,fsm,state));} }; \
  2036. template <class Param1, class Param2, class Param3, class Param4, class Param5> \
  2037. struct functor<Param1,Param2,Param3,Param4,Param5, \
  2038. typename ::boost::disable_if<typename ::boost::mpl::or_< \
  2039. typename ::boost::is_same<Param2,void>::type,typename ::boost::mpl::not_< \
  2040. typename ::boost::is_same<Param3,void>::type>::type>::type >::type> \
  2041. : euml_action<functor<Param1,Param2,Param3,Param4,Param5> > { \
  2042. template <class Event,class FSM,class STATE > struct state_action_result { \
  2043. typedef result_state type;} ; \
  2044. template <class EVT,class FSM,class SourceState,class TargetState> \
  2045. struct transition_action_result { typedef result_trans type;}; \
  2046. typedef ::boost::fusion::set<boost::msm::front::state_action_tag,boost::msm::front::action_tag> tag_type; \
  2047. template <class EVT,class FSM,class SourceState,class TargetState> \
  2048. typename ::boost::enable_if<typename ::boost::mpl::has_key< \
  2049. typename Param1::tag_type,boost::msm::front::action_tag>::type, \
  2050. typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type \
  2051. operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const { \
  2052. return function (Param1()(evt,fsm,src,tgt),Param2()(evt,fsm,src,tgt));} \
  2053. template <class Event,class FSM,class STATE> \
  2054. typename ::boost::enable_if<typename ::boost::mpl::has_key< \
  2055. typename Param1::tag_type,boost::msm::front::state_action_tag>::type, \
  2056. typename state_action_result<Event,FSM,STATE>::type >::type \
  2057. operator()(Event const& evt,FSM& fsm,STATE& state )const { \
  2058. return function (Param1()(evt,fsm,state),Param2()(evt,fsm,state));} }; \
  2059. template <class Param1, class Param2, class Param3, class Param4, class Param5> \
  2060. struct functor<Param1,Param2,Param3,Param4,Param5, \
  2061. typename ::boost::disable_if<typename ::boost::mpl::or_< \
  2062. typename ::boost::is_same<Param3,void>::type,typename ::boost::mpl::not_< \
  2063. typename ::boost::is_same<Param4,void>::type>::type>::type >::type> \
  2064. : euml_action<functor<Param1,Param2,Param3,Param4,Param5> > { \
  2065. template <class Event,class FSM,class STATE > struct state_action_result { \
  2066. typedef result_state type;} ; \
  2067. template <class EVT,class FSM,class SourceState,class TargetState> \
  2068. struct transition_action_result { typedef result_trans type;}; \
  2069. typedef ::boost::fusion::set<boost::msm::front::state_action_tag,boost::msm::front::action_tag> tag_type; \
  2070. template <class EVT,class FSM,class SourceState,class TargetState> \
  2071. typename ::boost::enable_if<typename ::boost::mpl::has_key< \
  2072. typename Param1::tag_type,boost::msm::front::action_tag>::type, \
  2073. typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type \
  2074. operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const { \
  2075. return function (Param1()(evt,fsm,src,tgt),Param2()(evt,fsm,src,tgt),Param3()(evt,fsm,src,tgt));} \
  2076. template <class Event,class FSM,class STATE> \
  2077. typename ::boost::enable_if<typename ::boost::mpl::has_key< \
  2078. typename Param1::tag_type,boost::msm::front::state_action_tag>::type, \
  2079. typename state_action_result<Event,FSM,STATE>::type >::type \
  2080. operator()(Event const& evt,FSM& fsm,STATE& state )const { \
  2081. return function (Param1()(evt,fsm,state),Param2()(evt,fsm,state),Param3()(evt,fsm,state));} }; \
  2082. template <class Param1, class Param2, class Param3, class Param4, class Param5> \
  2083. struct functor<Param1,Param2,Param3,Param4,Param5, \
  2084. typename ::boost::disable_if<typename ::boost::mpl::or_< \
  2085. typename ::boost::is_same<Param4,void>::type,typename ::boost::mpl::not_< \
  2086. typename ::boost::is_same<Param5,void>::type>::type>::type >::type> \
  2087. : euml_action<functor<Param1,Param2,Param3,Param4,Param5> > { \
  2088. template <class Event,class FSM,class STATE > struct state_action_result { \
  2089. typedef result_state type;} ; \
  2090. template <class EVT,class FSM,class SourceState,class TargetState> \
  2091. struct transition_action_result { typedef result_trans type;}; \
  2092. typedef ::boost::fusion::set<boost::msm::front::state_action_tag,boost::msm::front::action_tag> tag_type; \
  2093. template <class EVT,class FSM,class SourceState,class TargetState> \
  2094. typename ::boost::enable_if<typename ::boost::mpl::has_key< \
  2095. typename Param1::tag_type,boost::msm::front::action_tag>::type, \
  2096. typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type \
  2097. operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const { \
  2098. return function (Param1()(evt,fsm,src,tgt),Param2()(evt,fsm,src,tgt),Param3()(evt,fsm,src,tgt) \
  2099. ,Param4()(evt,fsm,src,tgt));} \
  2100. template <class Event,class FSM,class STATE> \
  2101. typename ::boost::enable_if<typename ::boost::mpl::has_key< \
  2102. typename Param1::tag_type,boost::msm::front::state_action_tag>::type, \
  2103. typename state_action_result<Event,FSM,STATE>::type >::type \
  2104. operator()(Event const& evt,FSM& fsm,STATE& state )const { \
  2105. return function (Param1()(evt,fsm,state),Param2()(evt,fsm,state),Param3()(evt,fsm,state) \
  2106. ,Param4()(evt,fsm,state));} }; \
  2107. template <class Param1, class Param2, class Param3, class Param4, class Param5> \
  2108. struct functor<Param1,Param2,Param3,Param4,Param5, \
  2109. typename ::boost::disable_if<typename ::boost::is_same<Param5,void>::type>::type> \
  2110. : euml_action<functor<Param1,Param2,Param3,Param4,Param5> > { \
  2111. template <class Event,class FSM,class STATE > struct state_action_result { \
  2112. typedef result_state type;} ; \
  2113. template <class EVT,class FSM,class SourceState,class TargetState> \
  2114. struct transition_action_result { typedef result_trans type;}; \
  2115. typedef ::boost::fusion::set<boost::msm::front::state_action_tag,boost::msm::front::action_tag> tag_type; \
  2116. template <class EVT,class FSM,class SourceState,class TargetState> \
  2117. typename ::boost::enable_if<typename ::boost::mpl::has_key< \
  2118. typename Param1::tag_type,boost::msm::front::action_tag>::type, \
  2119. typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type \
  2120. operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const { \
  2121. return function (Param1()(evt,fsm,src,tgt),Param2()(evt,fsm,src,tgt),Param3()(evt,fsm,src,tgt) \
  2122. ,Param4()(evt,fsm,src,tgt),Param5()(evt,fsm,src,tgt));} \
  2123. template <class Event,class FSM,class STATE> \
  2124. typename ::boost::enable_if<typename ::boost::mpl::has_key< \
  2125. typename Param1::tag_type,boost::msm::front::state_action_tag>::type, \
  2126. typename state_action_result<Event,FSM,STATE>::type >::type \
  2127. operator()(Event const& evt,FSM& fsm,STATE& state )const { \
  2128. return function (Param1()(evt,fsm,state),Param2()(evt,fsm,state),Param3()(evt,fsm,state) \
  2129. ,Param4()(evt,fsm,state),Param5()(evt,fsm,state));} }; \
  2130. struct function_name ## tag{}; \
  2131. struct functor ## Helper : proto::extends< proto::terminal< function_name ## tag >::type, \
  2132. functor ## Helper , boost::msm::sm_domain> { functor ## Helper(){} \
  2133. template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5> \
  2134. struct In {typedef functor <Arg1,Arg2,Arg3,Arg4,Arg5> type;}; }; \
  2135. functor ## Helper const function_name = functor ## Helper ();
  2136. #define BOOST_MSM_EUML_METHOD(functor,function,function_name,result_trans,result_state) \
  2137. template <class Param1=void , class Param2=void , class Param3=void , class Param4=void, \
  2138. class Param5=void,class Enable=void > \
  2139. struct functor : euml_action<functor<Param1,Param2,Param3,Param4,Param5,Enable> > {}; \
  2140. template <class Param1, class Param2, class Param3, class Param4, class Param5> \
  2141. struct functor<Param1,Param2,Param3,Param4,Param5, \
  2142. typename ::boost::enable_if<typename ::boost::is_same<Param2,void>::type>::type> \
  2143. : euml_action<functor<Param1,Param2,Param3,Param4,Param5> > { \
  2144. template <class Event,class FSM,class STATE > struct state_action_result { \
  2145. typedef result_state type;} ; \
  2146. template <class EVT,class FSM,class SourceState,class TargetState> \
  2147. struct transition_action_result { typedef result_trans type;}; \
  2148. typedef ::boost::fusion::set<boost::msm::front::state_action_tag,boost::msm::front::action_tag> tag_type; \
  2149. template <class EVT,class FSM,class SourceState,class TargetState> \
  2150. typename ::boost::enable_if<typename ::boost::mpl::has_key< \
  2151. typename Param1::tag_type,boost::msm::front::action_tag>::type, \
  2152. typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type \
  2153. operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const { \
  2154. return (Param1()(evt,fsm,src,tgt)).function();} \
  2155. template <class Event,class FSM,class STATE> \
  2156. typename ::boost::enable_if<typename ::boost::mpl::has_key< \
  2157. typename Param1::tag_type,boost::msm::front::state_action_tag>::type, \
  2158. typename state_action_result<Event,FSM,STATE>::type >::type \
  2159. operator()(Event const& evt,FSM& fsm,STATE& state )const { \
  2160. return (Param1()(evt,fsm,state)).function();} }; \
  2161. template <class Param1, class Param2, class Param3, class Param4, class Param5> \
  2162. struct functor<Param1,Param2,Param3,Param4,Param5, \
  2163. typename ::boost::disable_if<typename ::boost::mpl::or_< \
  2164. typename ::boost::is_same<Param2,void>::type,typename ::boost::mpl::not_< \
  2165. typename ::boost::is_same<Param3,void>::type>::type>::type >::type> \
  2166. : euml_action<functor<Param1,Param2,Param3,Param4,Param5> > { \
  2167. template <class Event,class FSM,class STATE > struct state_action_result { \
  2168. typedef result_state type;} ; \
  2169. template <class EVT,class FSM,class SourceState,class TargetState> \
  2170. struct transition_action_result { typedef result_trans type;}; \
  2171. typedef ::boost::fusion::set<boost::msm::front::state_action_tag,boost::msm::front::action_tag> tag_type; \
  2172. template <class EVT,class FSM,class SourceState,class TargetState> \
  2173. typename ::boost::enable_if<typename ::boost::mpl::has_key< \
  2174. typename Param1::tag_type,boost::msm::front::action_tag>::type, \
  2175. typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type \
  2176. operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const { \
  2177. return (Param1()(evt,fsm,src,tgt)).function(Param2()(evt,fsm,src,tgt));} \
  2178. template <class Event,class FSM,class STATE> \
  2179. typename ::boost::enable_if<typename ::boost::mpl::has_key< \
  2180. typename Param1::tag_type,boost::msm::front::state_action_tag>::type, \
  2181. typename state_action_result<Event,FSM,STATE>::type >::type \
  2182. operator()(Event const& evt,FSM& fsm,STATE& state )const { \
  2183. return (Param1()(evt,fsm,state)).function(Param2()(evt,fsm,state));} }; \
  2184. template <class Param1, class Param2, class Param3, class Param4, class Param5> \
  2185. struct functor<Param1,Param2,Param3,Param4,Param5, \
  2186. typename ::boost::disable_if<typename ::boost::mpl::or_< \
  2187. typename ::boost::is_same<Param3,void>::type,typename ::boost::mpl::not_< \
  2188. typename ::boost::is_same<Param4,void>::type>::type>::type >::type> \
  2189. : euml_action<functor<Param1,Param2,Param3,Param4,Param5> > { \
  2190. template <class Event,class FSM,class STATE > struct state_action_result { \
  2191. typedef result_state type;} ; \
  2192. template <class EVT,class FSM,class SourceState,class TargetState> \
  2193. struct transition_action_result { typedef result_trans type;}; \
  2194. typedef ::boost::fusion::set<boost::msm::front::state_action_tag,boost::msm::front::action_tag> tag_type; \
  2195. template <class EVT,class FSM,class SourceState,class TargetState> \
  2196. typename ::boost::enable_if<typename ::boost::mpl::has_key< \
  2197. typename Param1::tag_type,boost::msm::front::action_tag>::type, \
  2198. typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type \
  2199. operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const { \
  2200. return (Param1()(evt,fsm,src,tgt)).function(Param2()(evt,fsm,src,tgt),Param3()(evt,fsm,src,tgt));} \
  2201. template <class Event,class FSM,class STATE> \
  2202. typename ::boost::enable_if<typename ::boost::mpl::has_key< \
  2203. typename Param1::tag_type,boost::msm::front::state_action_tag>::type, \
  2204. typename state_action_result<Event,FSM,STATE>::type >::type \
  2205. operator()(Event const& evt,FSM& fsm,STATE& state )const { \
  2206. return (Param1()(evt,fsm,state)).function(Param2()(evt,fsm,state),Param3()(evt,fsm,state));} }; \
  2207. template <class Param1, class Param2, class Param3, class Param4, class Param5> \
  2208. struct functor<Param1,Param2,Param3,Param4,Param5, \
  2209. typename ::boost::disable_if<typename ::boost::mpl::or_< \
  2210. typename ::boost::is_same<Param4,void>::type,typename ::boost::mpl::not_< \
  2211. typename ::boost::is_same<Param5,void>::type>::type>::type >::type> \
  2212. : euml_action<functor<Param1,Param2,Param3,Param4,Param5> > { \
  2213. template <class Event,class FSM,class STATE > struct state_action_result { \
  2214. typedef result_state type;} ; \
  2215. template <class EVT,class FSM,class SourceState,class TargetState> \
  2216. struct transition_action_result { typedef result_trans type;}; \
  2217. typedef ::boost::fusion::set<boost::msm::front::state_action_tag,boost::msm::front::action_tag> tag_type; \
  2218. template <class EVT,class FSM,class SourceState,class TargetState> \
  2219. typename ::boost::enable_if<typename ::boost::mpl::has_key< \
  2220. typename Param1::tag_type,boost::msm::front::action_tag>::type, \
  2221. typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type \
  2222. operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const { \
  2223. return (Param1()(evt,fsm,src,tgt)).function(Param2()(evt,fsm,src,tgt),Param3()(evt,fsm,src,tgt) \
  2224. ,Param4()(evt,fsm,src,tgt));} \
  2225. template <class Event,class FSM,class STATE> \
  2226. typename ::boost::enable_if<typename ::boost::mpl::has_key< \
  2227. typename Param1::tag_type,boost::msm::front::state_action_tag>::type, \
  2228. typename state_action_result<Event,FSM,STATE>::type >::type \
  2229. operator()(Event const& evt,FSM& fsm,STATE& state )const { \
  2230. return (Param1()(evt,fsm,state)).function(Param2()(evt,fsm,state),Param3()(evt,fsm,state) \
  2231. ,Param4()(evt,fsm,state));} }; \
  2232. template <class Param1, class Param2, class Param3, class Param4, class Param5> \
  2233. struct functor<Param1,Param2,Param3,Param4,Param5, \
  2234. typename ::boost::disable_if<typename ::boost::is_same<Param5,void>::type>::type> \
  2235. : euml_action<functor<Param1,Param2,Param3,Param4,Param5> > { \
  2236. template <class Event,class FSM,class STATE > struct state_action_result { \
  2237. typedef result_state type;} ; \
  2238. template <class EVT,class FSM,class SourceState,class TargetState> \
  2239. struct transition_action_result { typedef result_trans type;}; \
  2240. typedef ::boost::fusion::set<boost::msm::front::state_action_tag,boost::msm::front::action_tag> tag_type; \
  2241. template <class EVT,class FSM,class SourceState,class TargetState> \
  2242. typename ::boost::enable_if<typename ::boost::mpl::has_key< \
  2243. typename Param1::tag_type,boost::msm::front::action_tag>::type, \
  2244. typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type \
  2245. operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const { \
  2246. return (Param1()(evt,fsm,src,tgt)).function(Param2()(evt,fsm,src,tgt),Param3()(evt,fsm,src,tgt) \
  2247. ,Param4()(evt,fsm,src,tgt),Param5()(evt,fsm,src,tgt));} \
  2248. template <class Event,class FSM,class STATE> \
  2249. typename ::boost::enable_if<typename ::boost::mpl::has_key< \
  2250. typename Param1::tag_type,boost::msm::front::state_action_tag>::type, \
  2251. typename state_action_result<Event,FSM,STATE>::type >::type \
  2252. operator()(Event const& evt,FSM& fsm,STATE& state )const { \
  2253. return (Param1()(evt,fsm,state)).function(Param2()(evt,fsm,state),Param3()(evt,fsm,state) \
  2254. ,Param4()(evt,fsm,state),Param5()(evt,fsm,state));} }; \
  2255. struct function_name ## tag{}; \
  2256. struct functor ## Helper : proto::extends< proto::terminal< function_name ## tag >::type, \
  2257. functor ## Helper , boost::msm::sm_domain> { functor ## Helper(){} \
  2258. template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5> \
  2259. struct In {typedef functor <Arg1,Arg2,Arg3,Arg4,Arg5> type;}; }; \
  2260. functor ## Helper const function_name = functor ## Helper ();
  2261. #endif
  2262. #define RESULT_TYPE2_PARAM1 typename get_result_type2<Param1,Event,FSM,STATE>::type
  2263. #define RESULT_TYPE_PARAM1 typename get_result_type<Param1,EVT,FSM,SourceState,TargetState>::type
  2264. #define RESULT_TYPE2_PARAM2 typename get_result_type2<Param2,Event,FSM,STATE>::type
  2265. #define RESULT_TYPE_PARAM2 typename get_result_type<Param2,EVT,FSM,SourceState,TargetState>::type
  2266. #define RESULT_TYPE2_PARAM3 typename get_result_type2<Param3,Event,FSM,STATE>::type
  2267. #define RESULT_TYPE_PARAM3 typename get_result_type<Param3,EVT,FSM,SourceState,TargetState>::type
  2268. #define RESULT_TYPE2_PARAM4 typename get_result_type2<Param4,Event,FSM,STATE>::type
  2269. #define RESULT_TYPE_PARAM4 typename get_result_type<Param4,EVT,FSM,SourceState,TargetState>::type
  2270. #define RESULT_TYPE2_PARAM5 typename get_result_type2<Param5,Event,FSM,STATE>::type
  2271. #define RESULT_TYPE_PARAM5 typename get_result_type<Param5,EVT,FSM,SourceState,TargetState>::type
  2272. #define RESULT_TYPE2_PARAM6 typename get_result_type2<Param6,Event,FSM,STATE>::type
  2273. #define RESULT_TYPE_PARAM6 typename get_result_type<Param6,EVT,FSM,SourceState,TargetState>::type
  2274. #define RESULT_TYPE2_DIFF_TYPE_ITER_TRAITS_PARAM1 typename std::iterator_traits<typename get_result_type2<Param1,Event,FSM,STATE>::type>::difference_type
  2275. #define RESULT_TYPE_DIFF_TYPE_ITER_TRAITS_PARAM1 typename std::iterator_traits<typename get_result_type<Param1,EVT,FSM,SourceState,TargetState>::type>::difference_type
  2276. #define RESULT_TYPE2_REMOVE_REF_PARAM1 typename ::boost::remove_reference<typename get_result_type2<Param1,Event,FSM,STATE>::type>::type
  2277. #define RESULT_TYPE_REMOVE_REF_PARAM1 typename ::boost::remove_reference<typename get_result_type<Param1,EVT,FSM,SourceState,TargetState>::type>::type
  2278. #define RESULT_TYPE2_PAIR_REMOVE_REF_PARAM1 std::pair<RESULT_TYPE2_REMOVE_REF_PARAM1,RESULT_TYPE2_REMOVE_REF_PARAM1>
  2279. #define RESULT_TYPE_PAIR_REMOVE_REF_PARAM1 std::pair<RESULT_TYPE_REMOVE_REF_PARAM1,RESULT_TYPE_REMOVE_REF_PARAM1>
  2280. #define RESULT_TYPE2_GET_REF_REMOVE_REF_PARAM1 typename get_reference<typename ::boost::remove_reference<typename get_result_type2<Param1,Event,FSM,STATE>::type>::type>::type
  2281. #define RESULT_TYPE_GET_REF_REMOVE_REF_PARAM1 typename get_reference<typename ::boost::remove_reference<typename get_result_type<Param1,EVT,FSM,SourceState,TargetState>::type>::type>::type
  2282. #define RESULT_TYPE2_GET_ITERATOR_REMOVE_REF_PARAM1 typename get_iterator<typename ::boost::remove_reference<typename get_result_type2<Param1,Event,FSM,STATE>::type>::type>::type
  2283. #define RESULT_TYPE_GET_ITERATOR_REMOVE_REF_PARAM1 typename get_iterator<typename ::boost::remove_reference<typename get_result_type<Param1,EVT,FSM,SourceState,TargetState>::type>::type>::type
  2284. #define RESULT_TYPE2_GET_REV_ITERATOR_REMOVE_REF_PARAM1 typename get_reverse_iterator<typename ::boost::remove_reference<typename get_result_type2<Param1,Event,FSM,STATE>::type>::type>::type
  2285. #define RESULT_TYPE_GET_REV_ITERATOR_REMOVE_REF_PARAM1 typename get_reverse_iterator<typename ::boost::remove_reference<typename get_result_type<Param1,EVT,FSM,SourceState,TargetState>::type>::type>::type
  2286. #define RESULT_TYPE2_GET_SIZE_TYPE_REMOVE_REF_PARAM1 typename get_size_type<typename ::boost::remove_reference<typename get_result_type2<Param1,Event,FSM,STATE>::type>::type>::type
  2287. #define RESULT_TYPE_GET_SIZE_TYPE_REMOVE_REF_PARAM1 typename get_size_type<typename ::boost::remove_reference<typename get_result_type<Param1,EVT,FSM,SourceState,TargetState>::type>::type>::type
  2288. #define BOOST_MSM_EUML_ACTION(instance_name) \
  2289. struct instance_name ## _impl; \
  2290. struct instance_name ## _helper : boost::msm::front::euml::euml_action<instance_name ## _impl> \
  2291. { \
  2292. instance_name ## _helper(){} \
  2293. typedef instance_name ## _impl action_name; \
  2294. }; \
  2295. static instance_name ## _helper instance_name; \
  2296. struct instance_name ## _impl : instance_name ## _helper
  2297. #define BOOST_MSM_EUML_DECLARE_ACTION(instance_name) \
  2298. struct instance_name ; \
  2299. struct instance_name ## _helper : boost::msm::front::euml::euml_action<instance_name > \
  2300. { \
  2301. instance_name ## _helper(){} \
  2302. typedef instance_name action_name; \
  2303. }; \
  2304. struct instance_name : instance_name ## _helper
  2305. #define BOOST_MSM_EUML_EVENT(instance_name) \
  2306. struct instance_name ## _helper : boost::msm::front::euml::euml_event<instance_name ## _helper>{ \
  2307. instance_name ## _helper(){} \
  2308. instance_name ## _helper const& operator()() const {return *this;} }; \
  2309. static instance_name ## _helper instance_name;
  2310. // an event matching any event
  2311. struct kleene_ : boost::msm::front::euml::euml_event<kleene_>, public boost::any
  2312. {
  2313. kleene_() : boost::any(){}
  2314. template<typename ValueType>
  2315. kleene_(const ValueType & v) : boost::any(v){}
  2316. };
  2317. static kleene_ kleene;
  2318. #define BOOST_MSM_EUML_DECLARE_EVENT(instance_name) \
  2319. struct instance_name : boost::msm::front::euml::euml_event<instance_name >{ \
  2320. instance_name(){} \
  2321. instance_name const& operator()() const {return *this;} };
  2322. #define MSM_EUML_CONCAT(param1,param2) param1
  2323. #define MSM_EUML_EVENT_INSTANCE_HELPER_EXECUTE1(z, n, unused) ARG ## n arg ## n
  2324. #define MSM_EUML_EVENT_INSTANCE_HELPER_EXECUTE2(z, n, unused) arg ## n
  2325. #define MSM_EUML_EVENT_INSTANCE_HELPER_ATTRIBUTE_MAP_ENTRY(z, n, unused) \
  2326. typename boost::fusion::result_of::first< \
  2327. typename ::boost::remove_reference< \
  2328. typename boost::fusion::result_of::at_c<T, BOOST_PP_CAT( , n)>::type>::type>::type \
  2329. #define MSM_EUML_EVENT_HELPER_GET_ATTRIBUTE(z, n, unused) \
  2330. get_attribute( \
  2331. typename boost::fusion::result_of::first< \
  2332. typename ::boost::remove_reference< \
  2333. typename boost::fusion::result_of::at_c<T, n>::type>::type>::type())=arg ## n;
  2334. #define MSM_EUML_EVENT_HELPER_CONSTRUCTORS(z, n, mytuple) \
  2335. template <BOOST_PP_ENUM_PARAMS(n, class ARG)> \
  2336. BOOST_PP_CAT(BOOST_PP_TUPLE_ELEM(2, 0, mytuple) , _helper)(BOOST_PP_ENUM(n, MSM_EUML_EVENT_INSTANCE_HELPER_EXECUTE1, ~ )): \
  2337. BOOST_PP_TUPLE_ELEM(2, 1, mytuple)(){ \
  2338. init(BOOST_PP_ENUM(n, MSM_EUML_EVENT_INSTANCE_HELPER_EXECUTE2, ~ ),attribute_vec());}
  2339. #define MSM_EUML_EVENT_INSTANCE_HELPER_ATTRIBUTE_MAP(z, n, unused) \
  2340. template <BOOST_PP_ENUM_PARAMS(n, class ARG),class T> \
  2341. void init(BOOST_PP_ENUM(n, MSM_EUML_EVENT_INSTANCE_HELPER_EXECUTE1, ~ ), \
  2342. T,typename ::boost::enable_if< typename boost::mpl::eval_if< typename ::boost::fusion::traits::is_sequence<T>::type,size_helper<T,n>,::boost::mpl::false_>::type,void >::type* =0) \
  2343. { \
  2344. BOOST_PP_REPEAT_FROM_TO(0,n , \
  2345. MSM_EUML_EVENT_HELPER_GET_ATTRIBUTE, ~) \
  2346. }
  2347. #define MSM_EUML_EVENT_INSTANCE_HELPER_OPERATOR_IMPL(z, n, instance) \
  2348. template <BOOST_PP_ENUM_PARAMS(n, class ARG)> \
  2349. BOOST_PP_CAT(instance,_helper) operator() \
  2350. (BOOST_PP_ENUM(n, MSM_EUML_EVENT_INSTANCE_HELPER_EXECUTE1, ~ ))const{ \
  2351. return BOOST_PP_CAT(instance,_helper) (BOOST_PP_ENUM(n, MSM_EUML_EVENT_INSTANCE_HELPER_EXECUTE2, ~ ));}
  2352. #if defined(FUSION_MAX_MAP_SIZE)
  2353. #define BOOST_MSM_EUML_EVENT_WITH_ATTRIBUTES(instance_name, attributes_name) \
  2354. struct instance_name ## _helper : \
  2355. boost::msm::front::euml::euml_event<instance_name ## _helper> , public attributes_name \
  2356. { \
  2357. template <class T,int checked_size> struct size_helper \
  2358. { \
  2359. typedef typename ::boost::mpl::less_equal< \
  2360. typename ::boost::fusion::result_of::size<T>::type, \
  2361. ::boost::mpl::int_<checked_size> >::type type; \
  2362. }; \
  2363. BOOST_PP_CAT(instance_name,_helper()) : attributes_name(){} \
  2364. typedef attributes_name::attributes_type attribute_map; \
  2365. typedef ::boost::fusion::result_of::as_vector<attribute_map>::type attribute_vec; \
  2366. BOOST_PP_REPEAT_FROM_TO(1,BOOST_PP_ADD(FUSION_MAX_MAP_SIZE ,1), \
  2367. MSM_EUML_EVENT_HELPER_CONSTRUCTORS, (instance_name,attributes_name)) \
  2368. BOOST_PP_REPEAT_FROM_TO(1,BOOST_PP_ADD(FUSION_MAX_MAP_SIZE ,1), \
  2369. MSM_EUML_EVENT_INSTANCE_HELPER_ATTRIBUTE_MAP, ~) \
  2370. BOOST_PP_CAT(instance_name,_helper) operator()(){ \
  2371. return BOOST_PP_CAT(instance_name,_helper)();} \
  2372. BOOST_PP_REPEAT_FROM_TO(1,BOOST_PP_ADD(FUSION_MAX_MAP_SIZE ,1), \
  2373. MSM_EUML_EVENT_INSTANCE_HELPER_OPERATOR_IMPL, instance_name) \
  2374. }; \
  2375. static instance_name ## _helper instance_name;
  2376. #else
  2377. #define BOOST_MSM_EUML_EVENT_WITH_ATTRIBUTES(instance_name, attributes_name) \
  2378. struct instance_name ## _helper : \
  2379. boost::msm::front::euml::euml_event<instance_name ## _helper> , public attributes_name \
  2380. { \
  2381. template <class T,int checked_size> struct size_helper \
  2382. { \
  2383. typedef typename ::boost::mpl::less_equal< \
  2384. typename ::boost::fusion::result_of::size<T>::type, \
  2385. ::boost::mpl::int_<checked_size> >::type type; \
  2386. }; \
  2387. BOOST_PP_CAT(instance_name,_helper()) : attributes_name(){} \
  2388. typedef attributes_name::attributes_type attribute_map; \
  2389. typedef ::boost::fusion::result_of::as_vector<attribute_map>::type attribute_vec; \
  2390. BOOST_PP_REPEAT_FROM_TO(1,BOOST_PP_ADD(10 ,1), \
  2391. MSM_EUML_EVENT_HELPER_CONSTRUCTORS, (instance_name,attributes_name)) \
  2392. BOOST_PP_REPEAT_FROM_TO(1,BOOST_PP_ADD(10 ,1), \
  2393. MSM_EUML_EVENT_INSTANCE_HELPER_ATTRIBUTE_MAP, ~) \
  2394. BOOST_PP_CAT(instance_name,_helper) operator()(){ \
  2395. return BOOST_PP_CAT(instance_name,_helper)();} \
  2396. BOOST_PP_REPEAT_FROM_TO(1,BOOST_PP_ADD(10 ,1), \
  2397. MSM_EUML_EVENT_INSTANCE_HELPER_OPERATOR_IMPL, instance_name) \
  2398. }; \
  2399. static instance_name ## _helper instance_name;
  2400. #endif
  2401. #define BOOST_MSM_EUML_EVENT_NAME(instance_name) instance_name ## _helper
  2402. #define BOOST_MSM_EUML_FLAG_NAME(instance_name) instance_name ## _helper
  2403. #define BOOST_MSM_EUML_FLAG(instance_name) \
  2404. struct instance_name ## _helper : boost::msm::front::euml::euml_flag<instance_name ## _helper>{}; \
  2405. static instance_name ## _helper instance_name;
  2406. #define BOOST_MSM_EUML_DECLARE_FLAG(instance_name) \
  2407. struct instance_name : boost::msm::front::euml::euml_flag<instance_name >{};
  2408. #define BOOST_MSM_EUML_STATE_NAME(instance_name) instance_name ## _helper
  2409. #define BOOST_MSM_EUML_BUILD_STT_HELPER build_stt(
  2410. #define BOOST_MSM_EUML_BUILD_INTERNAL_STT_HELPER build_internal_stt(
  2411. #define BOOST_MSM_EUML_BUILD_STT_HELPER2(expr) expr)
  2412. #define BOOST_MSM_EUML_ENTRY_STATE_HELPER(expr) ,expr
  2413. #define BOOST_MSM_EUML_ATTRIBUTES(expr,instance_name) \
  2414. typedef BOOST_TYPEOF(build_attributes expr) instance_name;
  2415. // following macros declare a state type but do not create an instance
  2416. #define BOOST_MSM_EUML_DECLARE_STATE(expr,instance_name) \
  2417. struct instance_name ## tag{}; \
  2418. typedef BOOST_TYPEOF(build_state<instance_name ## tag> expr) instance_name;
  2419. #define BOOST_MSM_EUML_DECLARE_INTERRUPT_STATE(expr,instance_name) \
  2420. struct instance_name ## tag{}; \
  2421. typedef BOOST_TYPEOF(build_interrupt_state<instance_name ## tag> expr) instance_name;
  2422. #define BOOST_MSM_EUML_DECLARE_TERMINATE_STATE(expr,instance_name) \
  2423. struct instance_name ## tag{}; \
  2424. typedef BOOST_TYPEOF(build_terminate_state<instance_name ## tag> expr) instance_name;
  2425. #define BOOST_MSM_EUML_DECLARE_EXPLICIT_ENTRY_STATE(region,expr,instance_name) \
  2426. struct instance_name ## tag{}; \
  2427. typedef BOOST_TYPEOF(build_explicit_entry_state<instance_name ## tag BOOST_MSM_EUML_ENTRY_STATE_HELPER(region) > expr) instance_name;
  2428. #define BOOST_MSM_EUML_DECLARE_ENTRY_STATE(region,expr,instance_name) \
  2429. struct instance_name ## tag{}; \
  2430. typedef BOOST_TYPEOF(build_entry_state<instance_name ## tag BOOST_MSM_EUML_ENTRY_STATE_HELPER(region) > expr) instance_name;
  2431. #define BOOST_MSM_EUML_DECLARE_EXIT_STATE(expr,instance_name) \
  2432. struct instance_name ## tag{}; \
  2433. typedef BOOST_TYPEOF(build_exit_state<instance_name ## tag> expr) instance_name;
  2434. #define BOOST_MSM_EUML_DECLARE_STATE_MACHINE(expr,instance_name) \
  2435. struct instance_name ## tag{}; \
  2436. typedef BOOST_TYPEOF(build_sm<instance_name ## tag> expr) instance_name;
  2437. #define BOOST_MSM_EUML_DECLARE_TRANSITION_TABLE(expr,instance_name) \
  2438. typedef int using_declared_table; \
  2439. typedef BOOST_TYPEOF(BOOST_MSM_EUML_BUILD_STT_HELPER BOOST_MSM_EUML_BUILD_STT_HELPER2(expr)) instance_name;
  2440. #define BOOST_MSM_EUML_DECLARE_INTERNAL_TRANSITION_TABLE(expr) \
  2441. typedef BOOST_TYPEOF( \
  2442. BOOST_MSM_EUML_BUILD_INTERNAL_STT_HELPER BOOST_MSM_EUML_BUILD_STT_HELPER2(expr)) internal_transition_table;
  2443. // following macros declare a state type and create an instance
  2444. #define BOOST_MSM_EUML_STATE(expr,instance_name) \
  2445. struct instance_name ## tag{}; \
  2446. typedef BOOST_TYPEOF(build_state<instance_name ## tag> expr) instance_name ## _helper; \
  2447. static instance_name ## _helper instance_name;
  2448. #define BOOST_MSM_EUML_INTERRUPT_STATE(expr,instance_name) \
  2449. struct instance_name ## tag{}; \
  2450. typedef BOOST_TYPEOF(build_interrupt_state<instance_name ## tag> expr) instance_name ## _helper; \
  2451. static instance_name ## _helper instance_name;
  2452. #define BOOST_MSM_EUML_TERMINATE_STATE(expr,instance_name) \
  2453. struct instance_name ## tag{}; \
  2454. typedef BOOST_TYPEOF(build_terminate_state<instance_name ## tag> expr) instance_name ## _helper; \
  2455. static instance_name ## _helper instance_name;
  2456. #define BOOST_MSM_EUML_EXPLICIT_ENTRY_STATE(region,expr,instance_name) \
  2457. struct instance_name ## tag{}; \
  2458. typedef BOOST_TYPEOF(build_explicit_entry_state<instance_name ## tag BOOST_MSM_EUML_ENTRY_STATE_HELPER(region) > expr) instance_name ## _helper; \
  2459. static instance_name ## _helper instance_name;
  2460. #define BOOST_MSM_EUML_ENTRY_STATE(region,expr,instance_name) \
  2461. struct instance_name ## tag{}; \
  2462. typedef BOOST_TYPEOF(build_entry_state<instance_name ## tag BOOST_MSM_EUML_ENTRY_STATE_HELPER(region) > expr) instance_name ## _helper; \
  2463. static instance_name ## _helper instance_name;
  2464. #define BOOST_MSM_EUML_EXIT_STATE(expr,instance_name) \
  2465. struct instance_name ## tag{}; \
  2466. typedef BOOST_TYPEOF(build_exit_state<instance_name ## tag> expr) instance_name ## _helper; \
  2467. static instance_name ## _helper instance_name;
  2468. #ifndef BOOST_MSVC
  2469. #define BOOST_MSM_EUML_TRANSITION_TABLE(expr,instance_name) \
  2470. typedef BOOST_TYPEOF(BOOST_MSM_EUML_BUILD_STT_HELPER BOOST_MSM_EUML_BUILD_STT_HELPER2(expr)) instance_name ## _def; \
  2471. struct instance_name ## _helper : public instance_name ## _def{instance_name ## _helper(){}}; \
  2472. static instance_name ## _helper instance_name;
  2473. #define BOOST_MSM_EUML_INTERNAL_TRANSITION_TABLE(expr,instance_name) \
  2474. typedef BOOST_TYPEOF(BOOST_MSM_EUML_BUILD_INTERNAL_STT_HELPER BOOST_MSM_EUML_BUILD_STT_HELPER2(expr)) instance_name ## _def; \
  2475. struct instance_name ## _helper : public instance_name ## _def{instance_name ## _helper(){}}; \
  2476. static instance_name ## _helper instance_name;
  2477. #else
  2478. #define BOOST_MSM_EUML_TRANSITION_TABLE(expr,instance_name) \
  2479. struct instance_name ## _helper : \
  2480. public BOOST_TYPEOF(BOOST_MSM_EUML_BUILD_STT_HELPER BOOST_MSM_EUML_BUILD_STT_HELPER2(expr)) \
  2481. {instance_name ## _helper(){}} ; \
  2482. static instance_name ## _helper instance_name;
  2483. #define BOOST_MSM_EUML_INTERNAL_TRANSITION_TABLE(expr,instance_name) \
  2484. struct instance_name ## _helper : \
  2485. public BOOST_TYPEOF(BOOST_MSM_EUML_BUILD_INTERNAL_STT_HELPER BOOST_MSM_EUML_BUILD_STT_HELPER2(expr)) \
  2486. {instance_name ## _helper(){}} ; \
  2487. static instance_name ## _helper instance_name;
  2488. #endif
  2489. }}}} // boost::msm::front::euml
  2490. namespace boost { namespace msm{
  2491. template<>
  2492. struct is_kleene_event< boost::msm::front::euml::kleene_ >
  2493. {
  2494. typedef ::boost::mpl::true_ type;
  2495. };
  2496. }}
  2497. #endif // BOOST_MSM_FRONT_EUML_COMMON_H