annotate DEPENDENCIES/generic/include/boost/msm/front/euml/container.hpp @ 125:34e428693f5d vext

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