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 11 #ifndef BOOST_MSM_FRONT_EUML_CONTAINER_H 12 #define BOOST_MSM_FRONT_EUML_CONTAINER_H 13 14 #include <utility> 15 #include <boost/msm/front/euml/common.hpp> 16 #include <boost/utility/enable_if.hpp> 17 #include <boost/mpl/has_key.hpp> 18 #include <boost/mpl/set.hpp> 19 #include <boost/mpl/not.hpp> 20 #include <boost/msm/front/euml/operator.hpp> 21 #include <boost/type_traits.hpp> 22 23 BOOST_MPL_HAS_XXX_TRAIT_DEF(iterator_category) 24 25 namespace boost { namespace msm { namespace front { namespace euml 26 { 27 28 template <class T> 29 struct Front_ : euml_action<Front_<T> > 30 { 31 template <class Event,class FSM,class STATE > 32 struct state_action_result 33 { 34 typedef typename get_reference< 35 typename ::boost::remove_reference< 36 typename get_result_type2<T,Event,FSM,STATE>::type>::type>::type type; 37 }; 38 template <class EVT,class FSM,class SourceState,class TargetState> 39 struct transition_action_result 40 { 41 typedef typename get_reference< 42 typename ::boost::remove_reference< 43 typename get_result_type<T,EVT,FSM,SourceState,TargetState>::type>::type>::type type; 44 }; 45 typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type; 46 47 template <class EVT,class FSM,class SourceState,class TargetState> 48 typename ::boost::enable_if< 49 typename ::boost::mpl::has_key< 50 typename T::tag_type,action_tag>::type, 51 typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type operator ()boost::msm::front::euml::Front_52 operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const 53 { 54 return (T()(evt,fsm,src,tgt)).front(); 55 } 56 template <class Event,class FSM,class STATE> 57 typename ::boost::enable_if< 58 typename ::boost::mpl::has_key< 59 typename T::tag_type,state_action_tag>::type, 60 typename state_action_result<Event,FSM,STATE>::type >::type operator ()boost::msm::front::euml::Front_61 operator()(Event const& evt,FSM& fsm,STATE& state )const 62 { 63 return (T()(evt,fsm,state)).front(); 64 } 65 }; 66 67 struct front_tag {}; 68 struct Front_Helper: proto::extends< proto::terminal<front_tag>::type, Front_Helper, boost::msm::sm_domain> 69 { Front_Helperboost::msm::front::euml::Front_Helper70 Front_Helper(){} 71 template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5 72 #ifdef BOOST_MSVC 73 ,class Arg6 74 #endif 75 > 76 struct In 77 { 78 typedef Front_<Arg1> type; 79 }; 80 }; 81 Front_Helper const front_; 82 83 template <class T> 84 struct Back_ : euml_action<Back_<T> > 85 { 86 template <class Event,class FSM,class STATE > 87 struct state_action_result 88 { 89 typedef typename get_reference< 90 typename ::boost::remove_reference< 91 typename get_result_type2<T,Event,FSM,STATE>::type>::type>::type type; 92 }; 93 template <class EVT,class FSM,class SourceState,class TargetState> 94 struct transition_action_result 95 { 96 typedef typename get_reference< 97 typename ::boost::remove_reference< 98 typename get_result_type<T,EVT,FSM,SourceState,TargetState>::type>::type>::type type; 99 }; 100 typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type; 101 102 template <class EVT,class FSM,class SourceState,class TargetState> 103 typename ::boost::enable_if< 104 typename ::boost::mpl::has_key< 105 typename T::tag_type,action_tag>::type, 106 typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type operator ()boost::msm::front::euml::Back_107 operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const 108 { 109 return (T()(evt,fsm,src,tgt)).back(); 110 } 111 template <class Event,class FSM,class STATE> 112 typename ::boost::enable_if< 113 typename ::boost::mpl::has_key< 114 typename T::tag_type,state_action_tag>::type, 115 typename state_action_result<Event,FSM,STATE>::type >::type operator ()boost::msm::front::euml::Back_116 operator()(Event const& evt,FSM& fsm,STATE& state )const 117 { 118 return (T()(evt,fsm,state)).back(); 119 } 120 }; 121 122 struct back_tag {}; 123 struct Back_Helper: proto::extends< proto::terminal<back_tag>::type, Back_Helper, boost::msm::sm_domain> 124 { Back_Helperboost::msm::front::euml::Back_Helper125 Back_Helper(){} 126 template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5 127 #ifdef BOOST_MSVC 128 ,class Arg6 129 #endif 130 > 131 struct In 132 { 133 typedef Back_<Arg1> type; 134 }; 135 }; 136 Back_Helper const back_; 137 138 template <class T> 139 struct Begin_ : euml_action<Begin_<T> > 140 { 141 template <class Event,class FSM,class STATE > 142 struct state_action_result 143 { 144 typedef typename get_iterator< 145 typename ::boost::remove_reference< 146 typename get_result_type2<T,Event,FSM,STATE>::type>::type>::type type; 147 }; 148 template <class EVT,class FSM,class SourceState,class TargetState> 149 struct transition_action_result 150 { 151 typedef typename get_iterator< 152 typename ::boost::remove_reference< 153 typename get_result_type<T,EVT,FSM,SourceState,TargetState>::type>::type>::type type; 154 }; 155 typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type; 156 157 template <class EVT,class FSM,class SourceState,class TargetState> 158 typename ::boost::enable_if< 159 typename ::boost::mpl::has_key< 160 typename T::tag_type,action_tag>::type, 161 typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type operator ()boost::msm::front::euml::Begin_162 operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const 163 { 164 return (T()(evt,fsm,src,tgt)).begin(); 165 } 166 template <class Event,class FSM,class STATE> 167 typename ::boost::enable_if< 168 typename ::boost::mpl::has_key< 169 typename T::tag_type,state_action_tag>::type, 170 typename state_action_result<Event,FSM,STATE>::type >::type operator ()boost::msm::front::euml::Begin_171 operator()(Event const& evt,FSM& fsm,STATE& state )const 172 { 173 return (T()(evt,fsm,state)).begin(); 174 } 175 }; 176 177 struct begin_tag {}; 178 struct Begin_Helper: proto::extends< proto::terminal<begin_tag>::type, Begin_Helper, boost::msm::sm_domain> 179 { Begin_Helperboost::msm::front::euml::Begin_Helper180 Begin_Helper(){} 181 template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5 182 #ifdef BOOST_MSVC 183 ,class Arg6 184 #endif 185 > 186 struct In 187 { 188 typedef Begin_<Arg1> type; 189 }; 190 }; 191 Begin_Helper const begin_; 192 193 template <class T> 194 struct End_ : euml_action<End_<T> > 195 { 196 template <class Event,class FSM,class STATE > 197 struct state_action_result 198 { 199 typedef typename get_iterator< 200 typename ::boost::remove_reference< 201 typename get_result_type2<T,Event,FSM,STATE>::type>::type>::type type; 202 }; 203 template <class EVT,class FSM,class SourceState,class TargetState> 204 struct transition_action_result 205 { 206 typedef typename get_iterator< 207 typename ::boost::remove_reference< 208 typename get_result_type<T,EVT,FSM,SourceState,TargetState>::type>::type>::type type; 209 }; 210 typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type; 211 212 template <class EVT,class FSM,class SourceState,class TargetState> 213 typename ::boost::enable_if< 214 typename ::boost::mpl::has_key< 215 typename T::tag_type,action_tag>::type, 216 typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type operator ()boost::msm::front::euml::End_217 operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const 218 { 219 return (T()(evt,fsm,src,tgt)).end(); 220 } 221 template <class Event,class FSM,class STATE> 222 typename ::boost::enable_if< 223 typename ::boost::mpl::has_key< 224 typename T::tag_type,state_action_tag>::type, 225 typename state_action_result<Event,FSM,STATE>::type >::type operator ()boost::msm::front::euml::End_226 operator()(Event const& evt,FSM& fsm,STATE& state )const 227 { 228 return (T()(evt,fsm,state)).end(); 229 } 230 }; 231 struct end_tag {}; 232 struct End_Helper: proto::extends< proto::terminal<end_tag>::type, End_Helper, boost::msm::sm_domain> 233 { End_Helperboost::msm::front::euml::End_Helper234 End_Helper(){} 235 template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5 236 #ifdef BOOST_MSVC 237 ,class Arg6 238 #endif 239 > 240 struct In 241 { 242 typedef End_<Arg1> type; 243 }; 244 }; 245 End_Helper const end_; 246 247 template <class T> 248 struct RBegin_ : euml_action<RBegin_<T> > 249 { 250 template <class Event,class FSM,class STATE > 251 struct state_action_result 252 { 253 typedef typename get_reverse_iterator< 254 typename ::boost::remove_reference< 255 typename get_result_type2<T,Event,FSM,STATE>::type>::type>::type type; 256 }; 257 template <class EVT,class FSM,class SourceState,class TargetState> 258 struct transition_action_result 259 { 260 typedef typename get_reverse_iterator< 261 typename ::boost::remove_reference< 262 typename get_result_type<T,EVT,FSM,SourceState,TargetState>::type>::type>::type type; 263 }; 264 typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type; 265 266 template <class EVT,class FSM,class SourceState,class TargetState> 267 typename ::boost::enable_if< 268 typename ::boost::mpl::has_key< 269 typename T::tag_type,action_tag>::type, 270 typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type operator ()boost::msm::front::euml::RBegin_271 operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const 272 { 273 return (T()(evt,fsm,src,tgt)).rbegin(); 274 } 275 template <class Event,class FSM,class STATE> 276 typename ::boost::enable_if< 277 typename ::boost::mpl::has_key< 278 typename T::tag_type,state_action_tag>::type, 279 typename state_action_result<Event,FSM,STATE>::type >::type operator ()boost::msm::front::euml::RBegin_280 operator()(Event const& evt,FSM& fsm,STATE& state )const 281 { 282 return (T()(evt,fsm,state)).rbegin(); 283 } 284 }; 285 286 struct rbegin_tag {}; 287 struct RBegin_Helper: proto::extends< proto::terminal<rbegin_tag>::type, RBegin_Helper, boost::msm::sm_domain> 288 { RBegin_Helperboost::msm::front::euml::RBegin_Helper289 RBegin_Helper(){} 290 template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5 291 #ifdef BOOST_MSVC 292 ,class Arg6 293 #endif 294 > 295 struct In 296 { 297 typedef RBegin_<Arg1> type; 298 }; 299 }; 300 RBegin_Helper const rbegin_; 301 302 template <class T> 303 struct REnd_ : euml_action<REnd_<T> > 304 { 305 template <class Event,class FSM,class STATE > 306 struct state_action_result 307 { 308 typedef typename get_reverse_iterator< 309 typename ::boost::remove_reference< 310 typename get_result_type2<T,Event,FSM,STATE>::type>::type>::type type; 311 }; 312 template <class EVT,class FSM,class SourceState,class TargetState> 313 struct transition_action_result 314 { 315 typedef typename get_reverse_iterator< 316 typename ::boost::remove_reference< 317 typename get_result_type<T,EVT,FSM,SourceState,TargetState>::type>::type>::type type; 318 }; 319 typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type; 320 321 template <class EVT,class FSM,class SourceState,class TargetState> 322 typename ::boost::enable_if< 323 typename ::boost::mpl::has_key< 324 typename T::tag_type,action_tag>::type, 325 typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type operator ()boost::msm::front::euml::REnd_326 operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const 327 { 328 return (T()(evt,fsm,src,tgt)).rend(); 329 } 330 template <class Event,class FSM,class STATE> 331 typename ::boost::enable_if< 332 typename ::boost::mpl::has_key< 333 typename T::tag_type,state_action_tag>::type, 334 typename state_action_result<Event,FSM,STATE>::type >::type operator ()boost::msm::front::euml::REnd_335 operator()(Event const& evt,FSM& fsm,STATE& state )const 336 { 337 return (T()(evt,fsm,state)).rend(); 338 } 339 }; 340 struct rend_tag {}; 341 struct REnd_Helper: proto::extends< proto::terminal<rend_tag>::type, REnd_Helper, boost::msm::sm_domain> 342 { REnd_Helperboost::msm::front::euml::REnd_Helper343 REnd_Helper(){} 344 template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5 345 #ifdef BOOST_MSVC 346 ,class Arg6 347 #endif 348 > 349 struct In 350 { 351 typedef REnd_<Arg1> type; 352 }; 353 }; 354 REnd_Helper const rend_; 355 356 template <class Container,class Element> 357 struct Push_Back_ : euml_action<Push_Back_<Container,Element> > 358 { 359 template <class Event,class FSM,class STATE > 360 struct state_action_result 361 { 362 typedef void type; 363 }; 364 template <class EVT,class FSM,class SourceState,class TargetState> 365 struct transition_action_result 366 { 367 typedef void type; 368 }; 369 typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type; 370 371 template <class EVT,class FSM,class SourceState,class TargetState> operator ()boost::msm::front::euml::Push_Back_372 void operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const 373 { 374 (Container()(evt,fsm,src,tgt)).push_back(Element()(evt,fsm,src,tgt)); 375 } 376 template <class Event,class FSM,class STATE> operator ()boost::msm::front::euml::Push_Back_377 void operator()(Event const& evt,FSM& fsm,STATE& state )const 378 { 379 (Container()(evt,fsm,state)).push_back(Element()(evt,fsm,state)); 380 } 381 }; 382 struct push_back_tag {}; 383 struct Push_Back_Helper: proto::extends< proto::terminal<push_back_tag>::type, Push_Back_Helper, boost::msm::sm_domain> 384 { Push_Back_Helperboost::msm::front::euml::Push_Back_Helper385 Push_Back_Helper(){} 386 template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5 387 #ifdef BOOST_MSVC 388 ,class Arg6 389 #endif 390 > 391 struct In 392 { 393 typedef Push_Back_<Arg1,Arg2> type; 394 }; 395 }; 396 Push_Back_Helper const push_back_; 397 398 template <class Container> 399 struct Pop_Back_ : euml_action<Pop_Back_<Container> > 400 { 401 template <class Event,class FSM,class STATE > 402 struct state_action_result 403 { 404 typedef void type; 405 }; 406 template <class EVT,class FSM,class SourceState,class TargetState> 407 struct transition_action_result 408 { 409 typedef void type; 410 }; 411 typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type; 412 413 template <class EVT,class FSM,class SourceState,class TargetState> operator ()boost::msm::front::euml::Pop_Back_414 void operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const 415 { 416 (Container()(evt,fsm,src,tgt)).pop_back(); 417 } 418 template <class Event,class FSM,class STATE> operator ()boost::msm::front::euml::Pop_Back_419 void operator()(Event const& evt,FSM& fsm,STATE& state )const 420 { 421 (Container()(evt,fsm,state)).pop_back(); 422 } 423 }; 424 struct pop_back_tag {}; 425 struct Pop_Back_Helper: proto::extends< proto::terminal<pop_back_tag>::type, Pop_Back_Helper, boost::msm::sm_domain> 426 { Pop_Back_Helperboost::msm::front::euml::Pop_Back_Helper427 Pop_Back_Helper(){} 428 template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5 429 #ifdef BOOST_MSVC 430 ,class Arg6 431 #endif 432 > 433 struct In 434 { 435 typedef Pop_Back_<Arg1> type; 436 }; 437 }; 438 Pop_Back_Helper const pop_back_; 439 440 template <class Container,class Element> 441 struct Push_Front_ : euml_action<Push_Front_<Container,Element> > 442 { 443 template <class Event,class FSM,class STATE > 444 struct state_action_result 445 { 446 typedef void type; 447 }; 448 template <class EVT,class FSM,class SourceState,class TargetState> 449 struct transition_action_result 450 { 451 typedef void type; 452 }; 453 typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type; 454 455 template <class EVT,class FSM,class SourceState,class TargetState> operator ()boost::msm::front::euml::Push_Front_456 void operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const 457 { 458 (Container()(evt,fsm,src,tgt)).push_front(Element()(evt,fsm,src,tgt)); 459 } 460 template <class Event,class FSM,class STATE> operator ()boost::msm::front::euml::Push_Front_461 void operator()(Event const& evt,FSM& fsm,STATE& state )const 462 { 463 (Container()(evt,fsm,state)).push_front(Element()(evt,fsm,state)); 464 } 465 }; 466 struct push_front_tag {}; 467 struct Push_Front_Helper: proto::extends< proto::terminal<push_front_tag>::type, Push_Front_Helper, boost::msm::sm_domain> 468 { Push_Front_Helperboost::msm::front::euml::Push_Front_Helper469 Push_Front_Helper(){} 470 template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5 471 #ifdef BOOST_MSVC 472 ,class Arg6 473 #endif 474 > 475 struct In 476 { 477 typedef Push_Front_<Arg1,Arg2> type; 478 }; 479 }; 480 Push_Front_Helper const push_front_; 481 482 template <class Container> 483 struct Pop_Front_ : euml_action<Pop_Front_<Container> > 484 { 485 template <class Event,class FSM,class STATE > 486 struct state_action_result 487 { 488 typedef void type; 489 }; 490 template <class EVT,class FSM,class SourceState,class TargetState> 491 struct transition_action_result 492 { 493 typedef void type; 494 }; 495 typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type; 496 497 template <class EVT,class FSM,class SourceState,class TargetState> operator ()boost::msm::front::euml::Pop_Front_498 void operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const 499 { 500 (Container()(evt,fsm,src,tgt)).pop_front(); 501 } 502 template <class Event,class FSM,class STATE> operator ()boost::msm::front::euml::Pop_Front_503 void operator()(Event const& evt,FSM& fsm,STATE& state )const 504 { 505 (Container()(evt,fsm,state)).pop_front(); 506 } 507 }; 508 struct pop_front_tag {}; 509 struct Pop_Front_Helper: proto::extends< proto::terminal<pop_front_tag>::type, Pop_Front_Helper, boost::msm::sm_domain> 510 { Pop_Front_Helperboost::msm::front::euml::Pop_Front_Helper511 Pop_Front_Helper(){} 512 template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5 513 #ifdef BOOST_MSVC 514 ,class Arg6 515 #endif 516 > 517 struct In 518 { 519 typedef Pop_Front_<Arg1> type; 520 }; 521 }; 522 Pop_Front_Helper const pop_front_; 523 524 template <class Container> 525 struct Clear_ : euml_action<Clear_<Container> > 526 { 527 template <class Event,class FSM,class STATE > 528 struct state_action_result 529 { 530 typedef void type; 531 }; 532 template <class EVT,class FSM,class SourceState,class TargetState> 533 struct transition_action_result 534 { 535 typedef void type; 536 }; 537 typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type; 538 539 template <class EVT,class FSM,class SourceState,class TargetState> operator ()boost::msm::front::euml::Clear_540 void operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const 541 { 542 (Container()(evt,fsm,src,tgt)).clear(); 543 } 544 template <class Event,class FSM,class STATE> operator ()boost::msm::front::euml::Clear_545 void operator()(Event const& evt,FSM& fsm,STATE& state )const 546 { 547 (Container()(evt,fsm,state)).clear(); 548 } 549 }; 550 struct clear_tag {}; 551 struct Clear_Helper: proto::extends< proto::terminal<clear_tag>::type, Clear_Helper, boost::msm::sm_domain> 552 { Clear_Helperboost::msm::front::euml::Clear_Helper553 Clear_Helper(){} 554 template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5 555 #ifdef BOOST_MSVC 556 ,class Arg6 557 #endif 558 > 559 struct In 560 { 561 typedef Clear_<Arg1> type; 562 }; 563 }; 564 Clear_Helper const clear_; 565 566 template <class Container> 567 struct ListReverse_ : euml_action<ListReverse_<Container> > 568 { 569 template <class Event,class FSM,class STATE > 570 struct state_action_result 571 { 572 typedef void type; 573 }; 574 template <class EVT,class FSM,class SourceState,class TargetState> 575 struct transition_action_result 576 { 577 typedef void type; 578 }; 579 typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type; 580 581 template <class EVT,class FSM,class SourceState,class TargetState> operator ()boost::msm::front::euml::ListReverse_582 void operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const 583 { 584 (Container()(evt,fsm,src,tgt)).reverse(); 585 } 586 template <class Event,class FSM,class STATE> operator ()boost::msm::front::euml::ListReverse_587 void operator()(Event const& evt,FSM& fsm,STATE& state )const 588 { 589 (Container()(evt,fsm,state)).reverse(); 590 } 591 }; 592 struct list_reverse_tag {}; 593 struct ListReverse_Helper: proto::extends< proto::terminal<list_reverse_tag>::type, ListReverse_Helper, boost::msm::sm_domain> 594 { ListReverse_Helperboost::msm::front::euml::ListReverse_Helper595 ListReverse_Helper(){} 596 template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5 597 #ifdef BOOST_MSVC 598 ,class Arg6 599 #endif 600 > 601 struct In 602 { 603 typedef ListReverse_<Arg1> type; 604 }; 605 }; 606 ListReverse_Helper const list_reverse_; 607 608 template <class Container, class Predicate, class Enable=void> 609 struct ListUnique_ : euml_action<ListUnique_<Container,Predicate,Enable> > 610 { 611 template <class Event,class FSM,class STATE > 612 struct state_action_result 613 { 614 typedef void type; 615 }; 616 template <class EVT,class FSM,class SourceState,class TargetState> 617 struct transition_action_result 618 { 619 typedef void type; 620 }; 621 typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type; 622 623 template <class EVT,class FSM,class SourceState,class TargetState> operator ()boost::msm::front::euml::ListUnique_624 void operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const 625 { 626 (Container()(evt,fsm,src,tgt)).unique(); 627 } 628 template <class Event,class FSM,class STATE> operator ()boost::msm::front::euml::ListUnique_629 void operator()(Event const& evt,FSM& fsm,STATE& state )const 630 { 631 (Container()(evt,fsm,state)).unique(); 632 } 633 }; 634 template <class Container, class Predicate > 635 struct ListUnique_<Container,Predicate, 636 typename ::boost::disable_if<typename ::boost::is_same<Predicate,void>::type >::type> 637 : euml_action<ListUnique_<Container,Predicate> > 638 { 639 template <class Event,class FSM,class STATE > 640 struct state_action_result 641 { 642 typedef void type; 643 }; 644 template <class EVT,class FSM,class SourceState,class TargetState> 645 struct transition_action_result 646 { 647 typedef void type; 648 }; 649 typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type; 650 651 template <class EVT,class FSM,class SourceState,class TargetState> operator ()boost::msm::front::euml::ListUnique_652 void operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const 653 { 654 (Container()(evt,fsm,src,tgt)).unique(Predicate()(evt,fsm,src,tgt)); 655 } 656 template <class Event,class FSM,class STATE> operator ()boost::msm::front::euml::ListUnique_657 void operator()(Event const& evt,FSM& fsm,STATE& state )const 658 { 659 (Container()(evt,fsm,state)).unique(Predicate()(evt,fsm,state)); 660 } 661 }; 662 struct list_unique_tag {}; 663 struct ListUnique_Helper: proto::extends< proto::terminal<list_unique_tag>::type, ListUnique_Helper, boost::msm::sm_domain> 664 { ListUnique_Helperboost::msm::front::euml::ListUnique_Helper665 ListUnique_Helper(){} 666 template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5 667 #ifdef BOOST_MSVC 668 ,class Arg6 669 #endif 670 > 671 struct In 672 { 673 typedef ListUnique_<Arg1,Arg2> type; 674 }; 675 }; 676 ListUnique_Helper const list_unique_; 677 678 template <class Container, class Predicate, class Enable=void> 679 struct ListSort_ : euml_action<ListSort_<Container,Predicate,Enable> > 680 { 681 template <class Event,class FSM,class STATE > 682 struct state_action_result 683 { 684 typedef void type; 685 }; 686 template <class EVT,class FSM,class SourceState,class TargetState> 687 struct transition_action_result 688 { 689 typedef void type; 690 }; 691 typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type; 692 693 template <class EVT,class FSM,class SourceState,class TargetState> operator ()boost::msm::front::euml::ListSort_694 void operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const 695 { 696 (Container()(evt,fsm,src,tgt)).sort(); 697 } 698 template <class Event,class FSM,class STATE> operator ()boost::msm::front::euml::ListSort_699 void operator()(Event const& evt,FSM& fsm,STATE& state )const 700 { 701 (Container()(evt,fsm,state)).sort(); 702 } 703 }; 704 template <class Container, class Predicate > 705 struct ListSort_<Container,Predicate, 706 typename ::boost::disable_if<typename ::boost::is_same<Predicate,void>::type >::type> 707 : euml_action<ListSort_<Container,Predicate> > 708 { 709 template <class Event,class FSM,class STATE > 710 struct state_action_result 711 { 712 typedef void type; 713 }; 714 template <class EVT,class FSM,class SourceState,class TargetState> 715 struct transition_action_result 716 { 717 typedef void type; 718 }; 719 typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type; 720 721 template <class EVT,class FSM,class SourceState,class TargetState> operator ()boost::msm::front::euml::ListSort_722 void operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const 723 { 724 (Container()(evt,fsm,src,tgt)).sort(Predicate()(evt,fsm,src,tgt)); 725 } 726 template <class Event,class FSM,class STATE> operator ()boost::msm::front::euml::ListSort_727 void operator()(Event const& evt,FSM& fsm,STATE& state )const 728 { 729 (Container()(evt,fsm,state)).sort(Predicate()(evt,fsm,state)); 730 } 731 }; 732 struct list_sort_tag {}; 733 struct ListSort_Helper: proto::extends< proto::terminal<list_sort_tag>::type, ListSort_Helper, boost::msm::sm_domain> 734 { ListSort_Helperboost::msm::front::euml::ListSort_Helper735 ListSort_Helper(){} 736 template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5 737 #ifdef BOOST_MSVC 738 ,class Arg6 739 #endif 740 > 741 struct In 742 { 743 typedef ListSort_<Arg1,Arg2> type; 744 }; 745 }; 746 ListSort_Helper const list_sort_; 747 748 template <class Container> 749 struct Capacity_ : euml_action<Capacity_<Container> > 750 { 751 template <class Event,class FSM,class STATE > 752 struct state_action_result 753 { 754 typedef typename get_size_type< 755 typename ::boost::remove_reference< 756 typename get_result_type2<Container,Event,FSM,STATE>::type>::type>::type type; 757 }; 758 template <class EVT,class FSM,class SourceState,class TargetState> 759 struct transition_action_result 760 { 761 typedef typename get_size_type< 762 typename ::boost::remove_reference< 763 typename get_result_type<Container,EVT,FSM,SourceState,TargetState>::type>::type>::type type; 764 }; 765 typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type; 766 767 template <class EVT,class FSM,class SourceState,class TargetState> 768 typename ::boost::enable_if< 769 typename ::boost::mpl::has_key< 770 typename Container::tag_type,action_tag>::type, 771 typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type operator ()boost::msm::front::euml::Capacity_772 operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const 773 { 774 return (Container()(evt,fsm,src,tgt)).capacity(); 775 } 776 template <class Event,class FSM,class STATE> 777 typename ::boost::enable_if< 778 typename ::boost::mpl::has_key< 779 typename Container::tag_type,state_action_tag>::type, 780 typename state_action_result<Event,FSM,STATE>::type >::type operator ()boost::msm::front::euml::Capacity_781 operator()(Event const& evt,FSM& fsm,STATE& state )const 782 { 783 return (Container()(evt,fsm,state)).capacity(); 784 } 785 }; 786 struct capacity_tag {}; 787 struct Capacity_Helper: proto::extends< proto::terminal<capacity_tag>::type, Capacity_Helper, boost::msm::sm_domain> 788 { Capacity_Helperboost::msm::front::euml::Capacity_Helper789 Capacity_Helper(){} 790 template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5 791 #ifdef BOOST_MSVC 792 ,class Arg6 793 #endif 794 > 795 struct In 796 { 797 typedef Capacity_<Arg1> type; 798 }; 799 }; 800 Capacity_Helper const capacity_; 801 802 template <class Container> 803 struct Size_ : euml_action<Size_<Container> > 804 { 805 template <class Event,class FSM,class STATE > 806 struct state_action_result 807 { 808 typedef typename get_size_type< 809 typename ::boost::remove_reference< 810 typename get_result_type2<Container,Event,FSM,STATE>::type>::type>::type type; 811 }; 812 template <class EVT,class FSM,class SourceState,class TargetState> 813 struct transition_action_result 814 { 815 typedef typename get_size_type< 816 typename ::boost::remove_reference< 817 typename get_result_type<Container,EVT,FSM,SourceState,TargetState>::type>::type>::type type; 818 }; 819 typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type; 820 821 template <class EVT,class FSM,class SourceState,class TargetState> 822 typename ::boost::enable_if< 823 typename ::boost::mpl::has_key< 824 typename Container::tag_type,action_tag>::type, 825 typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type operator ()boost::msm::front::euml::Size_826 operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const 827 { 828 return (Container()(evt,fsm,src,tgt)).size(); 829 } 830 template <class Event,class FSM,class STATE> 831 typename ::boost::enable_if< 832 typename ::boost::mpl::has_key< 833 typename Container::tag_type,state_action_tag>::type, 834 typename state_action_result<Event,FSM,STATE>::type >::type operator ()boost::msm::front::euml::Size_835 operator()(Event const& evt,FSM& fsm,STATE& state )const 836 { 837 return (Container()(evt,fsm,state)).size(); 838 } 839 }; 840 struct size_tag {}; 841 struct Size_Helper: proto::extends< proto::terminal<size_tag>::type, Size_Helper, boost::msm::sm_domain> 842 { Size_Helperboost::msm::front::euml::Size_Helper843 Size_Helper(){} 844 template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5 845 #ifdef BOOST_MSVC 846 ,class Arg6 847 #endif 848 > 849 struct In 850 { 851 typedef Size_<Arg1> type; 852 }; 853 }; 854 Size_Helper const size_; 855 856 template <class Container> 857 struct Max_Size_ : euml_action<Max_Size_<Container> > 858 { 859 template <class Event,class FSM,class STATE > 860 struct state_action_result 861 { 862 typedef typename get_size_type< 863 typename ::boost::remove_reference< 864 typename get_result_type2<Container,Event,FSM,STATE>::type>::type>::type type; 865 }; 866 template <class EVT,class FSM,class SourceState,class TargetState> 867 struct transition_action_result 868 { 869 typedef typename get_size_type< 870 typename ::boost::remove_reference< 871 typename get_result_type<Container,EVT,FSM,SourceState,TargetState>::type>::type>::type type; 872 }; 873 typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type; 874 875 template <class EVT,class FSM,class SourceState,class TargetState> 876 typename ::boost::enable_if< 877 typename ::boost::mpl::has_key< 878 typename Container::tag_type,action_tag>::type, 879 typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type operator ()boost::msm::front::euml::Max_Size_880 operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const 881 { 882 return (Container()(evt,fsm,src,tgt)).max_size(); 883 } 884 template <class Event,class FSM,class STATE> 885 typename ::boost::enable_if< 886 typename ::boost::mpl::has_key< 887 typename Container::tag_type,state_action_tag>::type, 888 typename state_action_result<Event,FSM,STATE>::type >::type operator ()boost::msm::front::euml::Max_Size_889 operator()(Event const& evt,FSM& fsm,STATE& state )const 890 { 891 return (Container()(evt,fsm,state)).max_size(); 892 } 893 }; 894 struct max_size_tag {}; 895 struct Max_Size_Helper: proto::extends< proto::terminal<max_size_tag>::type, Max_Size_Helper, boost::msm::sm_domain> 896 { Max_Size_Helperboost::msm::front::euml::Max_Size_Helper897 Max_Size_Helper(){} 898 template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5 899 #ifdef BOOST_MSVC 900 ,class Arg6 901 #endif 902 > 903 struct In 904 { 905 typedef Max_Size_<Arg1> type; 906 }; 907 }; 908 Max_Size_Helper const max_size_; 909 910 template <class Container, class Value> 911 struct Reserve_ : euml_action<Reserve_<Container,Value> > 912 { 913 template <class Event,class FSM,class STATE > 914 struct state_action_result 915 { 916 typedef void type; 917 }; 918 template <class EVT,class FSM,class SourceState,class TargetState> 919 struct transition_action_result 920 { 921 typedef void type; 922 }; 923 typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type; 924 925 template <class EVT,class FSM,class SourceState,class TargetState> operator ()boost::msm::front::euml::Reserve_926 void operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const 927 { 928 (Container()(evt,fsm,src,tgt)).reserve(Value()(evt,fsm,src,tgt)); 929 } 930 template <class Event,class FSM,class STATE> operator ()boost::msm::front::euml::Reserve_931 void operator()(Event const& evt,FSM& fsm,STATE& state )const 932 { 933 (Container()(evt,fsm,state)).reserve(Value()(evt,fsm,state)); 934 } 935 }; 936 struct reserve_tag {}; 937 struct Reserve_Helper: proto::extends< proto::terminal<reserve_tag>::type, Reserve_Helper, boost::msm::sm_domain> 938 { Reserve_Helperboost::msm::front::euml::Reserve_Helper939 Reserve_Helper(){} 940 template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5 941 #ifdef BOOST_MSVC 942 ,class Arg6 943 #endif 944 > 945 struct In 946 { 947 typedef Reserve_<Arg1,Arg2> type; 948 }; 949 }; 950 Reserve_Helper const reserve_; 951 952 template <class Container, class Num, class Value ,class Enable=void > 953 struct Resize_ : euml_action<Resize_<Container,Num,Value> > 954 { 955 template <class Event,class FSM,class STATE > 956 struct state_action_result 957 { 958 typedef void type; 959 }; 960 template <class EVT,class FSM,class SourceState,class TargetState> 961 struct transition_action_result 962 { 963 typedef void type; 964 }; 965 typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type; 966 967 template <class EVT,class FSM,class SourceState,class TargetState> operator ()boost::msm::front::euml::Resize_968 void operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const 969 { 970 (Container()(evt,fsm,src,tgt)).resize(Num()(evt,fsm,src,tgt)); 971 } 972 template <class Event,class FSM,class STATE> operator ()boost::msm::front::euml::Resize_973 void operator()(Event const& evt,FSM& fsm,STATE& state )const 974 { 975 (Container()(evt,fsm,state)).resize(Num()(evt,fsm,state)); 976 } 977 }; 978 template <class Container, class Num , class Value > 979 struct Resize_<Container,Num,Value,typename ::boost::disable_if<typename ::boost::is_same<Value,void>::type >::type> 980 : euml_action<Resize_<Container,Num,Value> > 981 { 982 template <class Event,class FSM,class STATE > 983 struct state_action_result 984 { 985 typedef void type; 986 }; 987 template <class EVT,class FSM,class SourceState,class TargetState> 988 struct transition_action_result 989 { 990 typedef void type; 991 }; 992 typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type; 993 994 template <class EVT,class FSM,class SourceState,class TargetState> operator ()boost::msm::front::euml::Resize_995 void operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const 996 { 997 (Container()(evt,fsm,src,tgt)).resize(Num()(evt,fsm,src,tgt),Value()(evt,fsm,src,tgt)); 998 } 999 template <class Event,class FSM,class STATE> operator ()boost::msm::front::euml::Resize_1000 void operator()(Event const& evt,FSM& fsm,STATE& state )const 1001 { 1002 (Container()(evt,fsm,state)).resize(Num()(evt,fsm,state),Value()(evt,fsm,state)); 1003 } 1004 }; 1005 struct resize_tag {}; 1006 struct Resize_Helper: proto::extends< proto::terminal<resize_tag>::type, Resize_Helper, boost::msm::sm_domain> 1007 { Resize_Helperboost::msm::front::euml::Resize_Helper1008 Resize_Helper(){} 1009 template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5 1010 #ifdef BOOST_MSVC 1011 ,class Arg6 1012 #endif 1013 > 1014 struct In 1015 { 1016 typedef Resize_<Arg1,Arg2,Arg3> type; 1017 }; 1018 }; 1019 Resize_Helper const resize_; 1020 1021 // version for 3 parameters (sequence containers) 1022 template <class Container, class Param1, class Param2, class Param3 > 1023 struct Insert_ : euml_action<Insert_<Container,Param1,Param2,Param3> > 1024 { 1025 template <class Event,class FSM,class STATE > 1026 struct state_action_result 1027 { 1028 typedef void type; 1029 }; 1030 template <class EVT,class FSM,class SourceState,class TargetState> 1031 struct transition_action_result 1032 { 1033 typedef void type; 1034 }; 1035 typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type; 1036 1037 template <class EVT,class FSM,class SourceState,class TargetState> operator ()boost::msm::front::euml::Insert_1038 void operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const 1039 { 1040 (Container()(evt,fsm,src,tgt)).insert(Param1()(evt,fsm,src,tgt),Param2()(evt,fsm,src,tgt), 1041 Param3()(evt,fsm,src,tgt)); 1042 } 1043 template <class Event,class FSM,class STATE> operator ()boost::msm::front::euml::Insert_1044 void operator()(Event const& evt,FSM& fsm,STATE& state )const 1045 { 1046 (Container()(evt,fsm,state)).insert(Param1()(evt,fsm,state),Param2()(evt,fsm,state), 1047 Param3()(evt,fsm,state)); 1048 } 1049 }; 1050 // version for 2 parameters 1051 template <class Container, class Param1, class Param2> 1052 struct Insert_ < Container,Param1,Param2,void> 1053 : euml_action<Insert_<Container,Param1,Param2,void> > 1054 { 1055 // return value will actually not be correct for set::insert(it1,it2), should be void 1056 // but it's ok as nobody should call an inexistent return type 1057 template <class Event,class FSM,class STATE > 1058 struct state_action_result 1059 { 1060 typedef typename get_iterator< 1061 typename ::boost::remove_reference< 1062 typename get_result_type2<Container,Event,FSM,STATE>::type>::type>::type type; 1063 }; 1064 template <class EVT,class FSM,class SourceState,class TargetState> 1065 struct transition_action_result 1066 { 1067 typedef typename get_iterator< 1068 typename ::boost::remove_reference< 1069 typename get_result_type<Container,EVT,FSM,SourceState,TargetState>::type>::type>::type type; 1070 }; 1071 typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type; 1072 1073 // version for transition + second param not an iterator (meaning that, Container is not an associative container) 1074 template <class EVT,class FSM,class SourceState,class TargetState> 1075 typename ::boost::enable_if< 1076 typename ::boost::mpl::and_< 1077 typename ::boost::mpl::has_key< 1078 typename Container::tag_type,action_tag>::type, 1079 typename ::boost::mpl::not_< 1080 typename has_iterator_category< 1081 typename Param2::template transition_action_result<EVT,FSM,SourceState,TargetState>::type 1082 >::type 1083 >::type 1084 >::type, 1085 typename transition_action_result<EVT,FSM,SourceState,TargetState>::type 1086 >::type operator ()boost::msm::front::euml::Insert_1087 operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const 1088 { 1089 return (Container()(evt,fsm,src,tgt)).insert(Param1()(evt,fsm,src,tgt),Param2()(evt,fsm,src,tgt)); 1090 } 1091 1092 // version for transition + second param is an iterator (meaning that, Container is an associative container) 1093 template <class EVT,class FSM,class SourceState,class TargetState> 1094 typename ::boost::enable_if< 1095 typename ::boost::mpl::and_< 1096 typename ::boost::mpl::has_key< 1097 typename Container::tag_type,action_tag>::type, 1098 typename has_iterator_category< 1099 typename Param2::template transition_action_result<EVT,FSM,SourceState,TargetState>::type 1100 >::type 1101 >::type, 1102 typename transition_action_result<EVT,FSM,SourceState,TargetState>::type 1103 >::type operator ()boost::msm::front::euml::Insert_1104 operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const 1105 { 1106 (Container()(evt,fsm,src,tgt)).insert(Param1()(evt,fsm,src,tgt),Param2()(evt,fsm,src,tgt)); 1107 } 1108 1109 // version for state action + second param not an iterator (meaning that, Container is not an associative container) 1110 template <class Event,class FSM,class STATE> 1111 typename ::boost::enable_if< 1112 typename ::boost::mpl::and_< 1113 typename ::boost::mpl::has_key< 1114 typename Container::tag_type,state_action_tag>::type, 1115 typename ::boost::mpl::not_< 1116 typename has_iterator_category< 1117 typename Param2::template state_action_result<Event,FSM,STATE>::type 1118 >::type 1119 >::type 1120 >::type, 1121 typename state_action_result<Event,FSM,STATE>::type 1122 >::type operator ()boost::msm::front::euml::Insert_1123 operator()(Event const& evt,FSM& fsm,STATE& state )const 1124 { 1125 return (Container()(evt,fsm,state)).insert(Param1()(evt,fsm,state),Param2()(evt,fsm,state)); 1126 } 1127 1128 // version for state action + second param is an iterator (meaning that, Container is an associative container) 1129 template <class Event,class FSM,class STATE> 1130 typename ::boost::enable_if< 1131 typename ::boost::mpl::and_< 1132 typename ::boost::mpl::has_key< 1133 typename Container::tag_type,state_action_tag>::type, 1134 typename has_iterator_category< 1135 typename Param2::template state_action_result<Event,FSM,STATE>::type 1136 >::type 1137 >::type, 1138 typename state_action_result<Event,FSM,STATE>::type 1139 >::type operator ()boost::msm::front::euml::Insert_1140 operator()(Event const& evt,FSM& fsm,STATE& state )const 1141 { 1142 (Container()(evt,fsm,state)).insert(Param1()(evt,fsm,state),Param2()(evt,fsm,state)); 1143 } 1144 }; 1145 1146 // version for 1 parameter (associative containers) 1147 template <class Container, class Param1> 1148 struct Insert_ < Container,Param1,void,void> 1149 : euml_action<Insert_<Container,Param1,void,void> > 1150 { 1151 template <class Event,class FSM,class STATE > 1152 struct state_action_result 1153 { 1154 typedef typename std::pair< 1155 typename get_iterator< 1156 typename ::boost::remove_reference< 1157 typename get_result_type2<Container,Event,FSM,STATE>::type>::type>::type,bool> type; 1158 }; 1159 template <class EVT,class FSM,class SourceState,class TargetState> 1160 struct transition_action_result 1161 { 1162 typedef typename std::pair< 1163 typename get_iterator< 1164 typename ::boost::remove_reference< 1165 typename get_result_type<Container,EVT,FSM,SourceState,TargetState>::type>::type>::type,bool> type; 1166 }; 1167 typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type; 1168 1169 template <class EVT,class FSM,class SourceState,class TargetState> 1170 typename ::boost::enable_if< 1171 typename ::boost::mpl::has_key< 1172 typename Container::tag_type,action_tag>::type, 1173 typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type operator ()boost::msm::front::euml::Insert_1174 operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const 1175 { 1176 return (Container()(evt,fsm,src,tgt)).insert(Param1()(evt,fsm,src,tgt)); 1177 } 1178 template <class Event,class FSM,class STATE> 1179 typename ::boost::enable_if< 1180 typename ::boost::mpl::has_key< 1181 typename Container::tag_type,state_action_tag>::type, 1182 typename state_action_result<Event,FSM,STATE>::type >::type operator ()boost::msm::front::euml::Insert_1183 operator()(Event const& evt,FSM& fsm,STATE& state )const 1184 { 1185 return (Container()(evt,fsm,state)).insert(Param1()(evt,fsm,state)); 1186 } 1187 }; 1188 struct insert_tag {}; 1189 struct Insert_Helper: proto::extends< proto::terminal<insert_tag>::type, Insert_Helper, boost::msm::sm_domain> 1190 { Insert_Helperboost::msm::front::euml::Insert_Helper1191 Insert_Helper(){} 1192 template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5 1193 #ifdef BOOST_MSVC 1194 ,class Arg6 1195 #endif 1196 > 1197 struct In 1198 { 1199 typedef Insert_<Arg1,Arg2,Arg3,Arg4> type; 1200 }; 1201 }; 1202 Insert_Helper const insert_; 1203 1204 template <class Container1,class Container2> 1205 struct Swap_ : euml_action<Swap_<Container1,Container2> > 1206 { 1207 template <class Event,class FSM,class STATE > 1208 struct state_action_result 1209 { 1210 typedef void type; 1211 }; 1212 template <class EVT,class FSM,class SourceState,class TargetState> 1213 struct transition_action_result 1214 { 1215 typedef void type; 1216 }; 1217 typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type; 1218 1219 template <class EVT,class FSM,class SourceState,class TargetState> operator ()boost::msm::front::euml::Swap_1220 void operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const 1221 { 1222 (Container1()(evt,fsm,src,tgt)).swap(Container2()(evt,fsm,src,tgt)); 1223 } 1224 template <class Event,class FSM,class STATE> operator ()boost::msm::front::euml::Swap_1225 void operator()(Event const& evt,FSM& fsm,STATE& state )const 1226 { 1227 (Container1()(evt,fsm,state)).swap(Container2()(evt,fsm,state)); 1228 } 1229 }; 1230 struct swap_tag {}; 1231 struct Swap_Helper: proto::extends< proto::terminal<swap_tag>::type, Swap_Helper, boost::msm::sm_domain> 1232 { Swap_Helperboost::msm::front::euml::Swap_Helper1233 Swap_Helper(){} 1234 template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5 1235 #ifdef BOOST_MSVC 1236 ,class Arg6 1237 #endif 1238 > 1239 struct In 1240 { 1241 typedef Swap_<Arg1,Arg2> type; 1242 }; 1243 }; 1244 Swap_Helper const swap_; 1245 1246 template <class Container, class Iterator1, class Iterator2 ,class Enable=void > 1247 struct Erase_ : euml_action<Erase_<Container,Iterator1,Iterator2> > 1248 { 1249 template <class Event,class FSM,class STATE > 1250 struct state_action_result 1251 { 1252 typedef typename get_result_type2<Iterator1,Event,FSM,STATE>::type type; 1253 }; 1254 template <class EVT,class FSM,class SourceState,class TargetState> 1255 struct transition_action_result 1256 { 1257 typedef typename get_result_type<Iterator1,EVT,FSM,SourceState,TargetState>::type type; 1258 }; 1259 typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type; 1260 1261 template <class EVT,class FSM,class SourceState,class TargetState> 1262 typename ::boost::enable_if< 1263 typename ::boost::mpl::has_key< 1264 typename Iterator1::tag_type,action_tag>::type, 1265 typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type operator ()boost::msm::front::euml::Erase_1266 operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const 1267 { 1268 return (Container()(evt,fsm,src,tgt)).erase(Iterator1()(evt,fsm,src,tgt)); 1269 } 1270 template <class Event,class FSM,class STATE> 1271 typename ::boost::enable_if< 1272 typename ::boost::mpl::has_key< 1273 typename Iterator1::tag_type,state_action_tag>::type, 1274 typename state_action_result<Event,FSM,STATE>::type >::type operator ()boost::msm::front::euml::Erase_1275 operator()(Event const& evt,FSM& fsm,STATE& state )const 1276 { 1277 return (Container()(evt,fsm,state)).erase(Iterator1()(evt,fsm,state)); 1278 } 1279 }; 1280 template <class Container, class Iterator1 , class Iterator2 > 1281 struct Erase_<Container,Iterator1,Iterator2, 1282 typename ::boost::disable_if<typename ::boost::is_same<Iterator2,void>::type >::type> 1283 : euml_action<Erase_<Container,Iterator1,Iterator2> > 1284 { 1285 template <class Event,class FSM,class STATE > 1286 struct state_action_result 1287 { 1288 typedef typename get_result_type2<Iterator1,Event,FSM,STATE>::type type; 1289 }; 1290 template <class EVT,class FSM,class SourceState,class TargetState> 1291 struct transition_action_result 1292 { 1293 typedef typename get_result_type<Iterator1,EVT,FSM,SourceState,TargetState>::type type; 1294 }; 1295 typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type; 1296 1297 template <class EVT,class FSM,class SourceState,class TargetState> 1298 typename ::boost::enable_if< 1299 typename ::boost::mpl::has_key< 1300 typename Iterator1::tag_type,action_tag>::type, 1301 typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type operator ()boost::msm::front::euml::Erase_1302 operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const 1303 { 1304 return (Container()(evt,fsm,src,tgt)).erase(Iterator1()(evt,fsm,src,tgt),Iterator2()(evt,fsm,src,tgt)); 1305 } 1306 template <class Event,class FSM,class STATE> 1307 typename ::boost::enable_if< 1308 typename ::boost::mpl::has_key< 1309 typename Iterator1::tag_type,state_action_tag>::type, 1310 typename state_action_result<Event,FSM,STATE>::type >::type operator ()boost::msm::front::euml::Erase_1311 operator()(Event const& evt,FSM& fsm,STATE& state )const 1312 { 1313 return (Container()(evt,fsm,state)).erase(Iterator1()(evt,fsm,state),Iterator2()(evt,fsm,state)); 1314 } 1315 }; 1316 struct erase_tag {}; 1317 struct Erase_Helper: proto::extends< proto::terminal<erase_tag>::type, Erase_Helper, boost::msm::sm_domain> 1318 { Erase_Helperboost::msm::front::euml::Erase_Helper1319 Erase_Helper(){} 1320 template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5 1321 #ifdef BOOST_MSVC 1322 ,class Arg6 1323 #endif 1324 > 1325 struct In 1326 { 1327 typedef Erase_<Arg1,Arg2,Arg3> type; 1328 }; 1329 }; 1330 Erase_Helper const erase_; 1331 1332 template <class Container> 1333 struct Empty_ : euml_action<Empty_<Container> > 1334 { 1335 template <class Event,class FSM,class STATE > 1336 struct state_action_result 1337 { 1338 typedef bool type; 1339 }; 1340 template <class EVT,class FSM,class SourceState,class TargetState> 1341 struct transition_action_result 1342 { 1343 typedef bool type; 1344 }; 1345 typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type; 1346 1347 template <class EVT,class FSM,class SourceState,class TargetState> operator ()boost::msm::front::euml::Empty_1348 bool operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const 1349 { 1350 return (Container()(evt,fsm,src,tgt)).empty(); 1351 } 1352 template <class Event,class FSM,class STATE> operator ()boost::msm::front::euml::Empty_1353 bool operator()(Event const& evt,FSM& fsm,STATE& state )const 1354 { 1355 return (Container()(evt,fsm,state)).empty(); 1356 } 1357 }; 1358 struct empty_tag {}; 1359 struct Empty_Helper: proto::extends< proto::terminal<empty_tag>::type, Empty_Helper, boost::msm::sm_domain> 1360 { Empty_Helperboost::msm::front::euml::Empty_Helper1361 Empty_Helper(){} 1362 template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5 1363 #ifdef BOOST_MSVC 1364 ,class Arg6 1365 #endif 1366 > 1367 struct In 1368 { 1369 typedef Empty_<Arg1> type; 1370 }; 1371 }; 1372 Empty_Helper const empty_; 1373 1374 template <class Container,class Element> 1375 struct ListRemove_ : euml_action<ListRemove_<Container,Element> > 1376 { 1377 template <class Event,class FSM,class STATE > 1378 struct state_action_result 1379 { 1380 typedef void type; 1381 }; 1382 template <class EVT,class FSM,class SourceState,class TargetState> 1383 struct transition_action_result 1384 { 1385 typedef void type; 1386 }; 1387 typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type; 1388 1389 template <class EVT,class FSM,class SourceState,class TargetState> operator ()boost::msm::front::euml::ListRemove_1390 void operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const 1391 { 1392 (Container()(evt,fsm,src,tgt)).remove(Element()(evt,fsm,src,tgt)); 1393 } 1394 template <class Event,class FSM,class STATE> operator ()boost::msm::front::euml::ListRemove_1395 void operator()(Event const& evt,FSM& fsm,STATE& state )const 1396 { 1397 (Container()(evt,fsm,state)).remove(Element()(evt,fsm,state)); 1398 } 1399 }; 1400 struct list_remove_tag {}; 1401 struct ListRemove_Helper: proto::extends< proto::terminal<list_remove_tag>::type, ListRemove_Helper, boost::msm::sm_domain> 1402 { ListRemove_Helperboost::msm::front::euml::ListRemove_Helper1403 ListRemove_Helper(){} 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 ListRemove_<Arg1,Arg2> type; 1412 }; 1413 }; 1414 ListRemove_Helper const list_remove_; 1415 1416 template <class Container,class Element> 1417 struct ListRemove_If_ : euml_action<ListRemove_If_<Container,Element> > 1418 { 1419 template <class Event,class FSM,class STATE > 1420 struct state_action_result 1421 { 1422 typedef void type; 1423 }; 1424 template <class EVT,class FSM,class SourceState,class TargetState> 1425 struct transition_action_result 1426 { 1427 typedef void type; 1428 }; 1429 typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type; 1430 1431 template <class EVT,class FSM,class SourceState,class TargetState> operator ()boost::msm::front::euml::ListRemove_If_1432 void operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const 1433 { 1434 (Container()(evt,fsm,src,tgt)).remove_if(Element()(evt,fsm,src,tgt)); 1435 } 1436 template <class Event,class FSM,class STATE> operator ()boost::msm::front::euml::ListRemove_If_1437 void operator()(Event const& evt,FSM& fsm,STATE& state )const 1438 { 1439 (Container()(evt,fsm,state)).remove_if(Element()(evt,fsm,state)); 1440 } 1441 }; 1442 struct list_remove_if_tag {}; 1443 struct ListRemove_If_Helper: proto::extends< proto::terminal<list_remove_if_tag>::type, ListRemove_If_Helper, boost::msm::sm_domain> 1444 { ListRemove_If_Helperboost::msm::front::euml::ListRemove_If_Helper1445 ListRemove_If_Helper(){} 1446 template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5 1447 #ifdef BOOST_MSVC 1448 ,class Arg6 1449 #endif 1450 > 1451 struct In 1452 { 1453 typedef ListRemove_If_<Arg1,Arg2> type; 1454 }; 1455 }; 1456 ListRemove_If_Helper const list_remove_if_; 1457 1458 template <class Container, class ToMerge, class Predicate, class Enable=void> 1459 struct ListMerge_ : euml_action<ListMerge_<Container,ToMerge,Predicate,Enable> > 1460 { 1461 template <class Event,class FSM,class STATE > 1462 struct state_action_result 1463 { 1464 typedef void type; 1465 }; 1466 template <class EVT,class FSM,class SourceState,class TargetState> 1467 struct transition_action_result 1468 { 1469 typedef void type; 1470 }; 1471 typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type; 1472 1473 template <class EVT,class FSM,class SourceState,class TargetState> operator ()boost::msm::front::euml::ListMerge_1474 void operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const 1475 { 1476 (Container()(evt,fsm,src,tgt)).merge(ToMerge()(evt,fsm,src,tgt)); 1477 } 1478 template <class Event,class FSM,class STATE> operator ()boost::msm::front::euml::ListMerge_1479 void operator()(Event const& evt,FSM& fsm,STATE& state )const 1480 { 1481 (Container()(evt,fsm,state)).merge(ToMerge()(evt,fsm,state)); 1482 } 1483 }; 1484 template <class Container, class ToMerge, class Predicate > 1485 struct ListMerge_<Container,ToMerge,Predicate, 1486 typename ::boost::disable_if<typename ::boost::is_same<Predicate,void>::type >::type> 1487 : euml_action<ListMerge_<Container,ToMerge,Predicate> > 1488 { 1489 template <class Event,class FSM,class STATE > 1490 struct state_action_result 1491 { 1492 typedef void type; 1493 }; 1494 template <class EVT,class FSM,class SourceState,class TargetState> 1495 struct transition_action_result 1496 { 1497 typedef void type; 1498 }; 1499 typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type; 1500 1501 template <class EVT,class FSM,class SourceState,class TargetState> operator ()boost::msm::front::euml::ListMerge_1502 void operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const 1503 { 1504 (Container()(evt,fsm,src,tgt)).merge(ToMerge()(evt,fsm,src,tgt),Predicate()(evt,fsm,src,tgt)); 1505 } 1506 template <class Event,class FSM,class STATE> operator ()boost::msm::front::euml::ListMerge_1507 void operator()(Event const& evt,FSM& fsm,STATE& state )const 1508 { 1509 (Container()(evt,fsm,state)).merge(ToMerge()(evt,fsm,state),Predicate()(evt,fsm,state)); 1510 } 1511 }; 1512 struct list_merge_tag {}; 1513 struct ListMerge_Helper: proto::extends< proto::terminal<list_merge_tag>::type, ListMerge_Helper, boost::msm::sm_domain> 1514 { ListMerge_Helperboost::msm::front::euml::ListMerge_Helper1515 ListMerge_Helper(){} 1516 template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5 1517 #ifdef BOOST_MSVC 1518 ,class Arg6 1519 #endif 1520 > 1521 struct In 1522 { 1523 typedef ListMerge_<Arg1,Arg2,Arg3> type; 1524 }; 1525 }; 1526 ListMerge_Helper const list_merge_; 1527 1528 template <class Container, class Param1, class Param2, class Param3, class Param4 ,class Enable=void > 1529 struct Splice_ : euml_action<Splice_<Container,Param1,Param2,Param3,Param4,Enable> > 1530 { 1531 template <class Event,class FSM,class STATE > 1532 struct state_action_result 1533 { 1534 typedef void type; 1535 }; 1536 template <class EVT,class FSM,class SourceState,class TargetState> 1537 struct transition_action_result 1538 { 1539 typedef void type; 1540 }; 1541 typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type; 1542 1543 template <class EVT,class FSM,class SourceState,class TargetState> 1544 typename ::boost::enable_if< 1545 typename ::boost::mpl::has_key< 1546 typename Container::tag_type,action_tag>::type, 1547 typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type operator ()boost::msm::front::euml::Splice_1548 operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const 1549 { 1550 return (Container()(evt,fsm,src,tgt)).splice(Param1()(evt,fsm,src,tgt),Param2()(evt,fsm,src,tgt)); 1551 } 1552 template <class Event,class FSM,class STATE> 1553 typename ::boost::enable_if< 1554 typename ::boost::mpl::has_key< 1555 typename Container::tag_type,state_action_tag>::type, 1556 typename state_action_result<Event,FSM,STATE>::type >::type operator ()boost::msm::front::euml::Splice_1557 operator()(Event const& evt,FSM& fsm,STATE& state )const 1558 { 1559 return (Container()(evt,fsm,state)).splice(Param1()(evt,fsm,state),Param2()(evt,fsm,state)); 1560 } 1561 }; 1562 template <class Container, class Param1, class Param2, class Param3, class Param4 > 1563 struct Splice_<Container,Param1,Param2,Param3,Param4, 1564 typename ::boost::disable_if< 1565 typename ::boost::mpl::or_<typename ::boost::is_same<Param3,void>::type, 1566 typename ::boost::mpl::not_< 1567 typename ::boost::is_same<Param4,void>::type>::type>::type >::type> 1568 : euml_action<Splice_<Container,Param1,Param2,Param3,Param4> > 1569 { 1570 template <class Event,class FSM,class STATE > 1571 struct state_action_result 1572 { 1573 typedef void type; 1574 }; 1575 template <class EVT,class FSM,class SourceState,class TargetState> 1576 struct transition_action_result 1577 { 1578 typedef void type; 1579 }; 1580 typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type; 1581 1582 template <class EVT,class FSM,class SourceState,class TargetState> operator ()boost::msm::front::euml::Splice_1583 void operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const 1584 { 1585 (Container()(evt,fsm,src,tgt)).splice(Param1()(evt,fsm,src,tgt),Param2()(evt,fsm,src,tgt), 1586 Param3()(evt,fsm,src,tgt)); 1587 } 1588 template <class Event,class FSM,class STATE> operator ()boost::msm::front::euml::Splice_1589 void operator()(Event const& evt,FSM& fsm,STATE& state )const 1590 { 1591 (Container()(evt,fsm,state)).splice(Param1()(evt,fsm,state),Param2()(evt,fsm,state), 1592 Param3()(evt,fsm,state)); 1593 } 1594 }; 1595 template <class Container, class Param1, class Param2, class Param3, class Param4 > 1596 struct Splice_<Container,Param1,Param2,Param3,Param4, 1597 typename ::boost::disable_if<typename ::boost::is_same<Param4,void>::type >::type> 1598 : euml_action<Splice_<Container,Param1,Param2,Param3,Param4> > 1599 { 1600 template <class Event,class FSM,class STATE > 1601 struct state_action_result 1602 { 1603 typedef void type; 1604 }; 1605 template <class EVT,class FSM,class SourceState,class TargetState> 1606 struct transition_action_result 1607 { 1608 typedef void type; 1609 }; 1610 typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type; 1611 1612 template <class EVT,class FSM,class SourceState,class TargetState> operator ()boost::msm::front::euml::Splice_1613 void operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const 1614 { 1615 (Container()(evt,fsm,src,tgt)).splice(Param1()(evt,fsm,src,tgt),Param2()(evt,fsm,src,tgt), 1616 Param3()(evt,fsm,src,tgt),Param4()(evt,fsm,src,tgt)); 1617 } 1618 template <class Event,class FSM,class STATE> operator ()boost::msm::front::euml::Splice_1619 void operator()(Event const& evt,FSM& fsm,STATE& state )const 1620 { 1621 (Container()(evt,fsm,state)).splice(Param1()(evt,fsm,state),Param2()(evt,fsm,state), 1622 Param3()(evt,fsm,state),Param4()(evt,fsm,state)); 1623 } 1624 }; 1625 struct splice_tag {}; 1626 struct Splice_Helper: proto::extends< proto::terminal<splice_tag>::type, Splice_Helper, boost::msm::sm_domain> 1627 { Splice_Helperboost::msm::front::euml::Splice_Helper1628 Splice_Helper(){} 1629 template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5 1630 #ifdef BOOST_MSVC 1631 ,class Arg6 1632 #endif 1633 > 1634 struct In 1635 { 1636 typedef Splice_<Arg1,Arg2,Arg3,Arg4,Arg5> type; 1637 }; 1638 }; 1639 Splice_Helper const splice_; 1640 1641 //template <class Container, class Param1, class Param2, class Param3, class Enable=void > 1642 //struct StringFind_ : euml_action<StringFind_<Container,Param1,Param2,Param3,Enable> > 1643 //{ 1644 //}; 1645 template <class Container,class Param1, class Param2, class Param3> 1646 struct StringFind_ : euml_action<StringFind_<Container,Param1,Param2,Param3> > 1647 { 1648 template <class Event,class FSM,class STATE > 1649 struct state_action_result 1650 { 1651 typedef typename remove_reference< 1652 typename get_result_type2<Container,Event,FSM,STATE>::type>::type::size_type type; 1653 }; 1654 template <class EVT,class FSM,class SourceState,class TargetState> 1655 struct transition_action_result 1656 { 1657 typedef typename remove_reference< 1658 typename get_result_type<Container,EVT,FSM,SourceState,TargetState>::type>::type::size_type type; 1659 }; 1660 typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type; 1661 1662 template <class EVT,class FSM,class SourceState,class TargetState> 1663 typename transition_action_result<EVT,FSM,SourceState,TargetState>::type operator ()boost::msm::front::euml::StringFind_1664 operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const 1665 { 1666 return (Container()(evt,fsm,src,tgt)). 1667 find(Param1()(evt,fsm,src,tgt),Param2()(evt,fsm,src,tgt),Param3()(evt,fsm,src,tgt)); 1668 } 1669 template <class Event,class FSM,class STATE> 1670 typename state_action_result<Event,FSM,STATE>::type operator ()boost::msm::front::euml::StringFind_1671 operator()(Event const& evt,FSM& fsm,STATE& state )const 1672 { 1673 return (Container()(evt,fsm,state)). 1674 find(Param1()(evt,fsm,state),Param2()(evt,fsm,state),Param3()(evt,fsm,state)); 1675 } 1676 }; 1677 1678 template <class Container,class Param1> 1679 struct StringFind_ < Container,Param1,void,void> 1680 : euml_action<StringFind_<Container,Param1,void,void> > 1681 1682 { 1683 template <class Event,class FSM,class STATE > 1684 struct state_action_result 1685 { 1686 typedef typename remove_reference< 1687 typename get_result_type2<Container,Event,FSM,STATE>::type>::type::size_type type; 1688 }; 1689 template <class EVT,class FSM,class SourceState,class TargetState> 1690 struct transition_action_result 1691 { 1692 typedef typename remove_reference< 1693 typename get_result_type<Container,EVT,FSM,SourceState,TargetState>::type>::type::size_type type; 1694 }; 1695 typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type; 1696 1697 template <class EVT,class FSM,class SourceState,class TargetState> 1698 typename transition_action_result<EVT,FSM,SourceState,TargetState>::type operator ()boost::msm::front::euml::StringFind_1699 operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const 1700 { 1701 return (Container()(evt,fsm,src,tgt)).find(Param1()(evt,fsm,src,tgt)); 1702 } 1703 template <class Event,class FSM,class STATE> 1704 typename state_action_result<Event,FSM,STATE>::type operator ()boost::msm::front::euml::StringFind_1705 operator()(Event const& evt,FSM& fsm,STATE& state )const 1706 { 1707 return (Container()(evt,fsm,state)).find(Param1()(evt,fsm,state)); 1708 } 1709 }; 1710 1711 template <class Container,class Param1, class Param2> 1712 struct StringFind_ <Container,Param1,Param2,void> 1713 : euml_action<StringFind_<Container,Param1,Param2,void> > 1714 { 1715 template <class Event,class FSM,class STATE > 1716 struct state_action_result 1717 { 1718 typedef typename remove_reference< 1719 typename get_result_type2<Container,Event,FSM,STATE>::type>::type::size_type type; 1720 }; 1721 template <class EVT,class FSM,class SourceState,class TargetState> 1722 struct transition_action_result 1723 { 1724 typedef typename remove_reference< 1725 typename get_result_type<Container,EVT,FSM,SourceState,TargetState>::type>::type::size_type type; 1726 }; 1727 typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type; 1728 1729 template <class EVT,class FSM,class SourceState,class TargetState> 1730 typename transition_action_result<EVT,FSM,SourceState,TargetState>::type operator ()boost::msm::front::euml::StringFind_1731 operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const 1732 { 1733 return (Container()(evt,fsm,src,tgt)).find(Param1()(evt,fsm,src,tgt),Param2()(evt,fsm,src,tgt)); 1734 } 1735 template <class Event,class FSM,class STATE> 1736 typename state_action_result<Event,FSM,STATE>::type operator ()boost::msm::front::euml::StringFind_1737 operator()(Event const& evt,FSM& fsm,STATE& state )const 1738 { 1739 return (Container()(evt,fsm,state)).find(Param1()(evt,fsm,state),Param2()(evt,fsm,state)); 1740 } 1741 }; 1742 1743 struct string_find_tag {}; 1744 struct StringFind_Helper: proto::extends< proto::terminal<string_find_tag>::type, StringFind_Helper, boost::msm::sm_domain> 1745 { StringFind_Helperboost::msm::front::euml::StringFind_Helper1746 StringFind_Helper(){} 1747 template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5 1748 #ifdef BOOST_MSVC 1749 ,class Arg6 1750 #endif 1751 > 1752 struct In 1753 { 1754 typedef StringFind_<Arg1,Arg2,Arg3,Arg4> type; 1755 }; 1756 }; 1757 StringFind_Helper const string_find_; 1758 1759 template <class Container, class Param1, class Param2, class Param3, class Enable=void > 1760 struct StringRFind_ : euml_action<StringRFind_<Container,Param1,Param2,Param3,Enable> > 1761 { 1762 }; 1763 1764 template <class Container,class Param1, class Param2, class Param3> 1765 struct StringRFind_ < 1766 Container,Param1,Param2,Param3, 1767 typename ::boost::enable_if< 1768 typename ::boost::is_same<Param2,void>::type 1769 >::type 1770 > 1771 : euml_action<StringRFind_<Container,Param1,Param2,Param3> > 1772 1773 { 1774 template <class Event,class FSM,class STATE > 1775 struct state_action_result 1776 { 1777 typedef typename remove_reference< 1778 typename get_result_type2<Container,Event,FSM,STATE>::type>::type::size_type type; 1779 }; 1780 template <class EVT,class FSM,class SourceState,class TargetState> 1781 struct transition_action_result 1782 { 1783 typedef typename remove_reference< 1784 typename get_result_type<Container,EVT,FSM,SourceState,TargetState>::type>::type::size_type type; 1785 }; 1786 typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type; 1787 1788 template <class EVT,class FSM,class SourceState,class TargetState> 1789 typename transition_action_result<EVT,FSM,SourceState,TargetState>::type operator ()boost::msm::front::euml::StringRFind_1790 operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const 1791 { 1792 return (Container()(evt,fsm,src,tgt)).rfind(Param1()(evt,fsm,src,tgt)); 1793 } 1794 template <class Event,class FSM,class STATE> 1795 typename state_action_result<Event,FSM,STATE>::type operator ()boost::msm::front::euml::StringRFind_1796 operator()(Event const& evt,FSM& fsm,STATE& state )const 1797 { 1798 return (Container()(evt,fsm,state)).rfind(Param1()(evt,fsm,state)); 1799 } 1800 }; 1801 1802 template <class Container,class Param1, class Param2, class Param3> 1803 struct StringRFind_ < 1804 Container,Param1,Param2,Param3, 1805 typename ::boost::enable_if< 1806 typename ::boost::mpl::and_< 1807 typename ::boost::is_same<Param3,void>::type, 1808 typename ::boost::mpl::not_< 1809 typename ::boost::is_same<Param2,void>::type 1810 >::type 1811 >::type 1812 >::type 1813 > 1814 : euml_action<StringRFind_<Container,Param1,Param2,Param3> > 1815 { 1816 template <class Event,class FSM,class STATE > 1817 struct state_action_result 1818 { 1819 typedef typename remove_reference< 1820 typename get_result_type2<Container,Event,FSM,STATE>::type>::type::size_type type; 1821 }; 1822 template <class EVT,class FSM,class SourceState,class TargetState> 1823 struct transition_action_result 1824 { 1825 typedef typename remove_reference< 1826 typename get_result_type<Container,EVT,FSM,SourceState,TargetState>::type>::type::size_type type; 1827 }; 1828 typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type; 1829 1830 template <class EVT,class FSM,class SourceState,class TargetState> 1831 typename transition_action_result<EVT,FSM,SourceState,TargetState>::type operator ()boost::msm::front::euml::StringRFind_1832 operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const 1833 { 1834 return (Container()(evt,fsm,src,tgt)).rfind(Param1()(evt,fsm,src,tgt),Param2()(evt,fsm,src,tgt)); 1835 } 1836 template <class Event,class FSM,class STATE> 1837 typename state_action_result<Event,FSM,STATE>::type operator ()boost::msm::front::euml::StringRFind_1838 operator()(Event const& evt,FSM& fsm,STATE& state )const 1839 { 1840 return (Container()(evt,fsm,state)).rfind(Param1()(evt,fsm,state),Param2()(evt,fsm,state)); 1841 } 1842 }; 1843 1844 template <class Container,class Param1, class Param2, class Param3> 1845 struct StringRFind_< 1846 Container,Param1,Param2,Param3, 1847 typename ::boost::disable_if< 1848 typename ::boost::is_same<Param3,void>::type 1849 >::type 1850 > 1851 : euml_action<StringRFind_<Container,Param1,Param2,Param3> > 1852 { 1853 template <class Event,class FSM,class STATE > 1854 struct state_action_result 1855 { 1856 typedef typename remove_reference< 1857 typename get_result_type2<Container,Event,FSM,STATE>::type>::type::size_type type; 1858 }; 1859 template <class EVT,class FSM,class SourceState,class TargetState> 1860 struct transition_action_result 1861 { 1862 typedef typename remove_reference< 1863 typename get_result_type<Container,EVT,FSM,SourceState,TargetState>::type>::type::size_type type; 1864 }; 1865 typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type; 1866 1867 template <class EVT,class FSM,class SourceState,class TargetState> 1868 typename transition_action_result<EVT,FSM,SourceState,TargetState>::type operator ()boost::msm::front::euml::StringRFind_1869 operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const 1870 { 1871 return (Container()(evt,fsm,src,tgt)). 1872 rfind(Param1()(evt,fsm,src,tgt),Param2()(evt,fsm,src,tgt),Param3()(evt,fsm,src,tgt)); 1873 } 1874 template <class Event,class FSM,class STATE> 1875 typename state_action_result<Event,FSM,STATE>::type operator ()boost::msm::front::euml::StringRFind_1876 operator()(Event const& evt,FSM& fsm,STATE& state )const 1877 { 1878 return (Container()(evt,fsm,state)). 1879 rfind(Param1()(evt,fsm,state),Param2()(evt,fsm,state),Param3()(evt,fsm,state)); 1880 } 1881 }; 1882 1883 struct string_rfind_tag {}; 1884 struct StringRFind_Helper: proto::extends< proto::terminal<string_rfind_tag>::type, StringRFind_Helper, boost::msm::sm_domain> 1885 { StringRFind_Helperboost::msm::front::euml::StringRFind_Helper1886 StringRFind_Helper(){} 1887 template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5 1888 #ifdef BOOST_MSVC 1889 ,class Arg6 1890 #endif 1891 > 1892 struct In 1893 { 1894 typedef StringRFind_<Arg1,Arg2,Arg3,Arg4> type; 1895 }; 1896 }; 1897 StringRFind_Helper const string_rfind_; 1898 1899 template <class Container,class Param1, class Param2, class Param3> 1900 struct StringFindFirstOf_ : euml_action<StringFindFirstOf_<Container,Param1,Param2,Param3> > 1901 { 1902 template <class Event,class FSM,class STATE > 1903 struct state_action_result 1904 { 1905 typedef typename remove_reference< 1906 typename get_result_type2<Container,Event,FSM,STATE>::type>::type::size_type type; 1907 }; 1908 template <class EVT,class FSM,class SourceState,class TargetState> 1909 struct transition_action_result 1910 { 1911 typedef typename remove_reference< 1912 typename get_result_type<Container,EVT,FSM,SourceState,TargetState>::type>::type::size_type type; 1913 }; 1914 typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type; 1915 1916 template <class EVT,class FSM,class SourceState,class TargetState> 1917 typename transition_action_result<EVT,FSM,SourceState,TargetState>::type operator ()boost::msm::front::euml::StringFindFirstOf_1918 operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const 1919 { 1920 return (Container()(evt,fsm,src,tgt)). 1921 find_first_of(Param1()(evt,fsm,src,tgt),Param2()(evt,fsm,src,tgt),Param3()(evt,fsm,src,tgt)); 1922 } 1923 template <class Event,class FSM,class STATE> 1924 typename state_action_result<Event,FSM,STATE>::type operator ()boost::msm::front::euml::StringFindFirstOf_1925 operator()(Event const& evt,FSM& fsm,STATE& state )const 1926 { 1927 return (Container()(evt,fsm,state)). 1928 find_first_of(Param1()(evt,fsm,state),Param2()(evt,fsm,state),Param3()(evt,fsm,state)); 1929 } 1930 }; 1931 template <class Container,class Param1> 1932 struct StringFindFirstOf_ <Container,Param1,void,void> 1933 : euml_action<StringFindFirstOf_<Container,Param1,void,void> > 1934 { 1935 template <class Event,class FSM,class STATE > 1936 struct state_action_result 1937 { 1938 typedef typename remove_reference< 1939 typename get_result_type2<Container,Event,FSM,STATE>::type>::type::size_type type; 1940 }; 1941 template <class EVT,class FSM,class SourceState,class TargetState> 1942 struct transition_action_result 1943 { 1944 typedef typename remove_reference< 1945 typename get_result_type<Container,EVT,FSM,SourceState,TargetState>::type>::type::size_type type; 1946 }; 1947 typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type; 1948 1949 template <class EVT,class FSM,class SourceState,class TargetState> 1950 typename transition_action_result<EVT,FSM,SourceState,TargetState>::type operator ()boost::msm::front::euml::StringFindFirstOf_1951 operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const 1952 { 1953 return (Container()(evt,fsm,src,tgt)).find_first_of(Param1()(evt,fsm,src,tgt)); 1954 } 1955 template <class Event,class FSM,class STATE> 1956 typename state_action_result<Event,FSM,STATE>::type operator ()boost::msm::front::euml::StringFindFirstOf_1957 operator()(Event const& evt,FSM& fsm,STATE& state )const 1958 { 1959 return (Container()(evt,fsm,state)).find_first_of(Param1()(evt,fsm,state)); 1960 } 1961 }; 1962 1963 template <class Container,class Param1, class Param2> 1964 struct StringFindFirstOf_ <Container,Param1,Param2,void> 1965 : euml_action<StringFindFirstOf_<Container,Param1,Param2,void> > 1966 { 1967 template <class Event,class FSM,class STATE > 1968 struct state_action_result 1969 { 1970 typedef typename remove_reference< 1971 typename get_result_type2<Container,Event,FSM,STATE>::type>::type::size_type type; 1972 }; 1973 template <class EVT,class FSM,class SourceState,class TargetState> 1974 struct transition_action_result 1975 { 1976 typedef typename remove_reference< 1977 typename get_result_type<Container,EVT,FSM,SourceState,TargetState>::type>::type::size_type type; 1978 }; 1979 typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type; 1980 1981 template <class EVT,class FSM,class SourceState,class TargetState> 1982 typename transition_action_result<EVT,FSM,SourceState,TargetState>::type operator ()boost::msm::front::euml::StringFindFirstOf_1983 operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const 1984 { 1985 return (Container()(evt,fsm,src,tgt)).find_first_of(Param1()(evt,fsm,src,tgt),Param2()(evt,fsm,src,tgt)); 1986 } 1987 template <class Event,class FSM,class STATE> 1988 typename state_action_result<Event,FSM,STATE>::type operator ()boost::msm::front::euml::StringFindFirstOf_1989 operator()(Event const& evt,FSM& fsm,STATE& state )const 1990 { 1991 return (Container()(evt,fsm,state)).find_first_of(Param1()(evt,fsm,state),Param2()(evt,fsm,state)); 1992 } 1993 }; 1994 1995 struct string_find_first_of_tag {}; 1996 struct StringFindFirstOf_Helper: 1997 proto::extends< proto::terminal<string_find_first_of_tag>::type, StringFindFirstOf_Helper, boost::msm::sm_domain> 1998 { StringFindFirstOf_Helperboost::msm::front::euml::StringFindFirstOf_Helper1999 StringFindFirstOf_Helper(){} 2000 template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5 2001 #ifdef BOOST_MSVC 2002 ,class Arg6 2003 #endif 2004 > 2005 struct In 2006 { 2007 typedef StringFindFirstOf_<Arg1,Arg2,Arg3,Arg4> type; 2008 }; 2009 }; 2010 StringFindFirstOf_Helper const string_find_first_of_; 2011 2012 template <class Container, class Param1, class Param2, class Param3, class Enable=void > 2013 struct StringFindFirstNotOf_ : euml_action<StringFindFirstNotOf_<Container,Param1,Param2,Param3,Enable> > 2014 { 2015 }; 2016 2017 template <class Container,class Param1, class Param2, class Param3> 2018 struct StringFindFirstNotOf_ < 2019 Container,Param1,Param2,Param3, 2020 typename ::boost::enable_if< 2021 typename ::boost::is_same<Param2,void>::type 2022 >::type 2023 > 2024 : euml_action<StringFindFirstNotOf_<Container,Param1,Param2,Param3> > 2025 2026 { 2027 template <class Event,class FSM,class STATE > 2028 struct state_action_result 2029 { 2030 typedef typename remove_reference< 2031 typename get_result_type2<Container,Event,FSM,STATE>::type>::type::size_type type; 2032 }; 2033 template <class EVT,class FSM,class SourceState,class TargetState> 2034 struct transition_action_result 2035 { 2036 typedef typename remove_reference< 2037 typename get_result_type<Container,EVT,FSM,SourceState,TargetState>::type>::type::size_type type; 2038 }; 2039 typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type; 2040 2041 template <class EVT,class FSM,class SourceState,class TargetState> 2042 typename transition_action_result<EVT,FSM,SourceState,TargetState>::type operator ()boost::msm::front::euml::StringFindFirstNotOf_2043 operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const 2044 { 2045 return (Container()(evt,fsm,src,tgt)).find_first_not_of(Param1()(evt,fsm,src,tgt)); 2046 } 2047 template <class Event,class FSM,class STATE> 2048 typename state_action_result<Event,FSM,STATE>::type operator ()boost::msm::front::euml::StringFindFirstNotOf_2049 operator()(Event const& evt,FSM& fsm,STATE& state )const 2050 { 2051 return (Container()(evt,fsm,state)).find_first_not_of(Param1()(evt,fsm,state)); 2052 } 2053 }; 2054 2055 template <class Container,class Param1, class Param2, class Param3> 2056 struct StringFindFirstNotOf_ < 2057 Container,Param1,Param2,Param3, 2058 typename ::boost::enable_if< 2059 typename ::boost::mpl::and_< 2060 typename ::boost::is_same<Param3,void>::type, 2061 typename ::boost::mpl::not_< 2062 typename ::boost::is_same<Param2,void>::type 2063 >::type 2064 >::type 2065 >::type 2066 > 2067 : euml_action<StringFindFirstNotOf_<Container,Param1,Param2,Param3> > 2068 { 2069 template <class Event,class FSM,class STATE > 2070 struct state_action_result 2071 { 2072 typedef typename remove_reference< 2073 typename get_result_type2<Container,Event,FSM,STATE>::type>::type::size_type type; 2074 }; 2075 template <class EVT,class FSM,class SourceState,class TargetState> 2076 struct transition_action_result 2077 { 2078 typedef typename remove_reference< 2079 typename get_result_type<Container,EVT,FSM,SourceState,TargetState>::type>::type::size_type type; 2080 }; 2081 typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type; 2082 2083 template <class EVT,class FSM,class SourceState,class TargetState> 2084 typename transition_action_result<EVT,FSM,SourceState,TargetState>::type operator ()boost::msm::front::euml::StringFindFirstNotOf_2085 operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const 2086 { 2087 return (Container()(evt,fsm,src,tgt)).find_first_not_of(Param1()(evt,fsm,src,tgt),Param2()(evt,fsm,src,tgt)); 2088 } 2089 template <class Event,class FSM,class STATE> 2090 typename state_action_result<Event,FSM,STATE>::type operator ()boost::msm::front::euml::StringFindFirstNotOf_2091 operator()(Event const& evt,FSM& fsm,STATE& state )const 2092 { 2093 return (Container()(evt,fsm,state)).find_first_not_of(Param1()(evt,fsm,state),Param2()(evt,fsm,state)); 2094 } 2095 }; 2096 2097 template <class Container,class Param1, class Param2, class Param3> 2098 struct StringFindFirstNotOf_< 2099 Container,Param1,Param2,Param3, 2100 typename ::boost::disable_if< 2101 typename ::boost::is_same<Param3,void>::type 2102 >::type 2103 > 2104 : euml_action<StringFindFirstNotOf_<Container,Param1,Param2,Param3> > 2105 { 2106 template <class Event,class FSM,class STATE > 2107 struct state_action_result 2108 { 2109 typedef typename remove_reference< 2110 typename get_result_type2<Container,Event,FSM,STATE>::type>::type::size_type type; 2111 }; 2112 template <class EVT,class FSM,class SourceState,class TargetState> 2113 struct transition_action_result 2114 { 2115 typedef typename remove_reference< 2116 typename get_result_type<Container,EVT,FSM,SourceState,TargetState>::type>::type::size_type type; 2117 }; 2118 typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type; 2119 2120 template <class EVT,class FSM,class SourceState,class TargetState> 2121 typename transition_action_result<EVT,FSM,SourceState,TargetState>::type operator ()boost::msm::front::euml::StringFindFirstNotOf_2122 operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const 2123 { 2124 return (Container()(evt,fsm,src,tgt)). 2125 find_first_not_of(Param1()(evt,fsm,src,tgt),Param2()(evt,fsm,src,tgt),Param3()(evt,fsm,src,tgt)); 2126 } 2127 template <class Event,class FSM,class STATE> 2128 typename state_action_result<Event,FSM,STATE>::type operator ()boost::msm::front::euml::StringFindFirstNotOf_2129 operator()(Event const& evt,FSM& fsm,STATE& state )const 2130 { 2131 return (Container()(evt,fsm,state)). 2132 find_first_not_of(Param1()(evt,fsm,state),Param2()(evt,fsm,state),Param3()(evt,fsm,state)); 2133 } 2134 }; 2135 2136 struct string_find_first_not_of_tag {}; 2137 struct StringFindFirstNotOf_Helper: 2138 proto::extends< proto::terminal<string_find_first_not_of_tag>::type, StringFindFirstNotOf_Helper, boost::msm::sm_domain> 2139 { StringFindFirstNotOf_Helperboost::msm::front::euml::StringFindFirstNotOf_Helper2140 StringFindFirstNotOf_Helper(){} 2141 template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5 2142 #ifdef BOOST_MSVC 2143 ,class Arg6 2144 #endif 2145 > 2146 struct In 2147 { 2148 typedef StringFindFirstNotOf_<Arg1,Arg2,Arg3,Arg4> type; 2149 }; 2150 }; 2151 StringFindFirstNotOf_Helper const string_find_first_not_of_; 2152 2153 template <class Container, class Param1, class Param2, class Param3, class Enable=void > 2154 struct StringFindLastOf_ : euml_action<StringFindLastOf_<Container,Param1,Param2,Param3,Enable> > 2155 { 2156 }; 2157 2158 template <class Container,class Param1, class Param2, class Param3> 2159 struct StringFindLastOf_ < 2160 Container,Param1,Param2,Param3, 2161 typename ::boost::enable_if< 2162 typename ::boost::is_same<Param2,void>::type 2163 >::type 2164 > 2165 : euml_action<StringFindLastOf_<Container,Param1,Param2,Param3> > 2166 2167 { 2168 template <class Event,class FSM,class STATE > 2169 struct state_action_result 2170 { 2171 typedef typename remove_reference< 2172 typename get_result_type2<Container,Event,FSM,STATE>::type>::type::size_type type; 2173 }; 2174 template <class EVT,class FSM,class SourceState,class TargetState> 2175 struct transition_action_result 2176 { 2177 typedef typename remove_reference< 2178 typename get_result_type<Container,EVT,FSM,SourceState,TargetState>::type>::type::size_type type; 2179 }; 2180 typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type; 2181 2182 template <class EVT,class FSM,class SourceState,class TargetState> 2183 typename transition_action_result<EVT,FSM,SourceState,TargetState>::type operator ()boost::msm::front::euml::StringFindLastOf_2184 operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const 2185 { 2186 return (Container()(evt,fsm,src,tgt)).find_last_of(Param1()(evt,fsm,src,tgt)); 2187 } 2188 template <class Event,class FSM,class STATE> 2189 typename state_action_result<Event,FSM,STATE>::type operator ()boost::msm::front::euml::StringFindLastOf_2190 operator()(Event const& evt,FSM& fsm,STATE& state )const 2191 { 2192 return (Container()(evt,fsm,state)).find_last_of(Param1()(evt,fsm,state)); 2193 } 2194 }; 2195 2196 template <class Container,class Param1, class Param2, class Param3> 2197 struct StringFindLastOf_ < 2198 Container,Param1,Param2,Param3, 2199 typename ::boost::enable_if< 2200 typename ::boost::mpl::and_< 2201 typename ::boost::is_same<Param3,void>::type, 2202 typename ::boost::mpl::not_< 2203 typename ::boost::is_same<Param2,void>::type 2204 >::type 2205 >::type 2206 >::type 2207 > 2208 : euml_action<StringFindLastOf_<Container,Param1,Param2,Param3> > 2209 { 2210 template <class Event,class FSM,class STATE > 2211 struct state_action_result 2212 { 2213 typedef typename remove_reference< 2214 typename get_result_type2<Container,Event,FSM,STATE>::type>::type::size_type type; 2215 }; 2216 template <class EVT,class FSM,class SourceState,class TargetState> 2217 struct transition_action_result 2218 { 2219 typedef typename remove_reference< 2220 typename get_result_type<Container,EVT,FSM,SourceState,TargetState>::type>::type::size_type type; 2221 }; 2222 typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type; 2223 2224 template <class EVT,class FSM,class SourceState,class TargetState> 2225 typename transition_action_result<EVT,FSM,SourceState,TargetState>::type operator ()boost::msm::front::euml::StringFindLastOf_2226 operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const 2227 { 2228 return (Container()(evt,fsm,src,tgt)).find_last_of(Param1()(evt,fsm,src,tgt),Param2()(evt,fsm,src,tgt)); 2229 } 2230 template <class Event,class FSM,class STATE> 2231 typename state_action_result<Event,FSM,STATE>::type operator ()boost::msm::front::euml::StringFindLastOf_2232 operator()(Event const& evt,FSM& fsm,STATE& state )const 2233 { 2234 return (Container()(evt,fsm,state)).find_last_of(Param1()(evt,fsm,state),Param2()(evt,fsm,state)); 2235 } 2236 }; 2237 2238 template <class Container,class Param1, class Param2, class Param3> 2239 struct StringFindLastOf_< 2240 Container,Param1,Param2,Param3, 2241 typename ::boost::disable_if< 2242 typename ::boost::is_same<Param3,void>::type 2243 >::type 2244 > 2245 : euml_action<StringFindLastOf_<Container,Param1,Param2,Param3> > 2246 { 2247 template <class Event,class FSM,class STATE > 2248 struct state_action_result 2249 { 2250 typedef typename remove_reference< 2251 typename get_result_type2<Container,Event,FSM,STATE>::type>::type::size_type type; 2252 }; 2253 template <class EVT,class FSM,class SourceState,class TargetState> 2254 struct transition_action_result 2255 { 2256 typedef typename remove_reference< 2257 typename get_result_type<Container,EVT,FSM,SourceState,TargetState>::type>::type::size_type type; 2258 }; 2259 typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type; 2260 2261 template <class EVT,class FSM,class SourceState,class TargetState> 2262 typename transition_action_result<EVT,FSM,SourceState,TargetState>::type operator ()boost::msm::front::euml::StringFindLastOf_2263 operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const 2264 { 2265 return (Container()(evt,fsm,src,tgt)). 2266 find_last_of(Param1()(evt,fsm,src,tgt),Param2()(evt,fsm,src,tgt),Param3()(evt,fsm,src,tgt)); 2267 } 2268 template <class Event,class FSM,class STATE> 2269 typename state_action_result<Event,FSM,STATE>::type operator ()boost::msm::front::euml::StringFindLastOf_2270 operator()(Event const& evt,FSM& fsm,STATE& state )const 2271 { 2272 return (Container()(evt,fsm,state)). 2273 find_last_of(Param1()(evt,fsm,state),Param2()(evt,fsm,state),Param3()(evt,fsm,state)); 2274 } 2275 }; 2276 2277 struct string_find_last_of_tag {}; 2278 struct StringFindLastOf_Helper: 2279 proto::extends< proto::terminal<string_find_last_of_tag>::type, StringFindLastOf_Helper, boost::msm::sm_domain> 2280 { StringFindLastOf_Helperboost::msm::front::euml::StringFindLastOf_Helper2281 StringFindLastOf_Helper(){} 2282 template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5 2283 #ifdef BOOST_MSVC 2284 ,class Arg6 2285 #endif 2286 > 2287 struct In 2288 { 2289 typedef StringFindLastOf_<Arg1,Arg2,Arg3,Arg4> type; 2290 }; 2291 }; 2292 StringFindLastOf_Helper const string_find_last_of_; 2293 2294 template <class Container, class Param1, class Param2, class Param3, class Enable=void > 2295 struct StringFindLastNotOf_ : euml_action<StringFindLastNotOf_<Container,Param1,Param2,Param3,Enable> > 2296 { 2297 }; 2298 2299 template <class Container,class Param1, class Param2, class Param3> 2300 struct StringFindLastNotOf_ < 2301 Container,Param1,Param2,Param3, 2302 typename ::boost::enable_if< 2303 typename ::boost::is_same<Param2,void>::type 2304 >::type 2305 > 2306 : euml_action<StringFindLastNotOf_<Container,Param1,Param2,Param3> > 2307 2308 { 2309 template <class Event,class FSM,class STATE > 2310 struct state_action_result 2311 { 2312 typedef typename remove_reference< 2313 typename get_result_type2<Container,Event,FSM,STATE>::type>::type::size_type type; 2314 }; 2315 template <class EVT,class FSM,class SourceState,class TargetState> 2316 struct transition_action_result 2317 { 2318 typedef typename remove_reference< 2319 typename get_result_type<Container,EVT,FSM,SourceState,TargetState>::type>::type::size_type type; 2320 }; 2321 typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type; 2322 2323 template <class EVT,class FSM,class SourceState,class TargetState> 2324 typename transition_action_result<EVT,FSM,SourceState,TargetState>::type operator ()boost::msm::front::euml::StringFindLastNotOf_2325 operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const 2326 { 2327 return (Container()(evt,fsm,src,tgt)).find_last_not_of(Param1()(evt,fsm,src,tgt)); 2328 } 2329 template <class Event,class FSM,class STATE> 2330 typename state_action_result<Event,FSM,STATE>::type operator ()boost::msm::front::euml::StringFindLastNotOf_2331 operator()(Event const& evt,FSM& fsm,STATE& state )const 2332 { 2333 return (Container()(evt,fsm,state)).find_last_not_of(Param1()(evt,fsm,state)); 2334 } 2335 }; 2336 2337 template <class Container,class Param1, class Param2, class Param3> 2338 struct StringFindLastNotOf_ < 2339 Container,Param1,Param2,Param3, 2340 typename ::boost::enable_if< 2341 typename ::boost::mpl::and_< 2342 typename ::boost::is_same<Param3,void>::type, 2343 typename ::boost::mpl::not_< 2344 typename ::boost::is_same<Param2,void>::type 2345 >::type 2346 >::type 2347 >::type 2348 > 2349 : euml_action<StringFindLastNotOf_<Container,Param1,Param2,Param3> > 2350 { 2351 template <class Event,class FSM,class STATE > 2352 struct state_action_result 2353 { 2354 typedef typename remove_reference< 2355 typename get_result_type2<Container,Event,FSM,STATE>::type>::type::size_type type; 2356 }; 2357 template <class EVT,class FSM,class SourceState,class TargetState> 2358 struct transition_action_result 2359 { 2360 typedef typename remove_reference< 2361 typename get_result_type<Container,EVT,FSM,SourceState,TargetState>::type>::type::size_type type; 2362 }; 2363 typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type; 2364 2365 template <class EVT,class FSM,class SourceState,class TargetState> 2366 typename transition_action_result<EVT,FSM,SourceState,TargetState>::type operator ()boost::msm::front::euml::StringFindLastNotOf_2367 operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const 2368 { 2369 return (Container()(evt,fsm,src,tgt)).find_last_not_of(Param1()(evt,fsm,src,tgt),Param2()(evt,fsm,src,tgt)); 2370 } 2371 template <class Event,class FSM,class STATE> 2372 typename state_action_result<Event,FSM,STATE>::type operator ()boost::msm::front::euml::StringFindLastNotOf_2373 operator()(Event const& evt,FSM& fsm,STATE& state )const 2374 { 2375 return (Container()(evt,fsm,state)).find_last_not_of(Param1()(evt,fsm,state),Param2()(evt,fsm,state)); 2376 } 2377 }; 2378 2379 template <class Container,class Param1, class Param2, class Param3> 2380 struct StringFindLastNotOf_< 2381 Container,Param1,Param2,Param3, 2382 typename ::boost::disable_if< 2383 typename ::boost::is_same<Param3,void>::type 2384 >::type 2385 > 2386 : euml_action<StringFindLastNotOf_<Container,Param1,Param2,Param3> > 2387 { 2388 template <class Event,class FSM,class STATE > 2389 struct state_action_result 2390 { 2391 typedef typename remove_reference< 2392 typename get_result_type2<Container,Event,FSM,STATE>::type>::type::size_type type; 2393 }; 2394 template <class EVT,class FSM,class SourceState,class TargetState> 2395 struct transition_action_result 2396 { 2397 typedef typename remove_reference< 2398 typename get_result_type<Container,EVT,FSM,SourceState,TargetState>::type>::type::size_type type; 2399 }; 2400 typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type; 2401 2402 template <class EVT,class FSM,class SourceState,class TargetState> 2403 typename transition_action_result<EVT,FSM,SourceState,TargetState>::type operator ()boost::msm::front::euml::StringFindLastNotOf_2404 operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const 2405 { 2406 return (Container()(evt,fsm,src,tgt)). 2407 find_last_not_of(Param1()(evt,fsm,src,tgt),Param2()(evt,fsm,src,tgt),Param3()(evt,fsm,src,tgt)); 2408 } 2409 template <class Event,class FSM,class STATE> 2410 typename state_action_result<Event,FSM,STATE>::type operator ()boost::msm::front::euml::StringFindLastNotOf_2411 operator()(Event const& evt,FSM& fsm,STATE& state )const 2412 { 2413 return (Container()(evt,fsm,state)). 2414 find_last_not_of(Param1()(evt,fsm,state),Param2()(evt,fsm,state),Param3()(evt,fsm,state)); 2415 } 2416 }; 2417 2418 struct string_find_last_not_of_tag {}; 2419 struct StringFindLastNotOf_Helper: 2420 proto::extends< proto::terminal<string_find_last_of_tag>::type, StringFindLastNotOf_Helper, boost::msm::sm_domain> 2421 { StringFindLastNotOf_Helperboost::msm::front::euml::StringFindLastNotOf_Helper2422 StringFindLastNotOf_Helper(){} 2423 template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5 2424 #ifdef BOOST_MSVC 2425 ,class Arg6 2426 #endif 2427 > 2428 struct In 2429 { 2430 typedef StringFindLastNotOf_<Arg1,Arg2,Arg3,Arg4> type; 2431 }; 2432 }; 2433 StringFindLastNotOf_Helper const string_find_last_not_of_; 2434 2435 template <class Container> 2436 struct Npos_ : euml_action<Npos_<Container> > 2437 { Npos_boost::msm::front::euml::Npos_2438 Npos_(){} 2439 template <class Event,class FSM,class STATE > 2440 struct state_action_result 2441 { 2442 typedef typename Container::size_type type; 2443 }; 2444 template <class EVT,class FSM,class SourceState,class TargetState> 2445 struct transition_action_result 2446 { 2447 typedef typename Container::size_type type; 2448 }; 2449 typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type; 2450 2451 template <class EVT,class FSM,class SourceState,class TargetState> 2452 typename transition_action_result<EVT,FSM,SourceState,TargetState>::type operator ()boost::msm::front::euml::Npos_2453 operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const 2454 { 2455 return Container::npos; 2456 } 2457 template <class Event,class FSM,class STATE> 2458 typename state_action_result<Event,FSM,STATE>::type operator ()boost::msm::front::euml::Npos_2459 operator()(Event const& evt,FSM& fsm,STATE& state )const 2460 { 2461 return Container::npos; 2462 } 2463 }; 2464 2465 // version for 2 parameters 2466 template <class Container, class Param1, class Param2> 2467 struct Associative_Erase_ : euml_action<Associative_Erase_<Container,Param1,Param2> > 2468 { 2469 template <class Event,class FSM,class STATE > 2470 struct state_action_result 2471 { 2472 typedef void type; 2473 }; 2474 template <class EVT,class FSM,class SourceState,class TargetState> 2475 struct transition_action_result 2476 { 2477 typedef void type; 2478 }; 2479 typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type; 2480 2481 template <class EVT,class FSM,class SourceState,class TargetState> 2482 typename ::boost::enable_if< 2483 typename ::boost::mpl::has_key< 2484 typename Container::tag_type,action_tag>::type, 2485 typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type operator ()boost::msm::front::euml::Associative_Erase_2486 operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const 2487 { 2488 (Container()(evt,fsm,src,tgt)).erase(Param1()(evt,fsm,src,tgt),Param2()(evt,fsm,src,tgt)); 2489 } 2490 template <class Event,class FSM,class STATE> 2491 typename ::boost::enable_if< 2492 typename ::boost::mpl::has_key< 2493 typename Container::tag_type,state_action_tag>::type, 2494 typename state_action_result<Event,FSM,STATE>::type >::type operator ()boost::msm::front::euml::Associative_Erase_2495 operator()(Event const& evt,FSM& fsm,STATE& state )const 2496 { 2497 (Container()(evt,fsm,state)).erase(Param1()(evt,fsm,state),Param2()(evt,fsm,state)); 2498 } 2499 }; 2500 // version for 1 parameter 2501 template <class Container, class Param1> 2502 struct Associative_Erase_ < Container,Param1,void> 2503 : euml_action<Associative_Erase_<Container,Param1,void> > 2504 { 2505 // return value will actually not be correct for set::erase(it), should be void 2506 // but it's ok as nobody should call an inexistent return type 2507 template <class Event,class FSM,class STATE > 2508 struct state_action_result 2509 { 2510 typedef typename get_size_type< 2511 typename ::boost::remove_reference< 2512 typename get_result_type2<Container,Event,FSM,STATE>::type>::type>::type type; 2513 }; 2514 template <class EVT,class FSM,class SourceState,class TargetState> 2515 struct transition_action_result 2516 { 2517 typedef typename get_size_type< 2518 typename ::boost::remove_reference< 2519 typename get_result_type<Container,EVT,FSM,SourceState,TargetState>::type>::type>::type type; 2520 }; 2521 typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type; 2522 2523 // version for transition + param is an iterator 2524 template <class EVT,class FSM,class SourceState,class TargetState> 2525 typename ::boost::enable_if< 2526 typename ::boost::mpl::and_< 2527 typename ::boost::mpl::has_key< 2528 typename Container::tag_type,action_tag>::type, 2529 typename has_iterator_category< 2530 typename Param1::template transition_action_result<EVT,FSM,SourceState,TargetState>::type 2531 >::type 2532 >::type, 2533 void 2534 >::type operator ()boost::msm::front::euml::Associative_Erase_2535 operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const 2536 { 2537 (Container()(evt,fsm,src,tgt)).erase(Param1()(evt,fsm,src,tgt)); 2538 } 2539 2540 // version for state action + param is an iterator 2541 template <class Event,class FSM,class STATE> 2542 typename ::boost::enable_if< 2543 typename ::boost::mpl::and_< 2544 typename ::boost::mpl::has_key< 2545 typename Container::tag_type,state_action_tag>::type, 2546 typename has_iterator_category< 2547 typename Param1::template state_action_result<Event,FSM,STATE>::type 2548 >::type 2549 >::type, 2550 void 2551 >::type operator ()boost::msm::front::euml::Associative_Erase_2552 operator()(Event const& evt,FSM& fsm,STATE& state )const 2553 { 2554 (Container()(evt,fsm,state)).erase(Param1()(evt,fsm,state)); 2555 } 2556 2557 // version for transition + param not an iterator 2558 template <class EVT,class FSM,class SourceState,class TargetState> 2559 typename ::boost::enable_if< 2560 typename ::boost::mpl::and_< 2561 typename ::boost::mpl::has_key< 2562 typename Container::tag_type,action_tag>::type, 2563 typename ::boost::mpl::not_< 2564 typename has_iterator_category< 2565 typename Param1::template transition_action_result<EVT,FSM,SourceState,TargetState>::type 2566 >::type 2567 >::type 2568 >::type, 2569 typename transition_action_result<EVT,FSM,SourceState,TargetState>::type 2570 >::type operator ()boost::msm::front::euml::Associative_Erase_2571 operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const 2572 { 2573 return (Container()(evt,fsm,src,tgt)).erase(Param1()(evt,fsm,src,tgt)); 2574 } 2575 2576 // version for state action + param not an iterator 2577 template <class Event,class FSM,class STATE> 2578 typename ::boost::enable_if< 2579 typename ::boost::mpl::and_< 2580 typename ::boost::mpl::has_key< 2581 typename Container::tag_type,state_action_tag>::type, 2582 typename ::boost::mpl::not_< 2583 typename has_iterator_category< 2584 typename Param1::template state_action_result<Event,FSM,STATE>::type 2585 >::type 2586 >::type 2587 >::type, 2588 typename state_action_result<Event,FSM,STATE>::type 2589 >::type operator ()boost::msm::front::euml::Associative_Erase_2590 operator()(Event const& evt,FSM& fsm,STATE& state )const 2591 { 2592 return (Container()(evt,fsm,state)).erase(Param1()(evt,fsm,state)); 2593 } 2594 }; 2595 2596 struct associative_erase_tag {}; 2597 struct Associative_Erase_Helper: proto::extends< proto::terminal<associative_erase_tag>::type, Associative_Erase_Helper, boost::msm::sm_domain> 2598 { Associative_Erase_Helperboost::msm::front::euml::Associative_Erase_Helper2599 Associative_Erase_Helper(){} 2600 template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5 2601 #ifdef BOOST_MSVC 2602 ,class Arg6 2603 #endif 2604 > 2605 struct In 2606 { 2607 typedef Associative_Erase_<Arg1,Arg2,Arg3> type; 2608 }; 2609 }; 2610 Associative_Erase_Helper const associative_erase_; 2611 2612 2613 template <class T, class Param> 2614 struct Associative_Find_ : euml_action<Associative_Find_<T,Param> > 2615 { 2616 template <class Event,class FSM,class STATE > 2617 struct state_action_result 2618 { 2619 typedef typename get_iterator< 2620 typename ::boost::remove_reference< 2621 typename get_result_type2<T,Event,FSM,STATE>::type>::type>::type type; 2622 }; 2623 template <class EVT,class FSM,class SourceState,class TargetState> 2624 struct transition_action_result 2625 { 2626 typedef typename get_iterator< 2627 typename ::boost::remove_reference< 2628 typename get_result_type<T,EVT,FSM,SourceState,TargetState>::type>::type>::type type; 2629 }; 2630 typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type; 2631 2632 template <class EVT,class FSM,class SourceState,class TargetState> 2633 typename ::boost::enable_if< 2634 typename ::boost::mpl::has_key< 2635 typename T::tag_type,action_tag>::type, 2636 typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type operator ()boost::msm::front::euml::Associative_Find_2637 operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const 2638 { 2639 return (T()(evt,fsm,src,tgt)).find(Param()(evt,fsm,src,tgt)); 2640 } 2641 template <class Event,class FSM,class STATE> 2642 typename ::boost::enable_if< 2643 typename ::boost::mpl::has_key< 2644 typename T::tag_type,state_action_tag>::type, 2645 typename state_action_result<Event,FSM,STATE>::type >::type operator ()boost::msm::front::euml::Associative_Find_2646 operator()(Event const& evt,FSM& fsm,STATE& state )const 2647 { 2648 return (T()(evt,fsm,state)).find(Param()(evt,fsm,state)); 2649 } 2650 }; 2651 2652 struct associative_find_tag {}; 2653 struct Associative_Find_Helper: proto::extends< proto::terminal<associative_find_tag>::type, Associative_Find_Helper, boost::msm::sm_domain> 2654 { Associative_Find_Helperboost::msm::front::euml::Associative_Find_Helper2655 Associative_Find_Helper(){} 2656 template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5 2657 #ifdef BOOST_MSVC 2658 ,class Arg6 2659 #endif 2660 > 2661 struct In 2662 { 2663 typedef Associative_Find_<Arg1,Arg2> type; 2664 }; 2665 }; 2666 Associative_Find_Helper const associative_find_; 2667 2668 template <class Container,class Param> 2669 struct AssociativeCount_ : euml_action<AssociativeCount_<Container,Param> > 2670 { 2671 template <class Event,class FSM,class STATE > 2672 struct state_action_result 2673 { 2674 typedef typename get_size_type< 2675 typename ::boost::remove_reference< 2676 typename get_result_type2<Container,Event,FSM,STATE>::type>::type>::type type; 2677 }; 2678 template <class EVT,class FSM,class SourceState,class TargetState> 2679 struct transition_action_result 2680 { 2681 typedef typename get_size_type< 2682 typename ::boost::remove_reference< 2683 typename get_result_type<Container,EVT,FSM,SourceState,TargetState>::type>::type>::type type; 2684 }; 2685 typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type; 2686 2687 template <class EVT,class FSM,class SourceState,class TargetState> 2688 typename ::boost::enable_if< 2689 typename ::boost::mpl::has_key< 2690 typename Container::tag_type,action_tag>::type, 2691 typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type operator ()boost::msm::front::euml::AssociativeCount_2692 operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const 2693 { 2694 return (Container()(evt,fsm,src,tgt)).count(Param()(evt,fsm,src,tgt)); 2695 } 2696 template <class Event,class FSM,class STATE> 2697 typename ::boost::enable_if< 2698 typename ::boost::mpl::has_key< 2699 typename Container::tag_type,state_action_tag>::type, 2700 typename state_action_result<Event,FSM,STATE>::type >::type operator ()boost::msm::front::euml::AssociativeCount_2701 operator()(Event const& evt,FSM& fsm,STATE& state )const 2702 { 2703 return (Container()(evt,fsm,state)).count(Param()(evt,fsm,state)); 2704 } 2705 }; 2706 struct associative_count_tag {}; 2707 struct AssociativeCount_Helper: proto::extends< proto::terminal<associative_count_tag>::type, AssociativeCount_Helper, boost::msm::sm_domain> 2708 { AssociativeCount_Helperboost::msm::front::euml::AssociativeCount_Helper2709 AssociativeCount_Helper(){} 2710 template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5 2711 #ifdef BOOST_MSVC 2712 ,class Arg6 2713 #endif 2714 > 2715 struct In 2716 { 2717 typedef AssociativeCount_<Arg1,Arg2> type; 2718 }; 2719 }; 2720 AssociativeCount_Helper const associative_count_; 2721 2722 template <class T, class Param> 2723 struct Associative_Lower_Bound_ : euml_action<Associative_Lower_Bound_<T,Param> > 2724 { 2725 template <class Event,class FSM,class STATE > 2726 struct state_action_result 2727 { 2728 typedef typename get_iterator< 2729 typename ::boost::remove_reference< 2730 typename get_result_type2<T,Event,FSM,STATE>::type>::type>::type type; 2731 }; 2732 template <class EVT,class FSM,class SourceState,class TargetState> 2733 struct transition_action_result 2734 { 2735 typedef typename get_iterator< 2736 typename ::boost::remove_reference< 2737 typename get_result_type<T,EVT,FSM,SourceState,TargetState>::type>::type>::type type; 2738 }; 2739 typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type; 2740 2741 template <class EVT,class FSM,class SourceState,class TargetState> 2742 typename ::boost::enable_if< 2743 typename ::boost::mpl::has_key< 2744 typename T::tag_type,action_tag>::type, 2745 typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type operator ()boost::msm::front::euml::Associative_Lower_Bound_2746 operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const 2747 { 2748 return (T()(evt,fsm,src,tgt)).lower_bound(Param()(evt,fsm,src,tgt)); 2749 } 2750 template <class Event,class FSM,class STATE> 2751 typename ::boost::enable_if< 2752 typename ::boost::mpl::has_key< 2753 typename T::tag_type,state_action_tag>::type, 2754 typename state_action_result<Event,FSM,STATE>::type >::type operator ()boost::msm::front::euml::Associative_Lower_Bound_2755 operator()(Event const& evt,FSM& fsm,STATE& state )const 2756 { 2757 return (T()(evt,fsm,state)).lower_bound(Param()(evt,fsm,state)); 2758 } 2759 }; 2760 2761 struct associative_lower_bound_tag {}; 2762 struct Associative_Lower_Bound_Helper: proto::extends< proto::terminal<associative_lower_bound_tag>::type, 2763 Associative_Lower_Bound_Helper, boost::msm::sm_domain> 2764 { Associative_Lower_Bound_Helperboost::msm::front::euml::Associative_Lower_Bound_Helper2765 Associative_Lower_Bound_Helper(){} 2766 template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5 2767 #ifdef BOOST_MSVC 2768 ,class Arg6 2769 #endif 2770 > 2771 struct In 2772 { 2773 typedef Associative_Lower_Bound_<Arg1,Arg2> type; 2774 }; 2775 }; 2776 Associative_Lower_Bound_Helper const associative_lower_bound_; 2777 2778 template <class T, class Param> 2779 struct Associative_Upper_Bound_ : euml_action<Associative_Upper_Bound_<T,Param> > 2780 { 2781 template <class Event,class FSM,class STATE > 2782 struct state_action_result 2783 { 2784 typedef typename get_iterator< 2785 typename ::boost::remove_reference< 2786 typename get_result_type2<T,Event,FSM,STATE>::type>::type>::type type; 2787 }; 2788 template <class EVT,class FSM,class SourceState,class TargetState> 2789 struct transition_action_result 2790 { 2791 typedef typename get_iterator< 2792 typename ::boost::remove_reference< 2793 typename get_result_type<T,EVT,FSM,SourceState,TargetState>::type>::type>::type type; 2794 }; 2795 typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type; 2796 2797 template <class EVT,class FSM,class SourceState,class TargetState> 2798 typename ::boost::enable_if< 2799 typename ::boost::mpl::has_key< 2800 typename T::tag_type,action_tag>::type, 2801 typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type operator ()boost::msm::front::euml::Associative_Upper_Bound_2802 operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const 2803 { 2804 return (T()(evt,fsm,src,tgt)).upper_bound(Param()(evt,fsm,src,tgt)); 2805 } 2806 template <class Event,class FSM,class STATE> 2807 typename ::boost::enable_if< 2808 typename ::boost::mpl::has_key< 2809 typename T::tag_type,state_action_tag>::type, 2810 typename state_action_result<Event,FSM,STATE>::type >::type operator ()boost::msm::front::euml::Associative_Upper_Bound_2811 operator()(Event const& evt,FSM& fsm,STATE& state )const 2812 { 2813 return (T()(evt,fsm,state)).upper_bound(Param()(evt,fsm,state)); 2814 } 2815 }; 2816 2817 struct associative_upper_bound_tag {}; 2818 struct Associative_Upper_Bound_Helper: proto::extends< proto::terminal<associative_upper_bound_tag>::type, 2819 Associative_Upper_Bound_Helper, boost::msm::sm_domain> 2820 { Associative_Upper_Bound_Helperboost::msm::front::euml::Associative_Upper_Bound_Helper2821 Associative_Upper_Bound_Helper(){} 2822 template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5 2823 #ifdef BOOST_MSVC 2824 ,class Arg6 2825 #endif 2826 > 2827 struct In 2828 { 2829 typedef Associative_Upper_Bound_<Arg1,Arg2> type; 2830 }; 2831 }; 2832 Associative_Upper_Bound_Helper const associative_upper_bound_; 2833 2834 template <class T> 2835 struct First_ : euml_action<First_<T> > 2836 { 2837 template <class Event,class FSM,class STATE > 2838 struct state_action_result 2839 { 2840 typedef typename get_first_type< 2841 typename ::boost::remove_reference< 2842 typename get_result_type2<T,Event,FSM,STATE>::type>::type>::type type; 2843 }; 2844 template <class EVT,class FSM,class SourceState,class TargetState> 2845 struct transition_action_result 2846 { 2847 typedef typename get_first_type< 2848 typename ::boost::remove_reference< 2849 typename get_result_type<T,EVT,FSM,SourceState,TargetState>::type>::type>::type type; 2850 }; 2851 typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type; 2852 2853 template <class EVT,class FSM,class SourceState,class TargetState> 2854 typename ::boost::enable_if< 2855 typename ::boost::mpl::has_key< 2856 typename T::tag_type,action_tag>::type, 2857 typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type operator ()boost::msm::front::euml::First_2858 operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const 2859 { 2860 return (T()(evt,fsm,src,tgt)).first; 2861 } 2862 template <class Event,class FSM,class STATE> 2863 typename ::boost::enable_if< 2864 typename ::boost::mpl::has_key< 2865 typename T::tag_type,state_action_tag>::type, 2866 typename state_action_result<Event,FSM,STATE>::type >::type operator ()boost::msm::front::euml::First_2867 operator()(Event const& evt,FSM& fsm,STATE& state )const 2868 { 2869 return (T()(evt,fsm,state)).first; 2870 } 2871 }; 2872 2873 struct first_tag {}; 2874 struct First_Helper: proto::extends< proto::terminal<first_tag>::type, First_Helper, boost::msm::sm_domain> 2875 { First_Helperboost::msm::front::euml::First_Helper2876 First_Helper(){} 2877 template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5 2878 #ifdef BOOST_MSVC 2879 ,class Arg6 2880 #endif 2881 > 2882 struct In 2883 { 2884 typedef First_<Arg1> type; 2885 }; 2886 }; 2887 First_Helper const first_; 2888 2889 template <class T> 2890 struct Second_ : euml_action<Second_<T> > 2891 { 2892 template <class Event,class FSM,class STATE > 2893 struct state_action_result 2894 { 2895 typedef typename get_second_type< 2896 typename ::boost::remove_reference< 2897 typename get_result_type2<T,Event,FSM,STATE>::type>::type>::type type; 2898 }; 2899 template <class EVT,class FSM,class SourceState,class TargetState> 2900 struct transition_action_result 2901 { 2902 typedef typename get_second_type< 2903 typename ::boost::remove_reference< 2904 typename get_result_type<T,EVT,FSM,SourceState,TargetState>::type>::type>::type type; 2905 }; 2906 typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type; 2907 2908 template <class EVT,class FSM,class SourceState,class TargetState> 2909 typename ::boost::enable_if< 2910 typename ::boost::mpl::has_key< 2911 typename T::tag_type,action_tag>::type, 2912 typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type operator ()boost::msm::front::euml::Second_2913 operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const 2914 { 2915 return (T()(evt,fsm,src,tgt)).second; 2916 } 2917 template <class Event,class FSM,class STATE> 2918 typename ::boost::enable_if< 2919 typename ::boost::mpl::has_key< 2920 typename T::tag_type,state_action_tag>::type, 2921 typename state_action_result<Event,FSM,STATE>::type >::type operator ()boost::msm::front::euml::Second_2922 operator()(Event const& evt,FSM& fsm,STATE& state )const 2923 { 2924 return (T()(evt,fsm,state)).second; 2925 } 2926 }; 2927 2928 struct second_tag {}; 2929 struct Second_Helper: proto::extends< proto::terminal<second_tag>::type, Second_Helper, boost::msm::sm_domain> 2930 { Second_Helperboost::msm::front::euml::Second_Helper2931 Second_Helper(){} 2932 template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5 2933 #ifdef BOOST_MSVC 2934 ,class Arg6 2935 #endif 2936 > 2937 struct In 2938 { 2939 typedef Second_<Arg1> type; 2940 }; 2941 }; 2942 Second_Helper const second_; 2943 2944 template <class T, class Param> 2945 struct Associative_Equal_Range_ : euml_action<Associative_Equal_Range_<T,Param> > 2946 { 2947 template <class Event,class FSM,class STATE > 2948 struct state_action_result 2949 { 2950 typedef std::pair< 2951 typename get_iterator< 2952 typename ::boost::remove_reference< 2953 typename get_result_type2<T,Event,FSM,STATE>::type>::type>::type, 2954 typename get_iterator< 2955 typename ::boost::remove_reference< 2956 typename get_result_type2<T,Event,FSM,STATE>::type>::type>::type > type; 2957 }; 2958 template <class EVT,class FSM,class SourceState,class TargetState> 2959 struct transition_action_result 2960 { 2961 typedef std::pair< 2962 typename get_iterator< 2963 typename ::boost::remove_reference< 2964 typename get_result_type<T,EVT,FSM,SourceState,TargetState>::type>::type>::type, 2965 typename get_iterator< 2966 typename ::boost::remove_reference< 2967 typename get_result_type<T,EVT,FSM,SourceState,TargetState>::type>::type>::type > type; 2968 }; 2969 typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type; 2970 2971 template <class EVT,class FSM,class SourceState,class TargetState> 2972 typename ::boost::enable_if< 2973 typename ::boost::mpl::has_key< 2974 typename T::tag_type,action_tag>::type, 2975 typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type operator ()boost::msm::front::euml::Associative_Equal_Range_2976 operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const 2977 { 2978 return (T()(evt,fsm,src,tgt)).equal_range(Param()(evt,fsm,src,tgt)); 2979 } 2980 template <class Event,class FSM,class STATE> 2981 typename ::boost::enable_if< 2982 typename ::boost::mpl::has_key< 2983 typename T::tag_type,state_action_tag>::type, 2984 typename state_action_result<Event,FSM,STATE>::type >::type operator ()boost::msm::front::euml::Associative_Equal_Range_2985 operator()(Event const& evt,FSM& fsm,STATE& state )const 2986 { 2987 return (T()(evt,fsm,state)).equal_range(Param()(evt,fsm,state)); 2988 } 2989 }; 2990 2991 struct associative_equal_range_tag {}; 2992 struct Associative_Equal_Range_Helper: proto::extends< proto::terminal<associative_equal_range_tag>::type, 2993 Associative_Equal_Range_Helper, boost::msm::sm_domain> 2994 { Associative_Equal_Range_Helperboost::msm::front::euml::Associative_Equal_Range_Helper2995 Associative_Equal_Range_Helper(){} 2996 template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5 2997 #ifdef BOOST_MSVC 2998 ,class Arg6 2999 #endif 3000 > 3001 struct In 3002 { 3003 typedef Associative_Equal_Range_<Arg1,Arg2> type; 3004 }; 3005 }; 3006 Associative_Equal_Range_Helper const associative_equal_range_; 3007 3008 template <class Container,class Param1, class Param2> 3009 struct Substr_ : euml_action<Substr_<Container,Param1,Param2> > 3010 { 3011 template <class Event,class FSM,class STATE > 3012 struct state_action_result 3013 { 3014 typedef typename remove_reference< 3015 typename get_result_type2<Container,Event,FSM,STATE>::type>::type type; 3016 }; 3017 template <class EVT,class FSM,class SourceState,class TargetState> 3018 struct transition_action_result 3019 { 3020 typedef typename remove_reference< 3021 typename get_result_type<Container,EVT,FSM,SourceState,TargetState>::type>::type type; 3022 }; 3023 typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type; 3024 3025 template <class EVT,class FSM,class SourceState,class TargetState> 3026 typename transition_action_result<EVT,FSM,SourceState,TargetState>::type operator ()boost::msm::front::euml::Substr_3027 operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const 3028 { 3029 return (Container()(evt,fsm,src,tgt)). 3030 substr(Param1()(evt,fsm,src,tgt),Param2()(evt,fsm,src,tgt)); 3031 } 3032 template <class Event,class FSM,class STATE> 3033 typename state_action_result<Event,FSM,STATE>::type operator ()boost::msm::front::euml::Substr_3034 operator()(Event const& evt,FSM& fsm,STATE& state )const 3035 { 3036 return (Container()(evt,fsm,state)). 3037 substr(Param1()(evt,fsm,state),Param2()(evt,fsm,state)); 3038 } 3039 }; 3040 template <class Container> 3041 struct Substr_ <Container,void,void> 3042 : euml_action<Substr_<Container,void,void> > 3043 3044 { 3045 template <class Event,class FSM,class STATE > 3046 struct state_action_result 3047 { 3048 typedef typename remove_reference< 3049 typename get_result_type2<Container,Event,FSM,STATE>::type>::type type; 3050 }; 3051 template <class EVT,class FSM,class SourceState,class TargetState> 3052 struct transition_action_result 3053 { 3054 typedef typename remove_reference< 3055 typename get_result_type<Container,EVT,FSM,SourceState,TargetState>::type>::type type; 3056 }; 3057 typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type; 3058 3059 template <class EVT,class FSM,class SourceState,class TargetState> 3060 typename transition_action_result<EVT,FSM,SourceState,TargetState>::type operator ()boost::msm::front::euml::Substr_3061 operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const 3062 { 3063 return (Container()(evt,fsm,src,tgt)).substr(); 3064 } 3065 template <class Event,class FSM,class STATE> 3066 typename state_action_result<Event,FSM,STATE>::type operator ()boost::msm::front::euml::Substr_3067 operator()(Event const& evt,FSM& fsm,STATE& state )const 3068 { 3069 return (Container()(evt,fsm,state)).substr(); 3070 } 3071 }; 3072 3073 template <class Container,class Param1> 3074 struct Substr_ < Container,Param1,void> 3075 : euml_action<Substr_<Container,Param1,void> > 3076 { 3077 template <class Event,class FSM,class STATE > 3078 struct state_action_result 3079 { 3080 typedef typename remove_reference< 3081 typename get_result_type2<Container,Event,FSM,STATE>::type>::type type; 3082 }; 3083 template <class EVT,class FSM,class SourceState,class TargetState> 3084 struct transition_action_result 3085 { 3086 typedef typename remove_reference< 3087 typename get_result_type<Container,EVT,FSM,SourceState,TargetState>::type>::type type; 3088 }; 3089 typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type; 3090 3091 template <class EVT,class FSM,class SourceState,class TargetState> 3092 typename transition_action_result<EVT,FSM,SourceState,TargetState>::type operator ()boost::msm::front::euml::Substr_3093 operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const 3094 { 3095 return (Container()(evt,fsm,src,tgt)).substr(Param1()(evt,fsm,src,tgt)); 3096 } 3097 template <class Event,class FSM,class STATE> 3098 typename state_action_result<Event,FSM,STATE>::type operator ()boost::msm::front::euml::Substr_3099 operator()(Event const& evt,FSM& fsm,STATE& state )const 3100 { 3101 return (Container()(evt,fsm,state)).substr(Param1()(evt,fsm,state)); 3102 } 3103 }; 3104 struct substr_tag {}; 3105 struct Substr_Helper: proto::extends< proto::terminal<substr_tag>::type, Substr_Helper, boost::msm::sm_domain> 3106 { Substr_Helperboost::msm::front::euml::Substr_Helper3107 Substr_Helper(){} 3108 template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5 3109 #ifdef BOOST_MSVC 3110 ,class Arg6 3111 #endif 3112 > 3113 struct In 3114 { 3115 typedef Substr_<Arg1,Arg2,Arg3> type; 3116 }; 3117 }; 3118 Substr_Helper const substr_; 3119 3120 template <class Container, class Param1, class Param2, class Param3, class Param4 > 3121 struct StringCompare_ : euml_action<StringCompare_<Container,Param1,Param2,Param3,Param4> > 3122 { 3123 template <class Event,class FSM,class STATE > 3124 struct state_action_result 3125 { 3126 typedef int type; 3127 }; 3128 template <class EVT,class FSM,class SourceState,class TargetState> 3129 struct transition_action_result 3130 { 3131 typedef int type; 3132 }; 3133 typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type; 3134 3135 template <class EVT,class FSM,class SourceState,class TargetState> 3136 typename ::boost::enable_if< 3137 typename ::boost::mpl::has_key< 3138 typename Container::tag_type,action_tag>::type, 3139 typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type operator ()boost::msm::front::euml::StringCompare_3140 operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const 3141 { 3142 return (Container()(evt,fsm,src,tgt)).compare(Param1()(evt,fsm,src,tgt),Param2()(evt,fsm,src,tgt), 3143 Param3()(evt,fsm,src,tgt),Param4()(evt,fsm,src,tgt)); 3144 } 3145 template <class Event,class FSM,class STATE> 3146 typename ::boost::enable_if< 3147 typename ::boost::mpl::has_key< 3148 typename Container::tag_type,state_action_tag>::type, 3149 typename state_action_result<Event,FSM,STATE>::type >::type operator ()boost::msm::front::euml::StringCompare_3150 operator()(Event const& evt,FSM& fsm,STATE& state )const 3151 { 3152 return (Container()(evt,fsm,state)).compare(Param1()(evt,fsm,state),Param2()(evt,fsm,state), 3153 Param3()(evt,fsm,state),Param4()(evt,fsm,state)); 3154 } 3155 }; 3156 template <class Container, class Param1 > 3157 struct StringCompare_<Container,Param1,void,void,void> 3158 : euml_action<StringCompare_<Container,Param1,void,void,void> > 3159 { 3160 template <class Event,class FSM,class STATE > 3161 struct state_action_result 3162 { 3163 typedef int type; 3164 }; 3165 template <class EVT,class FSM,class SourceState,class TargetState> 3166 struct transition_action_result 3167 { 3168 typedef int type; 3169 }; 3170 typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type; 3171 3172 template <class EVT,class FSM,class SourceState,class TargetState> 3173 typename ::boost::enable_if< 3174 typename ::boost::mpl::has_key< 3175 typename Container::tag_type,action_tag>::type, 3176 typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type operator ()boost::msm::front::euml::StringCompare_3177 operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const 3178 { 3179 return (Container()(evt,fsm,src,tgt)).compare(Param1()(evt,fsm,src,tgt)); 3180 } 3181 template <class Event,class FSM,class STATE> 3182 typename ::boost::enable_if< 3183 typename ::boost::mpl::has_key< 3184 typename Container::tag_type,state_action_tag>::type, 3185 typename state_action_result<Event,FSM,STATE>::type >::type operator ()boost::msm::front::euml::StringCompare_3186 operator()(Event const& evt,FSM& fsm,STATE& state )const 3187 { 3188 return (Container()(evt,fsm,state)).compare(Param1()(evt,fsm,state)); 3189 } 3190 }; 3191 3192 template <class Container, class Param1, class Param2> 3193 struct StringCompare_<Container,Param1,Param2,void,void> 3194 : euml_action<StringCompare_<Container,Param1,Param2,void,void> > 3195 { 3196 template <class Event,class FSM,class STATE > 3197 struct state_action_result 3198 { 3199 typedef int type; 3200 }; 3201 template <class EVT,class FSM,class SourceState,class TargetState> 3202 struct transition_action_result 3203 { 3204 typedef int type; 3205 }; 3206 typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type; 3207 3208 template <class EVT,class FSM,class SourceState,class TargetState> 3209 typename ::boost::enable_if< 3210 typename ::boost::mpl::has_key< 3211 typename Container::tag_type,action_tag>::type, 3212 typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type operator ()boost::msm::front::euml::StringCompare_3213 operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const 3214 { 3215 return (Container()(evt,fsm,src,tgt)).compare(Param1()(evt,fsm,src,tgt),Param2()(evt,fsm,src,tgt)); 3216 } 3217 template <class Event,class FSM,class STATE> 3218 typename ::boost::enable_if< 3219 typename ::boost::mpl::has_key< 3220 typename Container::tag_type,state_action_tag>::type, 3221 typename state_action_result<Event,FSM,STATE>::type >::type operator ()boost::msm::front::euml::StringCompare_3222 operator()(Event const& evt,FSM& fsm,STATE& state )const 3223 { 3224 return (Container()(evt,fsm,state)).compare(Param1()(evt,fsm,state),Param2()(evt,fsm,state)); 3225 } 3226 }; 3227 3228 template <class Container, class Param1, class Param2, class Param3 > 3229 struct StringCompare_<Container,Param1,Param2,Param3,void> 3230 : euml_action<StringCompare_<Container,Param1,Param2,Param3,void> > 3231 { 3232 template <class Event,class FSM,class STATE > 3233 struct state_action_result 3234 { 3235 typedef int type; 3236 }; 3237 template <class EVT,class FSM,class SourceState,class TargetState> 3238 struct transition_action_result 3239 { 3240 typedef int type; 3241 }; 3242 typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type; 3243 3244 template <class EVT,class FSM,class SourceState,class TargetState> 3245 typename ::boost::enable_if< 3246 typename ::boost::mpl::has_key< 3247 typename Container::tag_type,action_tag>::type, 3248 typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type operator ()boost::msm::front::euml::StringCompare_3249 operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const 3250 { 3251 return (Container()(evt,fsm,src,tgt)).compare(Param1()(evt,fsm,src,tgt),Param2()(evt,fsm,src,tgt), 3252 Param3()(evt,fsm,src,tgt)); 3253 } 3254 template <class Event,class FSM,class STATE> 3255 typename ::boost::enable_if< 3256 typename ::boost::mpl::has_key< 3257 typename Container::tag_type,state_action_tag>::type, 3258 typename state_action_result<Event,FSM,STATE>::type >::type operator ()boost::msm::front::euml::StringCompare_3259 operator()(Event const& evt,FSM& fsm,STATE& state )const 3260 { 3261 return (Container()(evt,fsm,state)).compare(Param1()(evt,fsm,state),Param2()(evt,fsm,state), 3262 Param3()(evt,fsm,state)); 3263 } 3264 }; 3265 3266 struct string_compare_tag {}; 3267 struct StringCompare_Helper: proto::extends< proto::terminal<string_compare_tag>::type, StringCompare_Helper, boost::msm::sm_domain> 3268 { StringCompare_Helperboost::msm::front::euml::StringCompare_Helper3269 StringCompare_Helper(){} 3270 template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5 3271 #ifdef BOOST_MSVC 3272 ,class Arg6 3273 #endif 3274 > 3275 struct In 3276 { 3277 typedef StringCompare_<Arg1,Arg2,Arg3,Arg4,Arg5> type; 3278 }; 3279 }; 3280 StringCompare_Helper const string_compare_; 3281 3282 template <class Container, class Param1, class Param2, class Param3 > 3283 struct Append_ : euml_action<Append_<Container,Param1,Param2,Param3> > 3284 { 3285 template <class Event,class FSM,class STATE > 3286 struct state_action_result 3287 { 3288 typedef typename get_result_type2<Container,Event,FSM,STATE>::type type; 3289 }; 3290 template <class EVT,class FSM,class SourceState,class TargetState> 3291 struct transition_action_result 3292 { 3293 typedef typename get_result_type<Container,EVT,FSM,SourceState,TargetState>::type type; 3294 }; 3295 typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type; 3296 3297 template <class EVT,class FSM,class SourceState,class TargetState> 3298 typename ::boost::enable_if< 3299 typename ::boost::mpl::has_key< 3300 typename Container::tag_type,action_tag>::type, 3301 typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type operator ()boost::msm::front::euml::Append_3302 operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const 3303 { 3304 return (Container()(evt,fsm,src,tgt)).append (Param1()(evt,fsm,src,tgt),Param2()(evt,fsm,src,tgt), 3305 Param3()(evt,fsm,src,tgt)); 3306 } 3307 template <class Event,class FSM,class STATE> 3308 typename ::boost::enable_if< 3309 typename ::boost::mpl::has_key< 3310 typename Container::tag_type,state_action_tag>::type, 3311 typename state_action_result<Event,FSM,STATE>::type >::type operator ()boost::msm::front::euml::Append_3312 operator()(Event const& evt,FSM& fsm,STATE& state )const 3313 { 3314 return (Container()(evt,fsm,state)).append (Param1()(evt,fsm,state),Param2()(evt,fsm,state), 3315 Param3()(evt,fsm,state)); 3316 } 3317 }; 3318 template <class Container, class Param1> 3319 struct Append_<Container,Param1,void,void> 3320 : euml_action<Append_<Container,Param1,void,void> > 3321 { 3322 template <class Event,class FSM,class STATE > 3323 struct state_action_result 3324 { 3325 typedef typename get_result_type2<Container,Event,FSM,STATE>::type type; 3326 }; 3327 template <class EVT,class FSM,class SourceState,class TargetState> 3328 struct transition_action_result 3329 { 3330 typedef typename get_result_type<Container,EVT,FSM,SourceState,TargetState>::type type; 3331 }; 3332 typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type; 3333 3334 template <class EVT,class FSM,class SourceState,class TargetState> 3335 typename ::boost::enable_if< 3336 typename ::boost::mpl::has_key< 3337 typename Container::tag_type,action_tag>::type, 3338 typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type operator ()boost::msm::front::euml::Append_3339 operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const 3340 { 3341 return (Container()(evt,fsm,src,tgt)).append(Param1()(evt,fsm,src,tgt)); 3342 } 3343 template <class Event,class FSM,class STATE> 3344 typename ::boost::enable_if< 3345 typename ::boost::mpl::has_key< 3346 typename Container::tag_type,state_action_tag>::type, 3347 typename state_action_result<Event,FSM,STATE>::type >::type operator ()boost::msm::front::euml::Append_3348 operator()(Event const& evt,FSM& fsm,STATE& state )const 3349 { 3350 return (Container()(evt,fsm,state)).append(Param1()(evt,fsm,state)); 3351 } 3352 }; 3353 3354 template <class Container, class Param1, class Param2 > 3355 struct Append_<Container,Param1,Param2,void> 3356 : euml_action<Append_<Container,Param1,Param2,void> > 3357 { 3358 template <class Event,class FSM,class STATE > 3359 struct state_action_result 3360 { 3361 typedef typename get_result_type2<Container,Event,FSM,STATE>::type type; 3362 }; 3363 template <class EVT,class FSM,class SourceState,class TargetState> 3364 struct transition_action_result 3365 { 3366 typedef typename get_result_type<Container,EVT,FSM,SourceState,TargetState>::type type; 3367 }; 3368 typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type; 3369 3370 template <class EVT,class FSM,class SourceState,class TargetState> 3371 typename ::boost::enable_if< 3372 typename ::boost::mpl::has_key< 3373 typename Container::tag_type,action_tag>::type, 3374 typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type operator ()boost::msm::front::euml::Append_3375 operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const 3376 { 3377 return (Container()(evt,fsm,src,tgt)).append(Param1()(evt,fsm,src,tgt),Param2()(evt,fsm,src,tgt)); 3378 } 3379 template <class Event,class FSM,class STATE> 3380 typename ::boost::enable_if< 3381 typename ::boost::mpl::has_key< 3382 typename Container::tag_type,state_action_tag>::type, 3383 typename state_action_result<Event,FSM,STATE>::type >::type operator ()boost::msm::front::euml::Append_3384 operator()(Event const& evt,FSM& fsm,STATE& state )const 3385 { 3386 return (Container()(evt,fsm,state)).append(Param1()(evt,fsm,state),Param2()(evt,fsm,state)); 3387 } 3388 }; 3389 3390 struct append_tag {}; 3391 struct Append_Helper: proto::extends< proto::terminal<append_tag>::type, Append_Helper, boost::msm::sm_domain> 3392 { Append_Helperboost::msm::front::euml::Append_Helper3393 Append_Helper(){} 3394 template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5 3395 #ifdef BOOST_MSVC 3396 ,class Arg6 3397 #endif 3398 > 3399 struct In 3400 { 3401 typedef Append_<Arg1,Arg2,Arg3,Arg4> type; 3402 }; 3403 }; 3404 Append_Helper const append_; 3405 3406 template <class Container, class Param1, class Param2, class Param3, class Param4 > 3407 struct StringInsert_ : euml_action<StringInsert_<Container,Param1,Param2,Param3,Param4> > 3408 { 3409 template <class Event,class FSM,class STATE > 3410 struct state_action_result 3411 { 3412 typedef typename get_result_type2<Container,Event,FSM,STATE>::type type; 3413 }; 3414 template <class EVT,class FSM,class SourceState,class TargetState> 3415 struct transition_action_result 3416 { 3417 typedef typename get_result_type<Container,EVT,FSM,SourceState,TargetState>::type type; 3418 }; 3419 typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type; 3420 3421 template <class EVT,class FSM,class SourceState,class TargetState> 3422 typename ::boost::enable_if< 3423 typename ::boost::mpl::has_key< 3424 typename Container::tag_type,action_tag>::type, 3425 typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type operator ()boost::msm::front::euml::StringInsert_3426 operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const 3427 { 3428 return (Container()(evt,fsm,src,tgt)).insert(Param1()(evt,fsm,src,tgt),Param2()(evt,fsm,src,tgt), 3429 Param3()(evt,fsm,src,tgt),Param4()(evt,fsm,src,tgt)); 3430 } 3431 template <class Event,class FSM,class STATE> 3432 typename ::boost::enable_if< 3433 typename ::boost::mpl::has_key< 3434 typename Container::tag_type,state_action_tag>::type, 3435 typename state_action_result<Event,FSM,STATE>::type >::type operator ()boost::msm::front::euml::StringInsert_3436 operator()(Event const& evt,FSM& fsm,STATE& state )const 3437 { 3438 return (Container()(evt,fsm,state)).insert(Param1()(evt,fsm,state),Param2()(evt,fsm,state), 3439 Param3()(evt,fsm,state),Param4()(evt,fsm,state)); 3440 } 3441 }; 3442 template <class Container, class Param1, class Param2> 3443 struct StringInsert_ <Container,Param1,Param2,void,void> 3444 : euml_action<StringInsert_<Container,Param1,Param2,void,void> > 3445 { 3446 template <class Event,class FSM,class STATE > 3447 struct state_action_result 3448 { 3449 typedef typename get_result_type2<Container,Event,FSM,STATE>::type type; 3450 }; 3451 template <class EVT,class FSM,class SourceState,class TargetState> 3452 struct transition_action_result 3453 { 3454 typedef typename get_result_type<Container,EVT,FSM,SourceState,TargetState>::type type; 3455 }; 3456 typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type; 3457 3458 template <class EVT,class FSM,class SourceState,class TargetState> 3459 typename ::boost::enable_if< 3460 typename ::boost::mpl::has_key< 3461 typename Container::tag_type,action_tag>::type, 3462 typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type operator ()boost::msm::front::euml::StringInsert_3463 operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const 3464 { 3465 return (Container()(evt,fsm,src,tgt)).insert(Param1()(evt,fsm,src,tgt),Param2()(evt,fsm,src,tgt)); 3466 } 3467 template <class Event,class FSM,class STATE> 3468 typename ::boost::enable_if< 3469 typename ::boost::mpl::has_key< 3470 typename Container::tag_type,state_action_tag>::type, 3471 typename state_action_result<Event,FSM,STATE>::type >::type operator ()boost::msm::front::euml::StringInsert_3472 operator()(Event const& evt,FSM& fsm,STATE& state )const 3473 { 3474 return (Container()(evt,fsm,state)).insert(Param1()(evt,fsm,state),Param2()(evt,fsm,state)); 3475 } 3476 }; 3477 template <class Container, class Param1, class Param2, class Param3> 3478 struct StringInsert_<Container,Param1,Param2,Param3,void> 3479 : euml_action<StringInsert_<Container,Param1,Param2,Param3,void> > 3480 { 3481 template <class Event,class FSM,class STATE > 3482 struct state_action_result 3483 { 3484 typedef typename get_result_type2<Container,Event,FSM,STATE>::type type; 3485 }; 3486 template <class EVT,class FSM,class SourceState,class TargetState> 3487 struct transition_action_result 3488 { 3489 typedef typename get_result_type<Container,EVT,FSM,SourceState,TargetState>::type type; 3490 }; 3491 typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type; 3492 3493 template <class EVT,class FSM,class SourceState,class TargetState> 3494 typename ::boost::enable_if< 3495 typename ::boost::mpl::has_key< 3496 typename Container::tag_type,action_tag>::type, 3497 typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type operator ()boost::msm::front::euml::StringInsert_3498 operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const 3499 { 3500 return (Container()(evt,fsm,src,tgt)).insert(Param1()(evt,fsm,src,tgt),Param2()(evt,fsm,src,tgt), 3501 Param3()(evt,fsm,src,tgt)); 3502 } 3503 template <class Event,class FSM,class STATE> 3504 typename ::boost::enable_if< 3505 typename ::boost::mpl::has_key< 3506 typename Container::tag_type,state_action_tag>::type, 3507 typename state_action_result<Event,FSM,STATE>::type >::type operator ()boost::msm::front::euml::StringInsert_3508 operator()(Event const& evt,FSM& fsm,STATE& state )const 3509 { 3510 return (Container()(evt,fsm,state)).insert(Param1()(evt,fsm,state),Param2()(evt,fsm,state), 3511 Param3()(evt,fsm,state)); 3512 } 3513 }; 3514 3515 struct string_insert_tag {}; 3516 struct StringInsert_Helper: proto::extends< proto::terminal<string_insert_tag>::type, StringInsert_Helper, boost::msm::sm_domain> 3517 { StringInsert_Helperboost::msm::front::euml::StringInsert_Helper3518 StringInsert_Helper(){} 3519 template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5 3520 #ifdef BOOST_MSVC 3521 ,class Arg6 3522 #endif 3523 > 3524 struct In 3525 { 3526 typedef StringInsert_<Arg1,Arg2,Arg3,Arg4,Arg5> type; 3527 }; 3528 }; 3529 StringInsert_Helper const string_insert_; 3530 3531 template <class Container,class Param1, class Param2> 3532 struct StringErase_ : euml_action<StringErase_<Container,Param1,Param2> > 3533 { 3534 template <class Event,class FSM,class STATE > 3535 struct state_action_result 3536 { 3537 typedef typename get_result_type2<Container,Event,FSM,STATE>::type type; 3538 }; 3539 template <class EVT,class FSM,class SourceState,class TargetState> 3540 struct transition_action_result 3541 { 3542 typedef typename get_result_type<Container,EVT,FSM,SourceState,TargetState>::type type; 3543 }; 3544 typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type; 3545 3546 template <class EVT,class FSM,class SourceState,class TargetState> 3547 typename transition_action_result<EVT,FSM,SourceState,TargetState>::type operator ()boost::msm::front::euml::StringErase_3548 operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const 3549 { 3550 return (Container()(evt,fsm,src,tgt)). 3551 erase(Param1()(evt,fsm,src,tgt),Param2()(evt,fsm,src,tgt)); 3552 } 3553 template <class Event,class FSM,class STATE> 3554 typename state_action_result<Event,FSM,STATE>::type operator ()boost::msm::front::euml::StringErase_3555 operator()(Event const& evt,FSM& fsm,STATE& state )const 3556 { 3557 return (Container()(evt,fsm,state)). 3558 erase(Param1()(evt,fsm,state),Param2()(evt,fsm,state)); 3559 } 3560 }; 3561 template <class Container> 3562 struct StringErase_ <Container,void,void> 3563 : euml_action<StringErase_<Container,void,void> > 3564 3565 { 3566 template <class Event,class FSM,class STATE > 3567 struct state_action_result 3568 { 3569 typedef typename get_result_type2<Container,Event,FSM,STATE>::type type; 3570 }; 3571 template <class EVT,class FSM,class SourceState,class TargetState> 3572 struct transition_action_result 3573 { 3574 typedef typename get_result_type<Container,EVT,FSM,SourceState,TargetState>::type type; 3575 }; 3576 typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type; 3577 3578 template <class EVT,class FSM,class SourceState,class TargetState> 3579 typename transition_action_result<EVT,FSM,SourceState,TargetState>::type operator ()boost::msm::front::euml::StringErase_3580 operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const 3581 { 3582 return (Container()(evt,fsm,src,tgt)).erase(); 3583 } 3584 template <class Event,class FSM,class STATE> 3585 typename state_action_result<Event,FSM,STATE>::type operator ()boost::msm::front::euml::StringErase_3586 operator()(Event const& evt,FSM& fsm,STATE& state )const 3587 { 3588 return (Container()(evt,fsm,state)).erase(); 3589 } 3590 }; 3591 3592 template <class Container,class Param1> 3593 struct StringErase_ <Container,Param1,void> 3594 : euml_action<StringErase_<Container,Param1,void> > 3595 { 3596 template <class Event,class FSM,class STATE > 3597 struct state_action_result 3598 { 3599 typedef typename get_result_type2<Container,Event,FSM,STATE>::type type; 3600 }; 3601 template <class EVT,class FSM,class SourceState,class TargetState> 3602 struct transition_action_result 3603 { 3604 typedef typename get_result_type<Container,EVT,FSM,SourceState,TargetState>::type type; 3605 }; 3606 typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type; 3607 3608 template <class EVT,class FSM,class SourceState,class TargetState> 3609 typename transition_action_result<EVT,FSM,SourceState,TargetState>::type operator ()boost::msm::front::euml::StringErase_3610 operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const 3611 { 3612 return (Container()(evt,fsm,src,tgt)).erase(Param1()(evt,fsm,src,tgt)); 3613 } 3614 template <class Event,class FSM,class STATE> 3615 typename state_action_result<Event,FSM,STATE>::type operator ()boost::msm::front::euml::StringErase_3616 operator()(Event const& evt,FSM& fsm,STATE& state )const 3617 { 3618 return (Container()(evt,fsm,state)).erase(Param1()(evt,fsm,state)); 3619 } 3620 }; 3621 3622 struct string_erase_tag {}; 3623 struct StringErase_Helper: proto::extends< proto::terminal<string_erase_tag>::type, StringErase_Helper, boost::msm::sm_domain> 3624 { StringErase_Helperboost::msm::front::euml::StringErase_Helper3625 StringErase_Helper(){} 3626 template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5 3627 #ifdef BOOST_MSVC 3628 ,class Arg6 3629 #endif 3630 > 3631 struct In 3632 { 3633 typedef StringErase_<Arg1,Arg2,Arg3> type; 3634 }; 3635 }; 3636 StringErase_Helper const string_erase_; 3637 3638 template <class Container, class Param1, class Param2, class Param3 > 3639 struct StringAssign_ : euml_action<StringAssign_<Container,Param1,Param2,Param3> > 3640 { 3641 template <class Event,class FSM,class STATE > 3642 struct state_action_result 3643 { 3644 typedef typename get_result_type2<Container,Event,FSM,STATE>::type type; 3645 }; 3646 template <class EVT,class FSM,class SourceState,class TargetState> 3647 struct transition_action_result 3648 { 3649 typedef typename get_result_type<Container,EVT,FSM,SourceState,TargetState>::type type; 3650 }; 3651 typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type; 3652 3653 template <class EVT,class FSM,class SourceState,class TargetState> 3654 typename ::boost::enable_if< 3655 typename ::boost::mpl::has_key< 3656 typename Container::tag_type,action_tag>::type, 3657 typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type operator ()boost::msm::front::euml::StringAssign_3658 operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const 3659 { 3660 return (Container()(evt,fsm,src,tgt)).assign (Param1()(evt,fsm,src,tgt),Param2()(evt,fsm,src,tgt), 3661 Param3()(evt,fsm,src,tgt)); 3662 } 3663 template <class Event,class FSM,class STATE> 3664 typename ::boost::enable_if< 3665 typename ::boost::mpl::has_key< 3666 typename Container::tag_type,state_action_tag>::type, 3667 typename state_action_result<Event,FSM,STATE>::type >::type operator ()boost::msm::front::euml::StringAssign_3668 operator()(Event const& evt,FSM& fsm,STATE& state )const 3669 { 3670 return (Container()(evt,fsm,state)).assign (Param1()(evt,fsm,state),Param2()(evt,fsm,state), 3671 Param3()(evt,fsm,state)); 3672 } 3673 }; 3674 template <class Container,class Param1> 3675 struct StringAssign_ < 3676 Container,Param1,void,void> 3677 : euml_action<StringAssign_<Container,Param1,void,void> > 3678 { 3679 template <class Event,class FSM,class STATE > 3680 struct state_action_result 3681 { 3682 typedef typename get_result_type2<Container,Event,FSM,STATE>::type type; 3683 }; 3684 template <class EVT,class FSM,class SourceState,class TargetState> 3685 struct transition_action_result 3686 { 3687 typedef typename get_result_type<Container,EVT,FSM,SourceState,TargetState>::type type; 3688 }; 3689 typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type; 3690 3691 template <class EVT,class FSM,class SourceState,class TargetState> 3692 typename ::boost::enable_if< 3693 typename ::boost::mpl::has_key< 3694 typename Container::tag_type,action_tag>::type, 3695 typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type operator ()boost::msm::front::euml::StringAssign_3696 operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const 3697 { 3698 return (Container()(evt,fsm,src,tgt)).assign(Param1()(evt,fsm,src,tgt)); 3699 } 3700 template <class Event,class FSM,class STATE> 3701 typename ::boost::enable_if< 3702 typename ::boost::mpl::has_key< 3703 typename Container::tag_type,state_action_tag>::type, 3704 typename state_action_result<Event,FSM,STATE>::type >::type operator ()boost::msm::front::euml::StringAssign_3705 operator()(Event const& evt,FSM& fsm,STATE& state )const 3706 { 3707 return (Container()(evt,fsm,state)).assign(Param1()(evt,fsm,state)); 3708 } 3709 }; 3710 3711 template <class Container, class Param1, class Param2 > 3712 struct StringAssign_<Container,Param1,Param2,void> 3713 : euml_action<StringAssign_<Container,Param1,Param2,void> > 3714 { 3715 template <class Event,class FSM,class STATE > 3716 struct state_action_result 3717 { 3718 typedef typename get_result_type2<Container,Event,FSM,STATE>::type type; 3719 }; 3720 template <class EVT,class FSM,class SourceState,class TargetState> 3721 struct transition_action_result 3722 { 3723 typedef typename get_result_type<Container,EVT,FSM,SourceState,TargetState>::type type; 3724 }; 3725 typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type; 3726 3727 template <class EVT,class FSM,class SourceState,class TargetState> 3728 typename ::boost::enable_if< 3729 typename ::boost::mpl::has_key< 3730 typename Container::tag_type,action_tag>::type, 3731 typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type operator ()boost::msm::front::euml::StringAssign_3732 operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const 3733 { 3734 return (Container()(evt,fsm,src,tgt)).assign(Param1()(evt,fsm,src,tgt),Param2()(evt,fsm,src,tgt)); 3735 } 3736 template <class Event,class FSM,class STATE> 3737 typename ::boost::enable_if< 3738 typename ::boost::mpl::has_key< 3739 typename Container::tag_type,state_action_tag>::type, 3740 typename state_action_result<Event,FSM,STATE>::type >::type operator ()boost::msm::front::euml::StringAssign_3741 operator()(Event const& evt,FSM& fsm,STATE& state )const 3742 { 3743 return (Container()(evt,fsm,state)).assign(Param1()(evt,fsm,state),Param2()(evt,fsm,state)); 3744 } 3745 }; 3746 struct assign_tag {}; 3747 struct StringAssign_Helper: proto::extends< proto::terminal<assign_tag>::type, StringAssign_Helper, boost::msm::sm_domain> 3748 { StringAssign_Helperboost::msm::front::euml::StringAssign_Helper3749 StringAssign_Helper(){} 3750 template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5 3751 #ifdef BOOST_MSVC 3752 ,class Arg6 3753 #endif 3754 > 3755 struct In 3756 { 3757 typedef StringAssign_<Arg1,Arg2,Arg3,Arg4> type; 3758 }; 3759 }; 3760 StringAssign_Helper const string_assign_; 3761 3762 template <class Container,class Param1, class Param2, class Param3, class Param4> 3763 struct StringReplace_ : euml_action<StringReplace_<Container,Param1,Param2,Param3,Param4> > 3764 { 3765 template <class Event,class FSM,class STATE > 3766 struct state_action_result 3767 { 3768 typedef typename get_result_type2<Container,Event,FSM,STATE>::type type; 3769 }; 3770 template <class EVT,class FSM,class SourceState,class TargetState> 3771 struct transition_action_result 3772 { 3773 typedef typename get_result_type<Container,EVT,FSM,SourceState,TargetState>::type type; 3774 }; 3775 typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type; 3776 3777 template <class EVT,class FSM,class SourceState,class TargetState> 3778 typename ::boost::enable_if< 3779 typename ::boost::mpl::has_key< 3780 typename Container::tag_type,action_tag>::type, 3781 typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type operator ()boost::msm::front::euml::StringReplace_3782 operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const 3783 { 3784 return (Container()(evt,fsm,src,tgt)).replace (Param1()(evt,fsm,src,tgt),Param2()(evt,fsm,src,tgt), 3785 Param3()(evt,fsm,src,tgt),Param4()(evt,fsm,src,tgt)); 3786 } 3787 template <class Event,class FSM,class STATE> 3788 typename ::boost::enable_if< 3789 typename ::boost::mpl::has_key< 3790 typename Container::tag_type,state_action_tag>::type, 3791 typename state_action_result<Event,FSM,STATE>::type >::type operator ()boost::msm::front::euml::StringReplace_3792 operator()(Event const& evt,FSM& fsm,STATE& state )const 3793 { 3794 return (Container()(evt,fsm,state)).replace (Param1()(evt,fsm,state),Param2()(evt,fsm,state), 3795 Param3()(evt,fsm,state),Param4()(evt,fsm,state)); 3796 } 3797 }; 3798 3799 template <class Container,class Param1, class Param2, class Param3> 3800 struct StringReplace_<Container,Param1,Param2,Param3,void> 3801 : euml_action<StringReplace_<Container,Param1,Param2,Param3,void> > 3802 { 3803 template <class Event,class FSM,class STATE > 3804 struct state_action_result 3805 { 3806 typedef typename get_result_type2<Container,Event,FSM,STATE>::type type; 3807 }; 3808 template <class EVT,class FSM,class SourceState,class TargetState> 3809 struct transition_action_result 3810 { 3811 typedef typename get_result_type<Container,EVT,FSM,SourceState,TargetState>::type type; 3812 }; 3813 typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type; 3814 3815 template <class EVT,class FSM,class SourceState,class TargetState> 3816 typename ::boost::enable_if< 3817 typename ::boost::mpl::has_key< 3818 typename Container::tag_type,action_tag>::type, 3819 typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type operator ()boost::msm::front::euml::StringReplace_3820 operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const 3821 { 3822 return (Container()(evt,fsm,src,tgt)).replace(Param1()(evt,fsm,src,tgt),Param2()(evt,fsm,src,tgt), 3823 Param3()(evt,fsm,src,tgt)); 3824 } 3825 template <class Event,class FSM,class STATE> 3826 typename ::boost::enable_if< 3827 typename ::boost::mpl::has_key< 3828 typename Container::tag_type,state_action_tag>::type, 3829 typename state_action_result<Event,FSM,STATE>::type >::type operator ()boost::msm::front::euml::StringReplace_3830 operator()(Event const& evt,FSM& fsm,STATE& state )const 3831 { 3832 return (Container()(evt,fsm,state)).replace(Param1()(evt,fsm,state),Param2()(evt,fsm,state), 3833 Param3()(evt,fsm,state)); 3834 } 3835 }; 3836 3837 struct string_replace_tag {}; 3838 struct StringReplace_Helper: proto::extends< proto::terminal<string_replace_tag>::type, StringReplace_Helper, boost::msm::sm_domain> 3839 { StringReplace_Helperboost::msm::front::euml::StringReplace_Helper3840 StringReplace_Helper(){} 3841 template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5 3842 #ifdef BOOST_MSVC 3843 ,class Arg6 3844 #endif 3845 > 3846 struct In 3847 { 3848 typedef StringReplace_<Arg1,Arg2,Arg3,Arg4,Arg5> type; 3849 }; 3850 }; 3851 StringReplace_Helper const string_replace_; 3852 3853 template <class Container> 3854 struct CStr_ : euml_action<CStr_<Container> > 3855 { 3856 template <class Event,class FSM,class STATE > 3857 struct state_action_result 3858 { 3859 typedef typename ::boost::add_const< 3860 typename get_value_type< 3861 typename ::boost::remove_reference< 3862 typename get_result_type2<Container,Event,FSM,STATE>::type>::type>::type>::type* type; 3863 }; 3864 template <class EVT,class FSM,class SourceState,class TargetState> 3865 struct transition_action_result 3866 { 3867 typedef typename ::boost::add_const< 3868 typename get_value_type< 3869 typename ::boost::remove_reference< 3870 typename get_result_type<Container,EVT,FSM,SourceState,TargetState>::type>::type>::type>::type* type; 3871 }; 3872 typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type; 3873 3874 template <class EVT,class FSM,class SourceState,class TargetState> 3875 typename ::boost::enable_if< 3876 typename ::boost::mpl::has_key< 3877 typename Container::tag_type,action_tag>::type, 3878 typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type operator ()boost::msm::front::euml::CStr_3879 operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const 3880 { 3881 return (Container()(evt,fsm,src,tgt)).c_str(); 3882 } 3883 template <class Event,class FSM,class STATE> 3884 typename ::boost::enable_if< 3885 typename ::boost::mpl::has_key< 3886 typename Container::tag_type,state_action_tag>::type, 3887 typename state_action_result<Event,FSM,STATE>::type >::type operator ()boost::msm::front::euml::CStr_3888 operator()(Event const& evt,FSM& fsm,STATE& state )const 3889 { 3890 return (Container()(evt,fsm,state)).c_str(); 3891 } 3892 }; 3893 struct c_str_tag {}; 3894 struct CStr_Helper: proto::extends< proto::terminal<c_str_tag>::type, CStr_Helper, boost::msm::sm_domain> 3895 { CStr_Helperboost::msm::front::euml::CStr_Helper3896 CStr_Helper(){} 3897 template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5 3898 #ifdef BOOST_MSVC 3899 ,class Arg6 3900 #endif 3901 > 3902 struct In 3903 { 3904 typedef CStr_<Arg1> type; 3905 }; 3906 }; 3907 CStr_Helper const c_str_; 3908 3909 template <class Container> 3910 struct StringData_ : euml_action<StringData_<Container> > 3911 { 3912 template <class Event,class FSM,class STATE > 3913 struct state_action_result 3914 { 3915 typedef typename ::boost::add_const< 3916 typename get_value_type< 3917 typename ::boost::remove_reference< 3918 typename get_result_type2<Container,Event,FSM,STATE>::type>::type>::type>::type* type; 3919 }; 3920 template <class EVT,class FSM,class SourceState,class TargetState> 3921 struct transition_action_result 3922 { 3923 typedef typename ::boost::add_const< 3924 typename get_value_type< 3925 typename ::boost::remove_reference< 3926 typename get_result_type<Container,EVT,FSM,SourceState,TargetState>::type>::type>::type>::type* type; 3927 }; 3928 typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type; 3929 3930 template <class EVT,class FSM,class SourceState,class TargetState> 3931 typename ::boost::enable_if< 3932 typename ::boost::mpl::has_key< 3933 typename Container::tag_type,action_tag>::type, 3934 typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type operator ()boost::msm::front::euml::StringData_3935 operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const 3936 { 3937 return (Container()(evt,fsm,src,tgt)).data(); 3938 } 3939 template <class Event,class FSM,class STATE> 3940 typename ::boost::enable_if< 3941 typename ::boost::mpl::has_key< 3942 typename Container::tag_type,state_action_tag>::type, 3943 typename state_action_result<Event,FSM,STATE>::type >::type operator ()boost::msm::front::euml::StringData_3944 operator()(Event const& evt,FSM& fsm,STATE& state )const 3945 { 3946 return (Container()(evt,fsm,state)).data(); 3947 } 3948 }; 3949 struct string_data_tag {}; 3950 struct StringData_Helper: proto::extends< proto::terminal<string_data_tag>::type, StringData_Helper, boost::msm::sm_domain> 3951 { StringData_Helperboost::msm::front::euml::StringData_Helper3952 StringData_Helper(){} 3953 template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5 3954 #ifdef BOOST_MSVC 3955 ,class Arg6 3956 #endif 3957 > 3958 struct In 3959 { 3960 typedef StringData_<Arg1> type; 3961 }; 3962 }; 3963 StringData_Helper const string_data_; 3964 3965 template <class Container, class Param1, class Param2, class Param3, class Enable=void > 3966 struct StringCopy_ : euml_action<StringCopy_<Container,Param1,Param2,Param3,Enable> > 3967 { 3968 }; 3969 3970 template <class Container,class Param1, class Param2, class Param3> 3971 struct StringCopy_< 3972 Container,Param1,Param2,Param3, 3973 typename ::boost::enable_if< 3974 typename ::boost::is_same<Param3,void>::type 3975 >::type 3976 > 3977 : euml_action<StringCopy_<Container,Param1,Param2,Param3> > 3978 { 3979 template <class Event,class FSM,class STATE > 3980 struct state_action_result 3981 { 3982 typedef typename get_size_type< 3983 typename ::boost::remove_reference< 3984 typename get_result_type2<Container,Event,FSM,STATE>::type>::type>::type type; 3985 }; 3986 template <class EVT,class FSM,class SourceState,class TargetState> 3987 struct transition_action_result 3988 { 3989 typedef typename get_size_type< 3990 typename ::boost::remove_reference< 3991 typename get_result_type<Container,EVT,FSM,SourceState,TargetState>::type>::type>::type type; 3992 }; 3993 typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type; 3994 3995 template <class EVT,class FSM,class SourceState,class TargetState> 3996 typename transition_action_result<EVT,FSM,SourceState,TargetState>::type operator ()boost::msm::front::euml::StringCopy_3997 operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const 3998 { 3999 return (Container()(evt,fsm,src,tgt)).copy(Param1()(evt,fsm,src,tgt),Param2()(evt,fsm,src,tgt)); 4000 } 4001 template <class Event,class FSM,class STATE> 4002 typename state_action_result<Event,FSM,STATE>::type operator ()boost::msm::front::euml::StringCopy_4003 operator()(Event const& evt,FSM& fsm,STATE& state )const 4004 { 4005 return (Container()(evt,fsm,state)).copy(Param1()(evt,fsm,state),Param2()(evt,fsm,state)); 4006 } 4007 }; 4008 4009 template <class Container,class Param1, class Param2, class Param3> 4010 struct StringCopy_< 4011 Container,Param1,Param2,Param3, 4012 typename ::boost::disable_if< 4013 typename ::boost::is_same<Param3,void>::type 4014 >::type 4015 > 4016 : euml_action<StringCopy_<Container,Param1,Param2,Param3> > 4017 { 4018 template <class Event,class FSM,class STATE > 4019 struct state_action_result 4020 { 4021 typedef typename get_size_type< 4022 typename ::boost::remove_reference< 4023 typename get_result_type2<Container,Event,FSM,STATE>::type>::type>::type type; 4024 }; 4025 template <class EVT,class FSM,class SourceState,class TargetState> 4026 struct transition_action_result 4027 { 4028 typedef typename get_size_type< 4029 typename ::boost::remove_reference< 4030 typename get_result_type<Container,EVT,FSM,SourceState,TargetState>::type>::type>::type type; 4031 }; 4032 typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type; 4033 4034 template <class EVT,class FSM,class SourceState,class TargetState> 4035 typename transition_action_result<EVT,FSM,SourceState,TargetState>::type operator ()boost::msm::front::euml::StringCopy_4036 operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const 4037 { 4038 return (Container()(evt,fsm,src,tgt)). 4039 copy(Param1()(evt,fsm,src,tgt),Param2()(evt,fsm,src,tgt),Param3()(evt,fsm,src,tgt)); 4040 } 4041 template <class Event,class FSM,class STATE> 4042 typename state_action_result<Event,FSM,STATE>::type operator ()boost::msm::front::euml::StringCopy_4043 operator()(Event const& evt,FSM& fsm,STATE& state )const 4044 { 4045 return (Container()(evt,fsm,state)). 4046 copy(Param1()(evt,fsm,state),Param2()(evt,fsm,state),Param3()(evt,fsm,state)); 4047 } 4048 }; 4049 4050 struct string_copy_tag {}; 4051 struct StringCopy_Helper: proto::extends< proto::terminal<string_copy_tag>::type, StringCopy_Helper, boost::msm::sm_domain> 4052 { StringCopy_Helperboost::msm::front::euml::StringCopy_Helper4053 StringCopy_Helper(){} 4054 template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5 4055 #ifdef BOOST_MSVC 4056 ,class Arg6 4057 #endif 4058 > 4059 struct In 4060 { 4061 typedef StringCopy_<Arg1,Arg2,Arg3,Arg4> type; 4062 }; 4063 }; 4064 StringCopy_Helper const string_copy_; 4065 4066 }}}} 4067 4068 #endif //BOOST_MSM_FRONT_EUML_CONTAINER_H 4069