Mercurial > hg > vamp-build-and-test
comparison DEPENDENCIES/generic/include/boost/msm/front/euml/common.hpp @ 101:c530137014c0
Update Boost headers (1.58.0)
author | Chris Cannam |
---|---|
date | Mon, 07 Sep 2015 11:12:49 +0100 |
parents | 2665513ce2d3 |
children |
comparison
equal
deleted
inserted
replaced
100:793467b5e61c | 101:c530137014c0 |
---|---|
949 { | 949 { |
950 return fsm.get_attribute(Index()); | 950 return fsm.get_attribute(Index()); |
951 } | 951 } |
952 template <class EVT,class FSM,class SourceState,class TargetState> | 952 template <class EVT,class FSM,class SourceState,class TargetState> |
953 typename transition_action_result<EVT,FSM,SourceState,TargetState>::type | 953 typename transition_action_result<EVT,FSM,SourceState,TargetState>::type |
954 operator()(EVT const& evt ,FSM& fsm,SourceState& ,TargetState&)const | 954 operator()(EVT const& ,FSM& fsm,SourceState& ,TargetState&)const |
955 { | 955 { |
956 return fsm.get_attribute(Index()); | 956 return fsm.get_attribute(Index()); |
957 } | 957 } |
958 }; | 958 }; |
959 | 959 |
2453 #define RESULT_TYPE2_GET_SIZE_TYPE_REMOVE_REF_PARAM1 typename get_size_type<typename ::boost::remove_reference<typename get_result_type2<Param1,Event,FSM,STATE>::type>::type>::type | 2453 #define RESULT_TYPE2_GET_SIZE_TYPE_REMOVE_REF_PARAM1 typename get_size_type<typename ::boost::remove_reference<typename get_result_type2<Param1,Event,FSM,STATE>::type>::type>::type |
2454 #define RESULT_TYPE_GET_SIZE_TYPE_REMOVE_REF_PARAM1 typename get_size_type<typename ::boost::remove_reference<typename get_result_type<Param1,EVT,FSM,SourceState,TargetState>::type>::type>::type | 2454 #define RESULT_TYPE_GET_SIZE_TYPE_REMOVE_REF_PARAM1 typename get_size_type<typename ::boost::remove_reference<typename get_result_type<Param1,EVT,FSM,SourceState,TargetState>::type>::type>::type |
2455 | 2455 |
2456 #define BOOST_MSM_EUML_ACTION(instance_name) \ | 2456 #define BOOST_MSM_EUML_ACTION(instance_name) \ |
2457 struct instance_name ## _impl; \ | 2457 struct instance_name ## _impl; \ |
2458 struct instance_name ## _helper : msm::front::euml::euml_action<instance_name ## _impl> \ | 2458 struct instance_name ## _helper : boost::msm::front::euml::euml_action<instance_name ## _impl> \ |
2459 { \ | 2459 { \ |
2460 instance_name ## _helper(){} \ | 2460 instance_name ## _helper(){} \ |
2461 typedef instance_name ## _impl action_name; \ | 2461 typedef instance_name ## _impl action_name; \ |
2462 }; \ | 2462 }; \ |
2463 static instance_name ## _helper instance_name; \ | 2463 static instance_name ## _helper instance_name; \ |
2464 struct instance_name ## _impl : instance_name ## _helper | 2464 struct instance_name ## _impl : instance_name ## _helper |
2465 | 2465 |
2466 #define BOOST_MSM_EUML_DECLARE_ACTION(instance_name) \ | 2466 #define BOOST_MSM_EUML_DECLARE_ACTION(instance_name) \ |
2467 struct instance_name ; \ | 2467 struct instance_name ; \ |
2468 struct instance_name ## _helper : msm::front::euml::euml_action<instance_name > \ | 2468 struct instance_name ## _helper : boost::msm::front::euml::euml_action<instance_name > \ |
2469 { \ | 2469 { \ |
2470 instance_name ## _helper(){} \ | 2470 instance_name ## _helper(){} \ |
2471 typedef instance_name action_name; \ | 2471 typedef instance_name action_name; \ |
2472 }; \ | 2472 }; \ |
2473 struct instance_name : instance_name ## _helper | 2473 struct instance_name : instance_name ## _helper |
2474 | 2474 |
2475 | 2475 |
2476 #define BOOST_MSM_EUML_EVENT(instance_name) \ | 2476 #define BOOST_MSM_EUML_EVENT(instance_name) \ |
2477 struct instance_name ## _helper : msm::front::euml::euml_event<instance_name ## _helper>{ \ | 2477 struct instance_name ## _helper : boost::msm::front::euml::euml_event<instance_name ## _helper>{ \ |
2478 instance_name ## _helper(){} \ | 2478 instance_name ## _helper(){} \ |
2479 instance_name ## _helper const& operator()() const {return *this;} }; \ | 2479 instance_name ## _helper const& operator()() const {return *this;} }; \ |
2480 static instance_name ## _helper instance_name; | 2480 static instance_name ## _helper instance_name; |
2481 | 2481 |
2482 // an event matching any event | 2482 // an event matching any event |
2483 struct kleene_ : msm::front::euml::euml_event<kleene_>, public boost::any | 2483 struct kleene_ : boost::msm::front::euml::euml_event<kleene_>, public boost::any |
2484 { | 2484 { |
2485 kleene_() : boost::any(){} | 2485 kleene_() : boost::any(){} |
2486 template<typename ValueType> | 2486 template<typename ValueType> |
2487 kleene_(const ValueType & v) : boost::any(v){} | 2487 kleene_(const ValueType & v) : boost::any(v){} |
2488 }; | 2488 }; |
2489 static kleene_ kleene; | 2489 static kleene_ kleene; |
2490 | 2490 |
2491 #define BOOST_MSM_EUML_DECLARE_EVENT(instance_name) \ | 2491 #define BOOST_MSM_EUML_DECLARE_EVENT(instance_name) \ |
2492 struct instance_name : msm::front::euml::euml_event<instance_name >{ \ | 2492 struct instance_name : boost::msm::front::euml::euml_event<instance_name >{ \ |
2493 instance_name(){} \ | 2493 instance_name(){} \ |
2494 instance_name const& operator()() const {return *this;} }; | 2494 instance_name const& operator()() const {return *this;} }; |
2495 | 2495 |
2496 #define MSM_EUML_CONCAT(param1,param2) param1 | 2496 #define MSM_EUML_CONCAT(param1,param2) param1 |
2497 #define MSM_EUML_EVENT_INSTANCE_HELPER_EXECUTE1(z, n, unused) ARG ## n arg ## n | 2497 #define MSM_EUML_EVENT_INSTANCE_HELPER_EXECUTE1(z, n, unused) ARG ## n arg ## n |
2525 #define MSM_EUML_EVENT_INSTANCE_HELPER_OPERATOR_IMPL(z, n, instance) \ | 2525 #define MSM_EUML_EVENT_INSTANCE_HELPER_OPERATOR_IMPL(z, n, instance) \ |
2526 template <BOOST_PP_ENUM_PARAMS(n, class ARG)> \ | 2526 template <BOOST_PP_ENUM_PARAMS(n, class ARG)> \ |
2527 BOOST_PP_CAT(instance,_helper) operator() \ | 2527 BOOST_PP_CAT(instance,_helper) operator() \ |
2528 (BOOST_PP_ENUM(n, MSM_EUML_EVENT_INSTANCE_HELPER_EXECUTE1, ~ ))const{ \ | 2528 (BOOST_PP_ENUM(n, MSM_EUML_EVENT_INSTANCE_HELPER_EXECUTE1, ~ ))const{ \ |
2529 return BOOST_PP_CAT(instance,_helper) (BOOST_PP_ENUM(n, MSM_EUML_EVENT_INSTANCE_HELPER_EXECUTE2, ~ ));} | 2529 return BOOST_PP_CAT(instance,_helper) (BOOST_PP_ENUM(n, MSM_EUML_EVENT_INSTANCE_HELPER_EXECUTE2, ~ ));} |
2530 | 2530 |
2531 #define BOOST_MSM_EUML_EVENT_WITH_ATTRIBUTES(instance_name, attributes_name) \ | 2531 #if defined(FUSION_MAX_MAP_SIZE) |
2532 | |
2533 #define BOOST_MSM_EUML_EVENT_WITH_ATTRIBUTES(instance_name, attributes_name) \ | |
2532 struct instance_name ## _helper : \ | 2534 struct instance_name ## _helper : \ |
2533 msm::front::euml::euml_event<instance_name ## _helper> , public attributes_name \ | 2535 boost::msm::front::euml::euml_event<instance_name ## _helper> , public attributes_name \ |
2534 { \ | 2536 { \ |
2535 template <class T,int checked_size> struct size_helper \ | 2537 template <class T,int checked_size> struct size_helper \ |
2536 { \ | 2538 { \ |
2537 typedef typename ::boost::mpl::less_equal< \ | 2539 typedef typename ::boost::mpl::less_equal< \ |
2538 typename ::boost::fusion::result_of::size<T>::type, \ | 2540 typename ::boost::fusion::result_of::size<T>::type, \ |
2550 BOOST_PP_REPEAT_FROM_TO(1,BOOST_PP_ADD(FUSION_MAX_MAP_SIZE ,1), \ | 2552 BOOST_PP_REPEAT_FROM_TO(1,BOOST_PP_ADD(FUSION_MAX_MAP_SIZE ,1), \ |
2551 MSM_EUML_EVENT_INSTANCE_HELPER_OPERATOR_IMPL, instance_name) \ | 2553 MSM_EUML_EVENT_INSTANCE_HELPER_OPERATOR_IMPL, instance_name) \ |
2552 }; \ | 2554 }; \ |
2553 static instance_name ## _helper instance_name; | 2555 static instance_name ## _helper instance_name; |
2554 | 2556 |
2557 #else | |
2558 | |
2559 #define BOOST_MSM_EUML_EVENT_WITH_ATTRIBUTES(instance_name, attributes_name) \ | |
2560 struct instance_name ## _helper : \ | |
2561 boost::msm::front::euml::euml_event<instance_name ## _helper> , public attributes_name \ | |
2562 { \ | |
2563 template <class T,int checked_size> struct size_helper \ | |
2564 { \ | |
2565 typedef typename ::boost::mpl::less_equal< \ | |
2566 typename ::boost::fusion::result_of::size<T>::type, \ | |
2567 ::boost::mpl::int_<checked_size> >::type type; \ | |
2568 }; \ | |
2569 BOOST_PP_CAT(instance_name,_helper()) : attributes_name(){} \ | |
2570 typedef attributes_name::attributes_type attribute_map; \ | |
2571 typedef ::boost::fusion::result_of::as_vector<attribute_map>::type attribute_vec; \ | |
2572 BOOST_PP_REPEAT_FROM_TO(1,BOOST_PP_ADD(10 ,1), \ | |
2573 MSM_EUML_EVENT_HELPER_CONSTRUCTORS, (instance_name,attributes_name)) \ | |
2574 BOOST_PP_REPEAT_FROM_TO(1,BOOST_PP_ADD(10 ,1), \ | |
2575 MSM_EUML_EVENT_INSTANCE_HELPER_ATTRIBUTE_MAP, ~) \ | |
2576 BOOST_PP_CAT(instance_name,_helper) operator()(){ \ | |
2577 return BOOST_PP_CAT(instance_name,_helper)();} \ | |
2578 BOOST_PP_REPEAT_FROM_TO(1,BOOST_PP_ADD(10 ,1), \ | |
2579 MSM_EUML_EVENT_INSTANCE_HELPER_OPERATOR_IMPL, instance_name) \ | |
2580 }; \ | |
2581 static instance_name ## _helper instance_name; | |
2582 | |
2583 #endif | |
2584 | |
2555 #define BOOST_MSM_EUML_EVENT_NAME(instance_name) instance_name ## _helper | 2585 #define BOOST_MSM_EUML_EVENT_NAME(instance_name) instance_name ## _helper |
2556 | 2586 |
2557 #define BOOST_MSM_EUML_FLAG_NAME(instance_name) instance_name ## _helper | 2587 #define BOOST_MSM_EUML_FLAG_NAME(instance_name) instance_name ## _helper |
2558 | 2588 |
2559 #define BOOST_MSM_EUML_FLAG(instance_name) \ | 2589 #define BOOST_MSM_EUML_FLAG(instance_name) \ |
2560 struct instance_name ## _helper : msm::front::euml::euml_flag<instance_name ## _helper>{}; \ | 2590 struct instance_name ## _helper : boost::msm::front::euml::euml_flag<instance_name ## _helper>{}; \ |
2561 static instance_name ## _helper instance_name; | 2591 static instance_name ## _helper instance_name; |
2562 | 2592 |
2563 #define BOOST_MSM_EUML_DECLARE_FLAG(instance_name) \ | 2593 #define BOOST_MSM_EUML_DECLARE_FLAG(instance_name) \ |
2564 struct instance_name : msm::front::euml::euml_flag<instance_name >{}; | 2594 struct instance_name : boost::msm::front::euml::euml_flag<instance_name >{}; |
2565 | 2595 |
2566 #define BOOST_MSM_EUML_STATE_NAME(instance_name) instance_name ## _helper | 2596 #define BOOST_MSM_EUML_STATE_NAME(instance_name) instance_name ## _helper |
2567 | 2597 |
2568 #define BOOST_MSM_EUML_BUILD_STT_HELPER build_stt( | 2598 #define BOOST_MSM_EUML_BUILD_STT_HELPER build_stt( |
2569 #define BOOST_MSM_EUML_BUILD_INTERNAL_STT_HELPER build_internal_stt( | 2599 #define BOOST_MSM_EUML_BUILD_INTERNAL_STT_HELPER build_internal_stt( |