common.hpp 138 KB

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