Added boost header
This commit is contained in:
19
test/external/boost/msm/front/euml/algorithm.hpp
vendored
Normal file
19
test/external/boost/msm/front/euml/algorithm.hpp
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
// Copyright 2008 Christophe Henry
|
||||
// henry UNDERSCORE christophe AT hotmail DOT com
|
||||
// This is an extended version of the state machine available in the boost::mpl library
|
||||
// Distributed under the same license as the original.
|
||||
// Copyright for the original version:
|
||||
// Copyright 2005 David Abrahams and Aleksey Gurtovoy. Distributed
|
||||
// under the Boost Software License, Version 1.0. (See accompanying
|
||||
// file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#ifndef BOOST_MSM_FRONT_EUML_ALGORITHM_H
|
||||
#define BOOST_MSM_FRONT_EUML_ALGORITHM_H
|
||||
|
||||
#include <boost/msm/front/euml/iteration.hpp>
|
||||
#include <boost/msm/front/euml/querying.hpp>
|
||||
#include <boost/msm/front/euml/transformation.hpp>
|
||||
|
||||
|
||||
#endif //BOOST_MSM_FRONT_EUML_ALGORITHM_H
|
||||
2701
test/external/boost/msm/front/euml/common.hpp
vendored
Normal file
2701
test/external/boost/msm/front/euml/common.hpp
vendored
Normal file
File diff suppressed because it is too large
Load Diff
4068
test/external/boost/msm/front/euml/container.hpp
vendored
Normal file
4068
test/external/boost/msm/front/euml/container.hpp
vendored
Normal file
File diff suppressed because it is too large
Load Diff
23
test/external/boost/msm/front/euml/euml.hpp
vendored
Normal file
23
test/external/boost/msm/front/euml/euml.hpp
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
// Copyright 2008 Christophe Henry
|
||||
// henry UNDERSCORE christophe AT hotmail DOT com
|
||||
// This is an extended version of the state machine available in the boost::mpl library
|
||||
// Distributed under the same license as the original.
|
||||
// Copyright for the original version:
|
||||
// Copyright 2005 David Abrahams and Aleksey Gurtovoy. Distributed
|
||||
// under the Boost Software License, Version 1.0. (See accompanying
|
||||
// file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#ifndef BOOST_MSM_FRONT_EUML_EUML_H
|
||||
#define BOOST_MSM_FRONT_EUML_EUML_H
|
||||
|
||||
#include <boost/msm/front/euml/common.hpp>
|
||||
#include <boost/msm/front/euml/operator.hpp>
|
||||
#include <boost/msm/front/euml/guard_grammar.hpp>
|
||||
#include <boost/msm/front/euml/state_grammar.hpp>
|
||||
#include <boost/msm/front/euml/stt_grammar.hpp>
|
||||
#ifdef BOOST_MSM_EUML_PHOENIX_SUPPORT
|
||||
#include <boost/msm/front/euml/phoenix_placeholders.hpp>
|
||||
#endif
|
||||
|
||||
#endif //BOOST_MSM_FRONT_EUML_EUML_H
|
||||
121
test/external/boost/msm/front/euml/euml_typeof.hpp
vendored
Normal file
121
test/external/boost/msm/front/euml/euml_typeof.hpp
vendored
Normal file
@@ -0,0 +1,121 @@
|
||||
// Copyright 2008 Christophe Henry
|
||||
// henry UNDERSCORE christophe AT hotmail DOT com
|
||||
// This is an extended version of the state machine available in the boost::mpl library
|
||||
// Distributed under the same license as the original.
|
||||
// Copyright for the original version:
|
||||
// Copyright 2005 David Abrahams and Aleksey Gurtovoy. Distributed
|
||||
// under the Boost Software License, Version 1.0. (See accompanying
|
||||
// file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#ifndef BOOST_MSM_FRONT_EUML_TYPEOF_H
|
||||
#define BOOST_MSM_FRONT_EUML_TYPEOF_H
|
||||
|
||||
#include <boost/typeof/typeof.hpp>
|
||||
|
||||
|
||||
#include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP()
|
||||
|
||||
BOOST_TYPEOF_REGISTER_TEMPLATE(::boost::mpl::vector0, 1)
|
||||
BOOST_TYPEOF_REGISTER_TEMPLATE(::boost::mpl::vector50, 50)
|
||||
BOOST_TYPEOF_REGISTER_TYPE(::boost::mpl::na)
|
||||
BOOST_TYPEOF_REGISTER_TEMPLATE(::boost::fusion::vector, 10)
|
||||
BOOST_TYPEOF_REGISTER_TYPE(::boost::fusion::void_)
|
||||
BOOST_TYPEOF_REGISTER_TEMPLATE(::boost::mpl::vector, 20)
|
||||
BOOST_TYPEOF_REGISTER_TYPE(std::string)
|
||||
BOOST_TYPEOF_REGISTER_TEMPLATE(::boost::mpl::size_t, (unsigned int))
|
||||
|
||||
BOOST_TYPEOF_REGISTER_TYPE(::boost::msm::front::default_base_state)
|
||||
BOOST_TYPEOF_REGISTER_TEMPLATE(boost::msm::front::detail::inherit_attributes, 1)
|
||||
|
||||
BOOST_TYPEOF_REGISTER_TEMPLATE(boost::msm::front::euml::func_state, 6)
|
||||
BOOST_TYPEOF_REGISTER_TEMPLATE(boost::msm::front::euml::entry_func_state, (int)(typename)(typename)(typename)(typename)(typename)(typename))
|
||||
BOOST_TYPEOF_REGISTER_TEMPLATE(boost::msm::front::euml::explicit_entry_func_state, (int)(typename)(typename)(typename)(typename)(typename)(typename))
|
||||
BOOST_TYPEOF_REGISTER_TEMPLATE(boost::msm::front::euml::exit_func_state, 7)
|
||||
|
||||
BOOST_TYPEOF_REGISTER_TEMPLATE(boost::msm::front::euml::define_flag, 1)
|
||||
BOOST_TYPEOF_REGISTER_TEMPLATE(boost::msm::front::euml::attribute, 1)
|
||||
BOOST_TYPEOF_REGISTER_TEMPLATE(boost::msm::front::euml::define_defer, 1)
|
||||
BOOST_TYPEOF_REGISTER_TEMPLATE(boost::msm::front::euml::define_init, 1)
|
||||
BOOST_TYPEOF_REGISTER_TEMPLATE(boost::msm::front::euml::Source_, (int))
|
||||
BOOST_TYPEOF_REGISTER_TEMPLATE(boost::msm::front::euml::Target_, (int))
|
||||
BOOST_TYPEOF_REGISTER_TEMPLATE(boost::msm::front::euml::Current_, (int))
|
||||
BOOST_TYPEOF_REGISTER_TEMPLATE(boost::msm::front::euml::Event_, (int))
|
||||
BOOST_TYPEOF_REGISTER_TEMPLATE(boost::msm::front::euml::State_Attribute_, (typename)(int))
|
||||
BOOST_TYPEOF_REGISTER_TEMPLATE(boost::msm::front::euml::State_Machine_, (int))
|
||||
BOOST_TYPEOF_REGISTER_TYPE(boost::msm::front::none)
|
||||
BOOST_TYPEOF_REGISTER_TEMPLATE(boost::msm::front::Row, 5)
|
||||
BOOST_TYPEOF_REGISTER_TEMPLATE(boost::msm::front::ActionSequence_, 1)
|
||||
|
||||
BOOST_TYPEOF_REGISTER_TYPE(boost::msm::front::euml::NoAction)
|
||||
BOOST_TYPEOF_REGISTER_TEMPLATE(boost::msm::front::euml::And_, 2)
|
||||
BOOST_TYPEOF_REGISTER_TEMPLATE(boost::msm::front::euml::Or_, 2)
|
||||
BOOST_TYPEOF_REGISTER_TEMPLATE(boost::msm::front::euml::Not_, 1)
|
||||
BOOST_TYPEOF_REGISTER_TEMPLATE(boost::msm::front::euml::If_Else_, 3)
|
||||
BOOST_TYPEOF_REGISTER_TYPE(boost::msm::front::euml::If)
|
||||
BOOST_TYPEOF_REGISTER_TEMPLATE(boost::msm::front::euml::If_Then_, 2)
|
||||
BOOST_TYPEOF_REGISTER_TYPE(boost::msm::front::euml::If_Then)
|
||||
BOOST_TYPEOF_REGISTER_TEMPLATE(boost::msm::front::euml::While_Do_, 2)
|
||||
BOOST_TYPEOF_REGISTER_TYPE(boost::msm::front::euml::While_)
|
||||
BOOST_TYPEOF_REGISTER_TEMPLATE(boost::msm::front::euml::Do_While_, 2)
|
||||
BOOST_TYPEOF_REGISTER_TYPE(boost::msm::front::euml::Do_While_)
|
||||
BOOST_TYPEOF_REGISTER_TEMPLATE(boost::msm::front::euml::For_Loop_, 4)
|
||||
BOOST_TYPEOF_REGISTER_TYPE(boost::msm::front::euml::For_Loop_)
|
||||
BOOST_TYPEOF_REGISTER_TEMPLATE(boost::msm::front::euml::Process_, 1)
|
||||
BOOST_TYPEOF_REGISTER_TYPE(boost::msm::front::euml::Process_)
|
||||
BOOST_TYPEOF_REGISTER_TEMPLATE(boost::msm::front::euml::Process2_, 2)
|
||||
BOOST_TYPEOF_REGISTER_TYPE(boost::msm::front::euml::Process2_)
|
||||
BOOST_TYPEOF_REGISTER_TEMPLATE(boost::msm::front::euml::Get_Flag_, 1)
|
||||
BOOST_TYPEOF_REGISTER_TYPE(boost::msm::front::euml::Get_Flag_)
|
||||
BOOST_TYPEOF_REGISTER_TEMPLATE(boost::msm::front::euml::Begin_, 1)
|
||||
BOOST_TYPEOF_REGISTER_TYPE(boost::msm::front::euml::Begin_Helper)
|
||||
BOOST_TYPEOF_REGISTER_TEMPLATE(boost::msm::front::euml::End_, 1)
|
||||
BOOST_TYPEOF_REGISTER_TYPE(boost::msm::front::euml::End_Helper)
|
||||
BOOST_TYPEOF_REGISTER_TEMPLATE(boost::msm::front::euml::Deref_, 1)
|
||||
BOOST_TYPEOF_REGISTER_TYPE(boost::msm::front::euml::Deref_Helper)
|
||||
BOOST_TYPEOF_REGISTER_TEMPLATE(boost::msm::front::euml::Push_Back_, 2)
|
||||
BOOST_TYPEOF_REGISTER_TYPE(boost::msm::front::euml::Push_Back_Helper)
|
||||
BOOST_TYPEOF_REGISTER_TEMPLATE(boost::msm::front::euml::Clear_, 1)
|
||||
BOOST_TYPEOF_REGISTER_TYPE(boost::msm::front::euml::Clear_Helper)
|
||||
BOOST_TYPEOF_REGISTER_TEMPLATE(boost::msm::front::euml::Empty_, 1)
|
||||
BOOST_TYPEOF_REGISTER_TYPE(boost::msm::front::euml::Empty_Helper)
|
||||
BOOST_TYPEOF_REGISTER_TEMPLATE(boost::msm::front::euml::Find_, 2)
|
||||
BOOST_TYPEOF_REGISTER_TYPE(boost::msm::front::euml::Find_Helper)
|
||||
BOOST_TYPEOF_REGISTER_TEMPLATE(boost::msm::front::euml::Npos_, 1)
|
||||
BOOST_TYPEOF_REGISTER_TYPE(boost::msm::front::euml::False_)
|
||||
BOOST_TYPEOF_REGISTER_TYPE(boost::msm::front::euml::True_)
|
||||
BOOST_TYPEOF_REGISTER_TEMPLATE(boost::msm::front::euml::Int_, (int))
|
||||
BOOST_TYPEOF_REGISTER_TYPE(boost::msm::front::euml::Int)
|
||||
BOOST_TYPEOF_REGISTER_TEMPLATE(boost::msm::front::euml::Pre_inc_, 1)
|
||||
BOOST_TYPEOF_REGISTER_TEMPLATE(boost::msm::front::euml::Pre_dec_, 1)
|
||||
BOOST_TYPEOF_REGISTER_TEMPLATE(boost::msm::front::euml::Post_inc_, 1)
|
||||
BOOST_TYPEOF_REGISTER_TEMPLATE(boost::msm::front::euml::Post_dec_, 1)
|
||||
BOOST_TYPEOF_REGISTER_TEMPLATE(boost::msm::front::euml::Plus_, 2)
|
||||
BOOST_TYPEOF_REGISTER_TEMPLATE(boost::msm::front::euml::Minus_, 2)
|
||||
BOOST_TYPEOF_REGISTER_TEMPLATE(boost::msm::front::euml::Multiplies_, 2)
|
||||
BOOST_TYPEOF_REGISTER_TEMPLATE(boost::msm::front::euml::Divides_, 2)
|
||||
BOOST_TYPEOF_REGISTER_TEMPLATE(boost::msm::front::euml::Modulus_, 2)
|
||||
BOOST_TYPEOF_REGISTER_TEMPLATE(boost::msm::front::euml::Bitwise_And_, 2)
|
||||
BOOST_TYPEOF_REGISTER_TEMPLATE(boost::msm::front::euml::Bitwise_Or_, 2)
|
||||
BOOST_TYPEOF_REGISTER_TEMPLATE(boost::msm::front::euml::Bitwise_Xor_, 2)
|
||||
BOOST_TYPEOF_REGISTER_TEMPLATE(boost::msm::front::euml::Subscript_, 2)
|
||||
BOOST_TYPEOF_REGISTER_TEMPLATE(boost::msm::front::euml::Plus_Assign_, 2)
|
||||
BOOST_TYPEOF_REGISTER_TEMPLATE(boost::msm::front::euml::Minus_Assign_, 2)
|
||||
BOOST_TYPEOF_REGISTER_TEMPLATE(boost::msm::front::euml::Multiplies_Assign_, 2)
|
||||
BOOST_TYPEOF_REGISTER_TEMPLATE(boost::msm::front::euml::Divides_Assign_, 2)
|
||||
BOOST_TYPEOF_REGISTER_TEMPLATE(boost::msm::front::euml::Modulus_Assign_, 2)
|
||||
BOOST_TYPEOF_REGISTER_TEMPLATE(boost::msm::front::euml::ShiftLeft_Assign_, 2)
|
||||
BOOST_TYPEOF_REGISTER_TEMPLATE(boost::msm::front::euml::ShiftRight_Assign_, 2)
|
||||
BOOST_TYPEOF_REGISTER_TEMPLATE(boost::msm::front::euml::ShiftLeft_, 2)
|
||||
BOOST_TYPEOF_REGISTER_TEMPLATE(boost::msm::front::euml::ShiftRight_, 2)
|
||||
BOOST_TYPEOF_REGISTER_TEMPLATE(boost::msm::front::euml::Assign_, 2)
|
||||
BOOST_TYPEOF_REGISTER_TEMPLATE(boost::msm::front::euml::Unary_Plus_, 1)
|
||||
BOOST_TYPEOF_REGISTER_TEMPLATE(boost::msm::front::euml::Unary_Minus_, 1)
|
||||
BOOST_TYPEOF_REGISTER_TEMPLATE(boost::msm::front::euml::Less_, 2)
|
||||
BOOST_TYPEOF_REGISTER_TEMPLATE(boost::msm::front::euml::LessEqual_, 2)
|
||||
BOOST_TYPEOF_REGISTER_TEMPLATE(boost::msm::front::euml::Greater_, 2)
|
||||
BOOST_TYPEOF_REGISTER_TEMPLATE(boost::msm::front::euml::GreaterEqual_, 2)
|
||||
BOOST_TYPEOF_REGISTER_TEMPLATE(boost::msm::front::euml::EqualTo_, 2)
|
||||
BOOST_TYPEOF_REGISTER_TEMPLATE(boost::msm::front::euml::NotEqualTo_, 2)
|
||||
|
||||
#endif //BOOST_MSM_FRONT_EUML_TYPEOF_H
|
||||
356
test/external/boost/msm/front/euml/guard_grammar.hpp
vendored
Normal file
356
test/external/boost/msm/front/euml/guard_grammar.hpp
vendored
Normal file
@@ -0,0 +1,356 @@
|
||||
// Copyright 2008 Christophe Henry
|
||||
// henry UNDERSCORE christophe AT hotmail DOT com
|
||||
// This is an extended version of the state machine available in the boost::mpl library
|
||||
// Distributed under the same license as the original.
|
||||
// Copyright for the original version:
|
||||
// Copyright 2005 David Abrahams and Aleksey Gurtovoy. Distributed
|
||||
// under the Boost Software License, Version 1.0. (See accompanying
|
||||
// file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#ifndef BOOST_MSM_FRONT_EUML_GUARD_GRAMMAR_H
|
||||
#define BOOST_MSM_FRONT_EUML_GUARD_GRAMMAR_H
|
||||
|
||||
#include <boost/msm/front/euml/common.hpp>
|
||||
#include <boost/msm/front/euml/operator.hpp>
|
||||
#include <boost/msm/front/euml/state_grammar.hpp>
|
||||
|
||||
namespace boost { namespace msm { namespace front { namespace euml
|
||||
{
|
||||
struct BuildGuards;
|
||||
struct BuildActions;
|
||||
|
||||
struct BuildGuardsCases
|
||||
{
|
||||
// The primary template matches nothing:
|
||||
template<typename Tag>
|
||||
struct case_
|
||||
: proto::not_<proto::_>
|
||||
{};
|
||||
};
|
||||
template<>
|
||||
struct BuildGuardsCases::case_<proto::tag::logical_or>
|
||||
: proto::when<
|
||||
proto::logical_or<BuildGuards,BuildGuards >,
|
||||
Or_<BuildGuards(proto::_left),BuildGuards(proto::_right)>()
|
||||
>
|
||||
{};
|
||||
template<>
|
||||
struct BuildGuardsCases::case_<proto::tag::logical_and>
|
||||
: proto::when<
|
||||
proto::logical_and<BuildGuards,BuildGuards >,
|
||||
And_<BuildGuards(proto::_left),BuildGuards(proto::_right)>()
|
||||
>
|
||||
{};
|
||||
template<>
|
||||
struct BuildGuardsCases::case_<proto::tag::logical_not>
|
||||
: proto::when<
|
||||
proto::logical_not<BuildGuards >,
|
||||
Not_<BuildGuards(proto::_child)>()
|
||||
>
|
||||
{};
|
||||
template<>
|
||||
struct BuildGuardsCases::case_<proto::tag::less>
|
||||
: proto::when<
|
||||
proto::less<BuildGuards, BuildGuards >,
|
||||
Less_<BuildGuards(proto::_left),BuildGuards(proto::_right)>()
|
||||
>
|
||||
{};
|
||||
template<>
|
||||
struct BuildGuardsCases::case_<proto::tag::less_equal>
|
||||
: proto::when<
|
||||
proto::less_equal<BuildGuards, BuildGuards >,
|
||||
LessEqual_<BuildGuards(proto::_left),BuildGuards(proto::_right)>()
|
||||
>
|
||||
{};
|
||||
template<>
|
||||
struct BuildGuardsCases::case_<proto::tag::greater>
|
||||
: proto::when<
|
||||
proto::greater<BuildGuards, BuildGuards >,
|
||||
Greater_<BuildGuards(proto::_left),BuildGuards(proto::_right)>()
|
||||
>
|
||||
{};
|
||||
template<>
|
||||
struct BuildGuardsCases::case_<proto::tag::greater_equal>
|
||||
: proto::when<
|
||||
proto::greater_equal<BuildGuards, BuildGuards >,
|
||||
GreaterEqual_<BuildGuards(proto::_left),BuildGuards(proto::_right)>()
|
||||
>
|
||||
{};
|
||||
template<>
|
||||
struct BuildGuardsCases::case_<proto::tag::equal_to>
|
||||
: proto::when<
|
||||
proto::equal_to<BuildGuards, BuildGuards >,
|
||||
EqualTo_<BuildGuards(proto::_left),BuildGuards(proto::_right)>()
|
||||
>
|
||||
{};
|
||||
template<>
|
||||
struct BuildGuardsCases::case_<proto::tag::not_equal_to>
|
||||
: proto::when<
|
||||
proto::not_equal_to<BuildGuards, BuildGuards >,
|
||||
NotEqualTo_<BuildGuards(proto::_left),BuildGuards(proto::_right)>()
|
||||
>
|
||||
{};
|
||||
template<>
|
||||
struct BuildGuardsCases::case_<proto::tag::pre_inc>
|
||||
: proto::when<
|
||||
proto::pre_inc<BuildGuards >,
|
||||
Pre_inc_<BuildGuards(proto::_child)>()
|
||||
>
|
||||
{};
|
||||
template<>
|
||||
struct BuildGuardsCases::case_<proto::tag::dereference>
|
||||
: proto::when<
|
||||
proto::dereference<BuildGuards >,
|
||||
Deref_<BuildGuards(proto::_child)>()
|
||||
>
|
||||
{};
|
||||
template<>
|
||||
struct BuildGuardsCases::case_<proto::tag::pre_dec>
|
||||
: proto::when<
|
||||
proto::pre_dec<BuildGuards >,
|
||||
Pre_dec_<BuildGuards(proto::_child)>()
|
||||
>
|
||||
{};
|
||||
template<>
|
||||
struct BuildGuardsCases::case_<proto::tag::post_inc>
|
||||
: proto::when<
|
||||
proto::post_inc<BuildGuards >,
|
||||
Post_inc_<BuildGuards(proto::_child)>()
|
||||
>
|
||||
{};
|
||||
template<>
|
||||
struct BuildGuardsCases::case_<proto::tag::post_dec>
|
||||
: proto::when<
|
||||
proto::post_dec<BuildGuards >,
|
||||
Post_dec_<BuildGuards(proto::_child)>()
|
||||
>
|
||||
{};
|
||||
template<>
|
||||
struct BuildGuardsCases::case_<proto::tag::plus>
|
||||
: proto::when<
|
||||
proto::plus<BuildGuards,BuildGuards >,
|
||||
Plus_<BuildGuards(proto::_left),BuildGuards(proto::_right)>()
|
||||
>
|
||||
{};
|
||||
template<>
|
||||
struct BuildGuardsCases::case_<proto::tag::minus>
|
||||
: proto::when<
|
||||
proto::minus<BuildGuards,BuildGuards >,
|
||||
Minus_<BuildGuards(proto::_left),BuildGuards(proto::_right)>()
|
||||
>
|
||||
{};
|
||||
template<>
|
||||
struct BuildGuardsCases::case_<proto::tag::multiplies>
|
||||
: proto::when<
|
||||
proto::multiplies<BuildGuards,BuildGuards >,
|
||||
Multiplies_<BuildGuards(proto::_left),BuildGuards(proto::_right)>()
|
||||
>
|
||||
{};
|
||||
template<>
|
||||
struct BuildGuardsCases::case_<proto::tag::divides>
|
||||
: proto::when<
|
||||
proto::divides<BuildGuards,BuildGuards >,
|
||||
Divides_<BuildGuards(proto::_left),BuildGuards(proto::_right)>()
|
||||
>
|
||||
{};
|
||||
template<>
|
||||
struct BuildGuardsCases::case_<proto::tag::modulus>
|
||||
: proto::when<
|
||||
proto::modulus<BuildGuards,BuildGuards >,
|
||||
Modulus_<BuildGuards(proto::_left),BuildGuards(proto::_right)>()
|
||||
>
|
||||
{};
|
||||
template<>
|
||||
struct BuildGuardsCases::case_<proto::tag::bitwise_and>
|
||||
: proto::when<
|
||||
proto::bitwise_and<BuildGuards,BuildGuards >,
|
||||
Bitwise_And_<BuildGuards(proto::_left),BuildGuards(proto::_right)>()
|
||||
>
|
||||
{};
|
||||
template<>
|
||||
struct BuildGuardsCases::case_<proto::tag::bitwise_or>
|
||||
: proto::when<
|
||||
proto::bitwise_or<BuildGuards,BuildGuards >,
|
||||
Bitwise_Or_<BuildGuards(proto::_left),BuildGuards(proto::_right)>()
|
||||
>
|
||||
{};
|
||||
template<>
|
||||
struct BuildGuardsCases::case_<proto::tag::subscript>
|
||||
: proto::when<
|
||||
proto::subscript<BuildGuards,BuildGuards >,
|
||||
Subscript_<BuildGuards(proto::_left),BuildGuards(proto::_right)>()
|
||||
>
|
||||
{};
|
||||
template<>
|
||||
struct BuildGuardsCases::case_<proto::tag::plus_assign>
|
||||
: proto::when<
|
||||
proto::plus_assign<BuildGuards,BuildGuards >,
|
||||
Plus_Assign_<BuildGuards(proto::_left),BuildGuards(proto::_right)>()
|
||||
>
|
||||
{};
|
||||
template<>
|
||||
struct BuildGuardsCases::case_<proto::tag::minus_assign>
|
||||
: proto::when<
|
||||
proto::minus_assign<BuildGuards,BuildGuards >,
|
||||
Minus_Assign_<BuildGuards(proto::_left),BuildGuards(proto::_right)>()
|
||||
>
|
||||
{};
|
||||
template<>
|
||||
struct BuildGuardsCases::case_<proto::tag::multiplies_assign>
|
||||
: proto::when<
|
||||
proto::multiplies_assign<BuildGuards,BuildGuards >,
|
||||
Multiplies_Assign_<BuildGuards(proto::_left),BuildGuards(proto::_right)>()
|
||||
>
|
||||
{};
|
||||
template<>
|
||||
struct BuildGuardsCases::case_<proto::tag::divides_assign>
|
||||
: proto::when<
|
||||
proto::divides_assign<BuildGuards,BuildGuards >,
|
||||
Divides_Assign_<BuildGuards(proto::_left),BuildGuards(proto::_right)>()
|
||||
>
|
||||
{};
|
||||
template<>
|
||||
struct BuildGuardsCases::case_<proto::tag::modulus_assign>
|
||||
: proto::when<
|
||||
proto::modulus_assign<BuildGuards,BuildGuards >,
|
||||
Modulus_Assign_<BuildGuards(proto::_left),BuildGuards(proto::_right)>()
|
||||
>
|
||||
{};
|
||||
template<>
|
||||
struct BuildGuardsCases::case_<proto::tag::shift_left_assign>
|
||||
: proto::when<
|
||||
proto::shift_left_assign<BuildGuards,BuildGuards >,
|
||||
ShiftLeft_Assign_<BuildGuards(proto::_left),BuildGuards(proto::_right)>()
|
||||
>
|
||||
{};
|
||||
template<>
|
||||
struct BuildGuardsCases::case_<proto::tag::shift_right_assign>
|
||||
: proto::when<
|
||||
proto::shift_right_assign<BuildGuards,BuildGuards >,
|
||||
ShiftRight_Assign_<BuildGuards(proto::_left),BuildGuards(proto::_right)>()
|
||||
>
|
||||
{};
|
||||
template<>
|
||||
struct BuildGuardsCases::case_<proto::tag::shift_left>
|
||||
: proto::when<
|
||||
proto::shift_left<BuildGuards,BuildGuards >,
|
||||
ShiftLeft_<BuildGuards(proto::_left),BuildGuards(proto::_right)>()
|
||||
>
|
||||
{};
|
||||
template<>
|
||||
struct BuildGuardsCases::case_<proto::tag::shift_right>
|
||||
: proto::when<
|
||||
proto::shift_right<BuildGuards,BuildGuards >,
|
||||
ShiftRight_<BuildGuards(proto::_left),BuildGuards(proto::_right)>()
|
||||
>
|
||||
{};
|
||||
template<>
|
||||
struct BuildGuardsCases::case_<proto::tag::assign>
|
||||
: proto::when<
|
||||
proto::assign<BuildGuards,BuildGuards >,
|
||||
Assign_<BuildGuards(proto::_left),BuildGuards(proto::_right)>()
|
||||
>
|
||||
{};
|
||||
template<>
|
||||
struct BuildGuardsCases::case_<proto::tag::bitwise_xor>
|
||||
: proto::when<
|
||||
proto::bitwise_xor<BuildGuards,BuildGuards >,
|
||||
Bitwise_Xor_<BuildGuards(proto::_left),BuildGuards(proto::_right)>()
|
||||
>
|
||||
{};
|
||||
template<>
|
||||
struct BuildGuardsCases::case_<proto::tag::negate>
|
||||
: proto::when<
|
||||
proto::negate<BuildGuards >,
|
||||
Unary_Minus_<BuildGuards(proto::_child)>()
|
||||
>
|
||||
{};
|
||||
|
||||
template<>
|
||||
struct BuildGuardsCases::case_<proto::tag::function>
|
||||
: proto::or_<
|
||||
proto::when<
|
||||
proto::function<proto::terminal<if_tag>,BuildGuards,BuildGuards,BuildGuards >,
|
||||
If_Else_<BuildGuards(proto::_child_c<1>),
|
||||
BuildGuards(proto::_child_c<2>),
|
||||
BuildGuards(proto::_child_c<3>) >()
|
||||
>,
|
||||
proto::when<
|
||||
proto::function<proto::terminal<proto::_> >,
|
||||
get_fct<proto::_child_c<0> >()
|
||||
>,
|
||||
proto::when<
|
||||
proto::function<proto::terminal<proto::_>,BuildActions >,
|
||||
get_fct<proto::_child_c<0>,BuildActions(proto::_child_c<1>) >()
|
||||
>,
|
||||
proto::when<
|
||||
proto::function<proto::terminal<proto::_>,BuildActions,BuildActions >,
|
||||
get_fct<proto::_child_c<0>,BuildActions(proto::_child_c<1>),BuildActions(proto::_child_c<2>) >()
|
||||
>,
|
||||
proto::when<
|
||||
proto::function<proto::terminal<proto::_>,BuildActions,BuildActions,BuildActions >,
|
||||
get_fct<proto::_child_c<0>,BuildActions(proto::_child_c<1>)
|
||||
,BuildActions(proto::_child_c<2>),BuildActions(proto::_child_c<3>) >()
|
||||
>,
|
||||
proto::when<
|
||||
proto::function<proto::terminal<proto::_>,BuildActions,BuildActions,BuildActions,BuildActions >,
|
||||
get_fct<proto::_child_c<0>
|
||||
,BuildActions(proto::_child_c<1>),BuildActions(proto::_child_c<2>)
|
||||
,BuildActions(proto::_child_c<3>),BuildActions(proto::_child_c<4>) >()
|
||||
>,
|
||||
proto::when<
|
||||
proto::function<proto::terminal<proto::_>,BuildActions,BuildActions,BuildActions,BuildActions,BuildActions >,
|
||||
get_fct<proto::_child_c<0>
|
||||
,BuildActions(proto::_child_c<1>),BuildActions(proto::_child_c<2>)
|
||||
,BuildActions(proto::_child_c<3>),BuildActions(proto::_child_c<4>),BuildActions(proto::_child_c<5>) >()
|
||||
>
|
||||
#ifdef BOOST_MSVC
|
||||
,proto::when<
|
||||
proto::function<proto::terminal<proto::_>,BuildActions,BuildActions,BuildActions,BuildActions,BuildActions,BuildActions >,
|
||||
get_fct<proto::_child_c<0>
|
||||
,BuildActions(proto::_child_c<1>),BuildActions(proto::_child_c<2>)
|
||||
,BuildActions(proto::_child_c<3>),BuildActions(proto::_child_c<4>)
|
||||
,BuildActions(proto::_child_c<5>),BuildActions(proto::_child_c<6>) >()
|
||||
>
|
||||
#endif
|
||||
>
|
||||
{};
|
||||
|
||||
template<>
|
||||
struct BuildGuardsCases::case_<proto::tag::terminal>
|
||||
: proto::or_<
|
||||
proto::when <
|
||||
proto::terminal<action_tag>,
|
||||
get_action_name<proto::_ >()
|
||||
>,
|
||||
proto::when<
|
||||
proto::terminal<state_tag>,
|
||||
get_state_name<proto::_>()
|
||||
>,
|
||||
proto::when<
|
||||
proto::terminal<flag_tag>,
|
||||
proto::_
|
||||
>,
|
||||
proto::when<
|
||||
proto::terminal<event_tag>,
|
||||
proto::_
|
||||
>,
|
||||
proto::when<
|
||||
proto::terminal<fsm_artefact_tag>,
|
||||
get_fct<proto::_ >()
|
||||
>,
|
||||
proto::when<
|
||||
proto::terminal<proto::_>,
|
||||
proto::_value
|
||||
>
|
||||
>
|
||||
{};
|
||||
|
||||
struct BuildGuards
|
||||
: proto::switch_<BuildGuardsCases>
|
||||
{};
|
||||
|
||||
}}}}
|
||||
|
||||
#endif //BOOST_MSM_FRONT_EUML_GUARD_GRAMMAR_H
|
||||
26
test/external/boost/msm/front/euml/iteration.hpp
vendored
Normal file
26
test/external/boost/msm/front/euml/iteration.hpp
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
// Copyright 2008 Christophe Henry
|
||||
// henry UNDERSCORE christophe AT hotmail DOT com
|
||||
// This is an extended version of the state machine available in the boost::mpl library
|
||||
// Distributed under the same license as the original.
|
||||
// Copyright for the original version:
|
||||
// Copyright 2005 David Abrahams and Aleksey Gurtovoy. Distributed
|
||||
// under the Boost Software License, Version 1.0. (See accompanying
|
||||
// file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#ifndef BOOST_MSM_FRONT_EUML_ITERATION_H
|
||||
#define BOOST_MSM_FRONT_EUML_ITERATION_H
|
||||
|
||||
#include <algorithm>
|
||||
#include <numeric>
|
||||
#include <boost/msm/front/euml/common.hpp>
|
||||
|
||||
namespace boost { namespace msm { namespace front { namespace euml
|
||||
{
|
||||
|
||||
BOOST_MSM_EUML_FUNCTION(ForEach_ , std::for_each , for_each_ , RESULT_TYPE_PARAM3 , RESULT_TYPE2_PARAM3 )
|
||||
BOOST_MSM_EUML_FUNCTION(Accumulate_ , std::accumulate , accumulate_ , RESULT_TYPE_PARAM3 , RESULT_TYPE2_PARAM3 )
|
||||
|
||||
}}}}
|
||||
|
||||
#endif //BOOST_MSM_FRONT_EUML_ITERATION_H
|
||||
1566
test/external/boost/msm/front/euml/operator.hpp
vendored
Normal file
1566
test/external/boost/msm/front/euml/operator.hpp
vendored
Normal file
File diff suppressed because it is too large
Load Diff
26
test/external/boost/msm/front/euml/phoenix_placeholders.hpp
vendored
Normal file
26
test/external/boost/msm/front/euml/phoenix_placeholders.hpp
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
// Copyright 2011 Christophe Henry
|
||||
// henry UNDERSCORE christophe AT hotmail DOT com
|
||||
// This is an extended version of the state machine available in the boost::mpl library
|
||||
// Distributed under the same license as the original.
|
||||
// Copyright for the original version:
|
||||
// Copyright 2005 David Abrahams and Aleksey Gurtovoy. Distributed
|
||||
// under the Boost Software License, Version 1.0. (See accompanying
|
||||
// file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#ifndef BOOST_MSM_FRONT_EUML_PHOENIX_PLACEHOLDERS_H
|
||||
#define BOOST_MSM_FRONT_EUML_PHOENIX_PLACEHOLDERS_H
|
||||
|
||||
#include <boost/phoenix/core/argument.hpp>
|
||||
// provide some meaningful placeholders (instead of arg1...arg4)
|
||||
namespace boost { namespace msm { namespace front { namespace euml
|
||||
{
|
||||
boost::phoenix::expression::argument<1>::type const _event = {};
|
||||
boost::phoenix::expression::argument<2>::type const _fsm = {};
|
||||
boost::phoenix::expression::argument<3>::type const _source = {};
|
||||
boost::phoenix::expression::argument<4>::type const _target = {};
|
||||
// this is for state actions
|
||||
boost::phoenix::expression::argument<3>::type const _state = {};
|
||||
}}}}
|
||||
|
||||
#endif //BOOST_MSM_FRONT_EUML_PHOENIX_PLACEHOLDERS_H
|
||||
43
test/external/boost/msm/front/euml/querying.hpp
vendored
Normal file
43
test/external/boost/msm/front/euml/querying.hpp
vendored
Normal file
@@ -0,0 +1,43 @@
|
||||
// Copyright 2008 Christophe Henry
|
||||
// henry UNDERSCORE christophe AT hotmail DOT com
|
||||
// This is an extended version of the state machine available in the boost::mpl library
|
||||
// Distributed under the same license as the original.
|
||||
// Copyright for the original version:
|
||||
// Copyright 2005 David Abrahams and Aleksey Gurtovoy. Distributed
|
||||
// under the Boost Software License, Version 1.0. (See accompanying
|
||||
// file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#ifndef BOOST_MSM_FRONT_EUML_QUERYING_H
|
||||
#define BOOST_MSM_FRONT_EUML_QUERYING_H
|
||||
|
||||
#include <algorithm>
|
||||
#include <boost/msm/front/euml/common.hpp>
|
||||
|
||||
namespace boost { namespace msm { namespace front { namespace euml
|
||||
{
|
||||
|
||||
BOOST_MSM_EUML_FUNCTION(Find_ , std::find , find_ , RESULT_TYPE_PARAM1 , RESULT_TYPE2_PARAM1 )
|
||||
BOOST_MSM_EUML_FUNCTION(FindIf_ , std::find_if , find_if_ , RESULT_TYPE_PARAM1 , RESULT_TYPE2_PARAM1 )
|
||||
BOOST_MSM_EUML_FUNCTION(LowerBound_ , std::lower_bound , lower_bound_ , RESULT_TYPE_PARAM1 , RESULT_TYPE2_PARAM1 )
|
||||
BOOST_MSM_EUML_FUNCTION(UpperBound_ , std::upper_bound , upper_bound_ , RESULT_TYPE_PARAM1 , RESULT_TYPE2_PARAM1 )
|
||||
BOOST_MSM_EUML_FUNCTION(BinarySearch_ , std::binary_search , binary_search_ , bool , bool )
|
||||
BOOST_MSM_EUML_FUNCTION(MinElement_ , std::min_element , min_element_ , RESULT_TYPE_PARAM1 , RESULT_TYPE2_PARAM1 )
|
||||
BOOST_MSM_EUML_FUNCTION(MaxElement_ , std::max_element , max_element_ , RESULT_TYPE_PARAM1 , RESULT_TYPE2_PARAM1 )
|
||||
BOOST_MSM_EUML_FUNCTION(AdjacentFind_ , std::adjacent_find , adjacent_find_ , RESULT_TYPE_PARAM1 , RESULT_TYPE2_PARAM1 )
|
||||
BOOST_MSM_EUML_FUNCTION(FindEnd_ , std::find_end , find_end_ , RESULT_TYPE_PARAM1 , RESULT_TYPE2_PARAM1 )
|
||||
BOOST_MSM_EUML_FUNCTION(FindFirstOf_ , std::find_first_of , find_first_of_ , RESULT_TYPE_PARAM1 , RESULT_TYPE2_PARAM1 )
|
||||
BOOST_MSM_EUML_FUNCTION(Equal_ , std::equal , equal_ , bool , bool )
|
||||
BOOST_MSM_EUML_FUNCTION(Search_ , std::search , search_ , RESULT_TYPE_PARAM1 , RESULT_TYPE2_PARAM1 )
|
||||
BOOST_MSM_EUML_FUNCTION(Includes_ , std::includes , includes_ , bool , bool )
|
||||
BOOST_MSM_EUML_FUNCTION(LexicographicalCompare_ , std::lexicographical_compare , lexicographical_compare_ , bool , bool )
|
||||
BOOST_MSM_EUML_FUNCTION(Count_ , std::count , count_ , RESULT_TYPE_DIFF_TYPE_ITER_TRAITS_PARAM1 , RESULT_TYPE2_DIFF_TYPE_ITER_TRAITS_PARAM1 )
|
||||
BOOST_MSM_EUML_FUNCTION(CountIf_ , std::count_if , count_if_ , RESULT_TYPE_DIFF_TYPE_ITER_TRAITS_PARAM1 , RESULT_TYPE2_DIFF_TYPE_ITER_TRAITS_PARAM1 )
|
||||
BOOST_MSM_EUML_FUNCTION(Distance_ , std::distance , distance_ , RESULT_TYPE_DIFF_TYPE_ITER_TRAITS_PARAM1 , RESULT_TYPE2_DIFF_TYPE_ITER_TRAITS_PARAM1 )
|
||||
BOOST_MSM_EUML_FUNCTION(EqualRange_ , std::equal_range , equal_range_ , RESULT_TYPE_PAIR_REMOVE_REF_PARAM1 , RESULT_TYPE2_PAIR_REMOVE_REF_PARAM1 )
|
||||
BOOST_MSM_EUML_FUNCTION(Mismatch_ , std::mismatch , mismatch_ , RESULT_TYPE_PAIR_REMOVE_REF_PARAM1 , RESULT_TYPE2_PAIR_REMOVE_REF_PARAM1 )
|
||||
|
||||
|
||||
}}}}
|
||||
|
||||
#endif //BOOST_MSM_FRONT_EUML_QUERYING_H
|
||||
1832
test/external/boost/msm/front/euml/state_grammar.hpp
vendored
Normal file
1832
test/external/boost/msm/front/euml/state_grammar.hpp
vendored
Normal file
File diff suppressed because it is too large
Load Diff
17
test/external/boost/msm/front/euml/stl.hpp
vendored
Normal file
17
test/external/boost/msm/front/euml/stl.hpp
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
// Copyright 2008 Christophe Henry
|
||||
// henry UNDERSCORE christophe AT hotmail DOT com
|
||||
// This is an extended version of the state machine available in the boost::mpl library
|
||||
// Distributed under the same license as the original.
|
||||
// Copyright for the original version:
|
||||
// Copyright 2005 David Abrahams and Aleksey Gurtovoy. Distributed
|
||||
// under the Boost Software License, Version 1.0. (See accompanying
|
||||
// file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#ifndef BOOST_MSM_FRONT_EUML_STL_H
|
||||
#define BOOST_MSM_FRONT_EUML_STL_H
|
||||
|
||||
#include <boost/msm/front/euml/container.hpp>
|
||||
#include <boost/msm/front/euml/algorithm.hpp>
|
||||
|
||||
#endif //BOOST_MSM_FRONT_EUML_STL_H
|
||||
280
test/external/boost/msm/front/euml/stt_grammar.hpp
vendored
Normal file
280
test/external/boost/msm/front/euml/stt_grammar.hpp
vendored
Normal file
@@ -0,0 +1,280 @@
|
||||
// Copyright 2008 Christophe Henry
|
||||
// henry UNDERSCORE christophe AT hotmail DOT com
|
||||
// This is an extended version of the state machine available in the boost::mpl library
|
||||
// Distributed under the same license as the original.
|
||||
// Copyright for the original version:
|
||||
// Copyright 2005 David Abrahams and Aleksey Gurtovoy. Distributed
|
||||
// under the Boost Software License, Version 1.0. (See accompanying
|
||||
// file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#ifndef BOOST_MSM_FRONT_EUML_STT_GRAMMAR_H
|
||||
#define BOOST_MSM_FRONT_EUML_STT_GRAMMAR_H
|
||||
|
||||
#include <boost/msm/front/euml/common.hpp>
|
||||
#include <boost/mpl/vector.hpp>
|
||||
#include <boost/mpl/eval_if.hpp>
|
||||
|
||||
#include <boost/msm/front/euml/operator.hpp>
|
||||
#include <boost/msm/front/euml/guard_grammar.hpp>
|
||||
#include <boost/msm/front/euml/state_grammar.hpp>
|
||||
|
||||
namespace proto = boost::proto;
|
||||
|
||||
namespace boost { namespace msm { namespace front { namespace euml
|
||||
{
|
||||
|
||||
template <class SOURCE,class EVENT,class TARGET,class ACTION=none,class GUARD=none>
|
||||
struct TempRow
|
||||
{
|
||||
typedef SOURCE Source;
|
||||
typedef EVENT Evt;
|
||||
typedef TARGET Target;
|
||||
typedef ACTION Action;
|
||||
typedef GUARD Guard;
|
||||
};
|
||||
|
||||
template <class TEMP_ROW>
|
||||
struct convert_to_row
|
||||
{
|
||||
typedef Row<typename TEMP_ROW::Source,typename TEMP_ROW::Evt,typename TEMP_ROW::Target,
|
||||
typename TEMP_ROW::Action,typename TEMP_ROW::Guard> type;
|
||||
};
|
||||
template <class TEMP_ROW>
|
||||
struct convert_to_internal_row
|
||||
{
|
||||
typedef Internal<typename TEMP_ROW::Evt,
|
||||
typename TEMP_ROW::Action,typename TEMP_ROW::Guard> type;
|
||||
};
|
||||
// explicit + fork + entry point + exit point grammar
|
||||
struct BuildEntry
|
||||
: proto::or_<
|
||||
proto::when<
|
||||
proto::function<proto::terminal<proto::_>,proto::terminal<state_tag>,proto::terminal<state_tag> >,
|
||||
get_fct<proto::_child_c<0>,get_state_name<proto::_child_c<1>() >(),get_state_name<proto::_child_c<2>() >() >()
|
||||
>
|
||||
>
|
||||
{};
|
||||
|
||||
// row grammar
|
||||
struct BuildNextStates
|
||||
: proto::or_<
|
||||
proto::when<
|
||||
proto::terminal<state_tag>,
|
||||
get_state_name<proto::_>()
|
||||
>,
|
||||
proto::when<
|
||||
BuildEntry,
|
||||
BuildEntry
|
||||
>,
|
||||
proto::when<
|
||||
proto::comma<BuildEntry,BuildEntry >,
|
||||
::boost::mpl::push_back<
|
||||
make_vector_one_row<BuildEntry(proto::_left)>(),
|
||||
BuildEntry(proto::_right)>()
|
||||
>,
|
||||
proto::when <
|
||||
proto::comma<BuildNextStates,BuildEntry >,
|
||||
::boost::mpl::push_back<
|
||||
BuildNextStates(proto::_left),
|
||||
BuildEntry(proto::_right) >()
|
||||
>
|
||||
>
|
||||
{};
|
||||
|
||||
template <class EventGuard,class ActionClass>
|
||||
struct fusion_event_action_guard
|
||||
{
|
||||
typedef TempRow<none,typename EventGuard::Evt,none,typename ActionClass::Action,typename EventGuard::Guard> type;
|
||||
};
|
||||
|
||||
template <class SourceGuard,class ActionClass>
|
||||
struct fusion_source_action_guard
|
||||
{
|
||||
typedef TempRow<typename SourceGuard::Source,none,none,typename ActionClass::Action,typename SourceGuard::Guard> type;
|
||||
};
|
||||
|
||||
template <class SourceClass,class EventClass>
|
||||
struct fusion_source_event_action_guard
|
||||
{
|
||||
typedef TempRow<typename SourceClass::Source,typename EventClass::Evt,
|
||||
none,typename EventClass::Action,typename EventClass::Guard> type;
|
||||
};
|
||||
template <class Left,class Right>
|
||||
struct fusion_left_right
|
||||
{
|
||||
typedef TempRow<typename Right::Source,typename Right::Evt,typename Left::Target
|
||||
,typename Right::Action,typename Right::Guard> type;
|
||||
};
|
||||
|
||||
struct BuildEventPlusGuard
|
||||
: proto::or_<
|
||||
proto::when<
|
||||
proto::subscript<proto::terminal<event_tag>, GuardGrammar >,
|
||||
TempRow<none,proto::_left,none,none, GuardGrammar(proto::_right)>(proto::_right)
|
||||
>
|
||||
>
|
||||
{};
|
||||
|
||||
struct BuildSourceState
|
||||
: proto::or_<
|
||||
proto::when<
|
||||
proto::terminal<state_tag>,
|
||||
get_state_name<proto::_>()
|
||||
>,
|
||||
proto::when<
|
||||
BuildEntry,
|
||||
BuildEntry
|
||||
>
|
||||
>
|
||||
{};
|
||||
|
||||
struct BuildSourcePlusGuard
|
||||
: proto::when<
|
||||
proto::subscript<BuildSourceState,GuardGrammar >,
|
||||
TempRow<BuildSourceState(proto::_left),none,none,none,GuardGrammar(proto::_right)>(proto::_right)
|
||||
>
|
||||
{};
|
||||
|
||||
struct BuildEvent
|
||||
: proto::or_<
|
||||
// just event without guard/action
|
||||
proto::when<
|
||||
proto::terminal<event_tag>,
|
||||
TempRow<none,proto::_,none>() >
|
||||
// event / action
|
||||
, proto::when<
|
||||
proto::divides<proto::terminal<event_tag>,ActionGrammar >,
|
||||
TempRow<none,proto::_left,none,ActionGrammar(proto::_right) >(proto::_right) >
|
||||
// event [ guard ]
|
||||
, proto::when<
|
||||
proto::subscript<proto::terminal<event_tag>,GuardGrammar >,
|
||||
TempRow<none,proto::_left,none,none,GuardGrammar(proto::_right)>(proto::_right) >
|
||||
// event [ guard ] / action
|
||||
, proto::when<
|
||||
proto::divides<BuildEventPlusGuard, ActionGrammar>,
|
||||
fusion_event_action_guard<BuildEventPlusGuard(proto::_left),
|
||||
TempRow<none,none,none,ActionGrammar(proto::_right)>(proto::_right)
|
||||
>()
|
||||
>
|
||||
>
|
||||
{};
|
||||
struct BuildSource
|
||||
: proto::or_<
|
||||
// after == if just state without event or guard/action
|
||||
proto::when<
|
||||
BuildSourceState,
|
||||
TempRow<BuildSourceState(proto::_),none,none>() >
|
||||
// == source / action
|
||||
, proto::when<
|
||||
proto::divides<BuildSourceState,ActionGrammar >,
|
||||
TempRow<BuildSourceState(proto::_left),none,none,ActionGrammar(proto::_right) >(proto::_right) >
|
||||
// == source [ guard ]
|
||||
, proto::when<
|
||||
proto::subscript<BuildSourceState,GuardGrammar >,
|
||||
TempRow<BuildSourceState(proto::_left),none,none,none,GuardGrammar(proto::_right)>(proto::_right) >
|
||||
// == source [ guard ] / action
|
||||
, proto::when<
|
||||
proto::divides<BuildSourcePlusGuard,
|
||||
ActionGrammar >,
|
||||
fusion_source_action_guard<BuildSourcePlusGuard(proto::_left),
|
||||
TempRow<none,none,none,ActionGrammar(proto::_right)>(proto::_right)
|
||||
>()
|
||||
>
|
||||
>
|
||||
{};
|
||||
|
||||
struct BuildRight
|
||||
: proto::or_<
|
||||
proto::when<
|
||||
proto::plus<BuildSource,BuildEvent >,
|
||||
fusion_source_event_action_guard<BuildSource(proto::_left),BuildEvent(proto::_right)>()
|
||||
>,
|
||||
proto::when<
|
||||
BuildSource,
|
||||
BuildSource
|
||||
>
|
||||
>
|
||||
{};
|
||||
|
||||
struct BuildRow
|
||||
: proto::or_<
|
||||
// grammar 1
|
||||
proto::when<
|
||||
proto::equal_to<BuildNextStates,BuildRight >,
|
||||
convert_to_row<
|
||||
fusion_left_right<TempRow<none,none,BuildNextStates(proto::_left)>,BuildRight(proto::_right)> >()
|
||||
>,
|
||||
// internal events
|
||||
proto::when<
|
||||
BuildRight,
|
||||
convert_to_row<
|
||||
fusion_left_right<TempRow<none,none,none>,BuildRight(proto::_)> >()
|
||||
>,
|
||||
// grammar 2
|
||||
proto::when<
|
||||
proto::equal_to<BuildRight,BuildNextStates>,
|
||||
convert_to_row<
|
||||
fusion_left_right<TempRow<none,none,BuildNextStates(proto::_right)>,BuildRight(proto::_left)> >()
|
||||
>
|
||||
>
|
||||
{};
|
||||
|
||||
// stt grammar
|
||||
struct BuildStt
|
||||
: proto::or_<
|
||||
proto::when<
|
||||
proto::comma<BuildStt,BuildStt>,
|
||||
boost::mpl::push_back<BuildStt(proto::_left),BuildRow(proto::_right)>()
|
||||
>,
|
||||
proto::when <
|
||||
BuildRow,
|
||||
make_vector_one_row<BuildRow(proto::_)>()
|
||||
>
|
||||
>
|
||||
{};
|
||||
|
||||
template <class Expr>
|
||||
typename ::boost::mpl::eval_if<
|
||||
typename proto::matches<Expr,BuildStt>::type,
|
||||
boost::result_of<BuildStt(Expr)>,
|
||||
make_invalid_type>::type
|
||||
build_stt(Expr const& expr)
|
||||
{
|
||||
return typename boost::result_of<BuildStt(Expr)>::type();
|
||||
}
|
||||
|
||||
// internal stt grammar
|
||||
struct BuildInternalRow
|
||||
: proto::when<
|
||||
BuildEvent,
|
||||
convert_to_internal_row<
|
||||
fusion_left_right<TempRow<none,none,none>,BuildEvent(proto::_)> >()
|
||||
>
|
||||
{};
|
||||
struct BuildInternalStt
|
||||
: proto::or_<
|
||||
proto::when<
|
||||
proto::comma<BuildInternalStt,BuildInternalStt>,
|
||||
boost::mpl::push_back<BuildInternalStt(proto::_left),BuildInternalRow(proto::_right)>()
|
||||
>,
|
||||
proto::when <
|
||||
BuildInternalRow,
|
||||
make_vector_one_row<BuildInternalRow(proto::_)>()
|
||||
>
|
||||
>
|
||||
{};
|
||||
|
||||
template <class Expr>
|
||||
typename ::boost::mpl::eval_if<
|
||||
typename proto::matches<Expr,BuildInternalStt>::type,
|
||||
boost::result_of<BuildInternalStt(Expr)>,
|
||||
make_invalid_type>::type
|
||||
build_internal_stt(Expr const& expr)
|
||||
{
|
||||
return typename boost::result_of<BuildInternalStt(Expr)>::type();
|
||||
}
|
||||
|
||||
|
||||
}}}}
|
||||
#endif //BOOST_MSM_FRONT_EUML_STT_GRAMMAR_H
|
||||
335
test/external/boost/msm/front/euml/transformation.hpp
vendored
Normal file
335
test/external/boost/msm/front/euml/transformation.hpp
vendored
Normal file
@@ -0,0 +1,335 @@
|
||||
// Copyright 2008 Christophe Henry
|
||||
// henry UNDERSCORE christophe AT hotmail DOT com
|
||||
// This is an extended version of the state machine available in the boost::mpl library
|
||||
// Distributed under the same license as the original.
|
||||
// Copyright for the original version:
|
||||
// Copyright 2005 David Abrahams and Aleksey Gurtovoy. Distributed
|
||||
// under the Boost Software License, Version 1.0. (See accompanying
|
||||
// file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#ifndef BOOST_MSM_FRONT_EUML_TRANSFORMATION_H
|
||||
#define BOOST_MSM_FRONT_EUML_TRANSFORMATION_H
|
||||
|
||||
#include <algorithm>
|
||||
#include <boost/msm/front/euml/common.hpp>
|
||||
|
||||
namespace boost { namespace msm { namespace front { namespace euml
|
||||
{
|
||||
#ifdef __STL_CONFIG_H
|
||||
BOOST_MSM_EUML_FUNCTION(FillN_ , std::fill_n , fill_n_ , RESULT_TYPE_PARAM1 , RESULT_TYPE2_PARAM1 )
|
||||
BOOST_MSM_EUML_FUNCTION(Rotate_ , std::rotate , rotate_ , RESULT_TYPE_PARAM1 , RESULT_TYPE2_PARAM1 )
|
||||
BOOST_MSM_EUML_FUNCTION(GenerateN_ , std::generate_n , generate_n_ , RESULT_TYPE_PARAM1 , RESULT_TYPE2_PARAM1 )
|
||||
|
||||
#else
|
||||
BOOST_MSM_EUML_FUNCTION(FillN_ , std::fill_n , fill_n_ , void , void )
|
||||
BOOST_MSM_EUML_FUNCTION(Rotate_ , std::rotate , rotate_ , void , void )
|
||||
BOOST_MSM_EUML_FUNCTION(GenerateN_ , std::generate_n , generate_n_ , void , void )
|
||||
#endif
|
||||
|
||||
BOOST_MSM_EUML_FUNCTION(Copy_ , std::copy , copy_ , RESULT_TYPE_PARAM3 , RESULT_TYPE2_PARAM3 )
|
||||
BOOST_MSM_EUML_FUNCTION(CopyBackward_ , std::copy_backward , copy_backward_ , RESULT_TYPE_PARAM3 , RESULT_TYPE2_PARAM3 )
|
||||
BOOST_MSM_EUML_FUNCTION(Reverse_ , std::reverse , reverse_ , void , void )
|
||||
BOOST_MSM_EUML_FUNCTION(ReverseCopy_ , std::reverse_copy , reverse_copy_ , RESULT_TYPE_PARAM3 , RESULT_TYPE2_PARAM3 )
|
||||
BOOST_MSM_EUML_FUNCTION(Remove_ , std::remove , remove_ , RESULT_TYPE_PARAM1 , RESULT_TYPE2_PARAM1 )
|
||||
BOOST_MSM_EUML_FUNCTION(RemoveIf_ , std::remove_if , remove_if_ , RESULT_TYPE_PARAM1 , RESULT_TYPE2_PARAM1 )
|
||||
BOOST_MSM_EUML_FUNCTION(RemoveCopy_ , std::remove_copy , remove_copy_ , RESULT_TYPE_PARAM3 , RESULT_TYPE2_PARAM3 )
|
||||
BOOST_MSM_EUML_FUNCTION(RemoveCopyIf_ , std::remove_copy_if , remove_copy_if_ , RESULT_TYPE_PARAM3 , RESULT_TYPE2_PARAM3 )
|
||||
BOOST_MSM_EUML_FUNCTION(Fill_ , std::fill , fill_ , void , void )
|
||||
BOOST_MSM_EUML_FUNCTION(Generate_ , std::generate , generate_ , void , void )
|
||||
BOOST_MSM_EUML_FUNCTION(Unique_ , std::unique , unique_ , RESULT_TYPE_PARAM1 , RESULT_TYPE2_PARAM1 )
|
||||
BOOST_MSM_EUML_FUNCTION(UniqueCopy_ , std::unique_copy , unique_copy_ , RESULT_TYPE_PARAM3 , RESULT_TYPE2_PARAM3 )
|
||||
BOOST_MSM_EUML_FUNCTION(RandomShuffle_ , std::random_shuffle , random_shuffle_ , void , void )
|
||||
BOOST_MSM_EUML_FUNCTION(RotateCopy_ , std::rotate_copy , rotate_copy_ , RESULT_TYPE_PARAM4 , RESULT_TYPE2_PARAM4 )
|
||||
BOOST_MSM_EUML_FUNCTION(Partition_ , std::partition , partition_ , RESULT_TYPE_PARAM1 , RESULT_TYPE2_PARAM1 )
|
||||
BOOST_MSM_EUML_FUNCTION(StablePartition_ , std::stable_partition , stable_partition_ , RESULT_TYPE_PARAM1 , RESULT_TYPE2_PARAM1 )
|
||||
BOOST_MSM_EUML_FUNCTION(Sort_ , std::sort , sort_ , void , void )
|
||||
BOOST_MSM_EUML_FUNCTION(StableSort_ , std::stable_sort , stable_sort_ , void , void )
|
||||
BOOST_MSM_EUML_FUNCTION(PartialSort_ , std::partial_sort , partial_sort_ , void , void )
|
||||
BOOST_MSM_EUML_FUNCTION(PartialSortCopy_ , std::partial_sort_copy , partial_sort_copy_ , RESULT_TYPE_PARAM3 , RESULT_TYPE2_PARAM3 )
|
||||
BOOST_MSM_EUML_FUNCTION(NthElement_ , std::nth_element , nth_element_ , void , void )
|
||||
BOOST_MSM_EUML_FUNCTION(Merge_ , std::merge , merge_ , RESULT_TYPE_PARAM5 , RESULT_TYPE2_PARAM5 )
|
||||
BOOST_MSM_EUML_FUNCTION(InplaceMerge_ , std::inplace_merge , inplace_merge_ , void , void )
|
||||
BOOST_MSM_EUML_FUNCTION(SetUnion_ , std::set_union , set_union_ , RESULT_TYPE_PARAM5 , RESULT_TYPE2_PARAM5 )
|
||||
BOOST_MSM_EUML_FUNCTION(PushHeap_ , std::push_heap , push_heap_ , void , void )
|
||||
BOOST_MSM_EUML_FUNCTION(PopHeap_ , std::pop_heap , pop_heap_ , void , void )
|
||||
BOOST_MSM_EUML_FUNCTION(MakeHeap_ , std::make_heap , make_heap_ , void , void )
|
||||
BOOST_MSM_EUML_FUNCTION(SortHeap_ , std::sort_heap , sort_heap_ , void , void )
|
||||
BOOST_MSM_EUML_FUNCTION(NextPermutation_ , std::next_permutation , next_permutation_ , bool , bool )
|
||||
BOOST_MSM_EUML_FUNCTION(PrevPermutation_ , std::prev_permutation , prev_permutation_ , bool , bool )
|
||||
BOOST_MSM_EUML_FUNCTION(InnerProduct_ , std::inner_product , inner_product_ , RESULT_TYPE_PARAM4 , RESULT_TYPE2_PARAM4 )
|
||||
BOOST_MSM_EUML_FUNCTION(PartialSum_ , std::partial_sum , partial_sum_ , RESULT_TYPE_PARAM3 , RESULT_TYPE2_PARAM3 )
|
||||
BOOST_MSM_EUML_FUNCTION(AdjacentDifference_ , std::adjacent_difference , adjacent_difference_ , RESULT_TYPE_PARAM3 , RESULT_TYPE2_PARAM3 )
|
||||
BOOST_MSM_EUML_FUNCTION(Replace_ , std::replace , replace_ , void , void )
|
||||
BOOST_MSM_EUML_FUNCTION(ReplaceIf_ , std::replace_if , replace_if_ , void , void )
|
||||
BOOST_MSM_EUML_FUNCTION(ReplaceCopy_ , std::replace_copy , replace_copy_ , RESULT_TYPE_PARAM3 , RESULT_TYPE2_PARAM3 )
|
||||
BOOST_MSM_EUML_FUNCTION(ReplaceCopyIf_ , std::replace_copy_if , replace_copy_if_ , RESULT_TYPE_PARAM3 , RESULT_TYPE2_PARAM3 )
|
||||
|
||||
|
||||
|
||||
template <class T>
|
||||
struct BackInserter_ : euml_action<BackInserter_<T> >
|
||||
{
|
||||
template <class Event,class FSM,class STATE >
|
||||
struct state_action_result
|
||||
{
|
||||
typedef std::back_insert_iterator<
|
||||
typename ::boost::remove_reference<
|
||||
typename get_result_type2<T,Event,FSM,STATE>::type>::type> type;
|
||||
};
|
||||
template <class EVT,class FSM,class SourceState,class TargetState>
|
||||
struct transition_action_result
|
||||
{
|
||||
typedef std::back_insert_iterator<
|
||||
typename ::boost::remove_reference<
|
||||
typename get_result_type<T,EVT,FSM,SourceState,TargetState>::type>::type> type;
|
||||
};
|
||||
typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type;
|
||||
|
||||
template <class EVT,class FSM,class SourceState,class TargetState>
|
||||
typename ::boost::enable_if<
|
||||
typename ::boost::mpl::has_key<
|
||||
typename T::tag_type,action_tag>::type,
|
||||
typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type
|
||||
operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const
|
||||
{
|
||||
return std::back_inserter(T()(evt,fsm,src,tgt));
|
||||
}
|
||||
template <class Event,class FSM,class STATE>
|
||||
typename ::boost::enable_if<
|
||||
typename ::boost::mpl::has_key<
|
||||
typename T::tag_type,state_action_tag>::type,
|
||||
typename state_action_result<Event,FSM,STATE>::type >::type
|
||||
operator()(Event const& evt,FSM& fsm,STATE& state )const
|
||||
{
|
||||
return std::back_inserter(T()(evt,fsm,state));
|
||||
}
|
||||
};
|
||||
|
||||
struct back_inserter_tag {};
|
||||
struct BackInserter_Helper: proto::extends< proto::terminal<back_inserter_tag>::type, BackInserter_Helper, sm_domain>
|
||||
{
|
||||
BackInserter_Helper(){}
|
||||
template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5
|
||||
#ifdef BOOST_MSVC
|
||||
,class Arg6
|
||||
#endif
|
||||
>
|
||||
struct In
|
||||
{
|
||||
typedef BackInserter_<Arg1> type;
|
||||
};
|
||||
};
|
||||
BackInserter_Helper const back_inserter_;
|
||||
|
||||
template <class T>
|
||||
struct FrontInserter_ : euml_action<FrontInserter_<T> >
|
||||
{
|
||||
template <class Event,class FSM,class STATE >
|
||||
struct state_action_result
|
||||
{
|
||||
typedef std::front_insert_iterator<
|
||||
typename ::boost::remove_reference<
|
||||
typename get_result_type2<T,Event,FSM,STATE>::type>::type> type;
|
||||
};
|
||||
template <class EVT,class FSM,class SourceState,class TargetState>
|
||||
struct transition_action_result
|
||||
{
|
||||
typedef std::front_insert_iterator<
|
||||
typename ::boost::remove_reference<
|
||||
typename get_result_type<T,EVT,FSM,SourceState,TargetState>::type>::type> type;
|
||||
};
|
||||
typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type;
|
||||
|
||||
template <class EVT,class FSM,class SourceState,class TargetState>
|
||||
typename ::boost::enable_if<
|
||||
typename ::boost::mpl::has_key<
|
||||
typename T::tag_type,action_tag>::type,
|
||||
typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type
|
||||
operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const
|
||||
{
|
||||
return std::front_inserter(T()(evt,fsm,src,tgt));
|
||||
}
|
||||
template <class Event,class FSM,class STATE>
|
||||
typename ::boost::enable_if<
|
||||
typename ::boost::mpl::has_key<
|
||||
typename T::tag_type,state_action_tag>::type,
|
||||
typename state_action_result<Event,FSM,STATE>::type >::type
|
||||
operator()(Event const& evt,FSM& fsm,STATE& state )const
|
||||
{
|
||||
return std::front_inserter(T()(evt,fsm,state));
|
||||
}
|
||||
};
|
||||
|
||||
struct front_inserter_tag {};
|
||||
struct FrontInserter_Helper: proto::extends< proto::terminal<front_inserter_tag>::type, FrontInserter_Helper, sm_domain>
|
||||
{
|
||||
FrontInserter_Helper(){}
|
||||
template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5
|
||||
#ifdef BOOST_MSVC
|
||||
,class Arg6
|
||||
#endif
|
||||
>
|
||||
struct In
|
||||
{
|
||||
typedef FrontInserter_<Arg1> type;
|
||||
};
|
||||
};
|
||||
FrontInserter_Helper const front_inserter_;
|
||||
|
||||
template <class T,class Pos>
|
||||
struct Inserter_ : euml_action<Inserter_<T,Pos> >
|
||||
{
|
||||
template <class Event,class FSM,class STATE >
|
||||
struct state_action_result
|
||||
{
|
||||
typedef std::insert_iterator<
|
||||
typename ::boost::remove_reference<
|
||||
typename get_result_type2<T,Event,FSM,STATE>::type>::type> type;
|
||||
};
|
||||
template <class EVT,class FSM,class SourceState,class TargetState>
|
||||
struct transition_action_result
|
||||
{
|
||||
typedef std::insert_iterator<
|
||||
typename ::boost::remove_reference<
|
||||
typename get_result_type<T,EVT,FSM,SourceState,TargetState>::type>::type> type;
|
||||
};
|
||||
typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type;
|
||||
|
||||
template <class EVT,class FSM,class SourceState,class TargetState>
|
||||
typename ::boost::enable_if<
|
||||
typename ::boost::mpl::has_key<
|
||||
typename T::tag_type,action_tag>::type,
|
||||
typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type
|
||||
operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const
|
||||
{
|
||||
return std::inserter(T()(evt,fsm,src,tgt),Pos()(evt,fsm,src,tgt));
|
||||
}
|
||||
template <class Event,class FSM,class STATE>
|
||||
typename ::boost::enable_if<
|
||||
typename ::boost::mpl::has_key<
|
||||
typename T::tag_type,state_action_tag>::type,
|
||||
typename state_action_result<Event,FSM,STATE>::type >::type
|
||||
operator()(Event const& evt,FSM& fsm,STATE& state )const
|
||||
{
|
||||
return std::inserter(T()(evt,fsm,state),Pos()(evt,fsm,state));
|
||||
}
|
||||
};
|
||||
|
||||
struct inserter_tag {};
|
||||
struct Inserter_Helper: proto::extends< proto::terminal<inserter_tag>::type, Inserter_Helper, sm_domain>
|
||||
{
|
||||
Inserter_Helper(){}
|
||||
template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5
|
||||
#ifdef BOOST_MSVC
|
||||
,class Arg6
|
||||
#endif
|
||||
>
|
||||
struct In
|
||||
{
|
||||
typedef Inserter_<Arg1,Arg2> type;
|
||||
};
|
||||
};
|
||||
Inserter_Helper const inserter_;
|
||||
|
||||
template <class Param1, class Param2, class Param3, class Param4, class Param5, class Enable=void >
|
||||
struct Transform_ : euml_action<Transform_<Param1,Param2,Param3,Param4,Param5,Enable> >
|
||||
{
|
||||
};
|
||||
|
||||
template <class Param1, class Param2, class Param3, class Param4, class Param5>
|
||||
struct Transform_<Param1,Param2,Param3,Param4,Param5,
|
||||
typename ::boost::enable_if<typename ::boost::is_same<Param5,void>::type >::type>
|
||||
: euml_action<Transform_<Param1,Param2,Param3,Param4,Param5> >
|
||||
{
|
||||
template <class Event,class FSM,class STATE >
|
||||
struct state_action_result
|
||||
{
|
||||
typedef typename get_result_type2<Param3,Event,FSM,STATE>::type type;
|
||||
};
|
||||
template <class EVT,class FSM,class SourceState,class TargetState>
|
||||
struct transition_action_result
|
||||
{
|
||||
typedef typename get_result_type<Param3,EVT,FSM,SourceState,TargetState>::type type;
|
||||
};
|
||||
typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type;
|
||||
|
||||
template <class EVT,class FSM,class SourceState,class TargetState>
|
||||
typename ::boost::enable_if<
|
||||
typename ::boost::mpl::has_key<
|
||||
typename Param1::tag_type,action_tag>::type,
|
||||
typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type
|
||||
operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const
|
||||
{
|
||||
return std::transform(Param1()(evt,fsm,src,tgt),Param2()(evt,fsm,src,tgt),Param3()(evt,fsm,src,tgt),
|
||||
Param4()(evt,fsm,src,tgt));
|
||||
}
|
||||
template <class Event,class FSM,class STATE>
|
||||
typename ::boost::enable_if<
|
||||
typename ::boost::mpl::has_key<
|
||||
typename Param1::tag_type,state_action_tag>::type,
|
||||
typename state_action_result<Event,FSM,STATE>::type >::type
|
||||
operator()(Event const& evt,FSM& fsm,STATE& state )const
|
||||
{
|
||||
return std::transform(Param1()(evt,fsm,state),Param2()(evt,fsm,state),Param3()(evt,fsm,state),
|
||||
Param4()(evt,fsm,state));
|
||||
}
|
||||
};
|
||||
|
||||
template <class Param1, class Param2, class Param3, class Param4, class Param5>
|
||||
struct Transform_<Param1,Param2,Param3,Param4,Param5,
|
||||
typename ::boost::disable_if<typename ::boost::is_same<Param5,void>::type >::type>
|
||||
: euml_action<Transform_<Param1,Param2,Param3,Param4,Param5> >
|
||||
{
|
||||
template <class Event,class FSM,class STATE >
|
||||
struct state_action_result
|
||||
{
|
||||
typedef typename get_result_type2<Param4,Event,FSM,STATE>::type type;
|
||||
};
|
||||
template <class EVT,class FSM,class SourceState,class TargetState>
|
||||
struct transition_action_result
|
||||
{
|
||||
typedef typename get_result_type<Param4,EVT,FSM,SourceState,TargetState>::type type;
|
||||
};
|
||||
typedef ::boost::mpl::set<state_action_tag,action_tag> tag_type;
|
||||
|
||||
template <class EVT,class FSM,class SourceState,class TargetState>
|
||||
typename ::boost::enable_if<
|
||||
typename ::boost::mpl::has_key<
|
||||
typename Param1::tag_type,action_tag>::type,
|
||||
typename transition_action_result<EVT,FSM,SourceState,TargetState>::type >::type
|
||||
operator()(EVT const& evt, FSM& fsm,SourceState& src,TargetState& tgt)const
|
||||
{
|
||||
return std::transform (Param1()(evt,fsm,src,tgt),Param2()(evt,fsm,src,tgt),Param3()(evt,fsm,src,tgt),
|
||||
Param4()(evt,fsm,src,tgt),Param5()(evt,fsm,src,tgt));
|
||||
}
|
||||
template <class Event,class FSM,class STATE>
|
||||
typename ::boost::enable_if<
|
||||
typename ::boost::mpl::has_key<
|
||||
typename Param1::tag_type,state_action_tag>::type,
|
||||
typename state_action_result<Event,FSM,STATE>::type >::type
|
||||
operator()(Event const& evt,FSM& fsm,STATE& state )const
|
||||
{
|
||||
return std::transform (Param1()(evt,fsm,state),Param2()(evt,fsm,state),Param3()(evt,fsm,state),
|
||||
Param4()(evt,fsm,state),Param5()(evt,fsm,state));
|
||||
}
|
||||
};
|
||||
struct transform_tag {};
|
||||
struct Transform_Helper: proto::extends< proto::terminal<transform_tag>::type, Transform_Helper, sm_domain>
|
||||
{
|
||||
Transform_Helper(){}
|
||||
template <class Arg1,class Arg2,class Arg3,class Arg4,class Arg5
|
||||
#ifdef BOOST_MSVC
|
||||
,class Arg6
|
||||
#endif
|
||||
>
|
||||
struct In
|
||||
{
|
||||
typedef Transform_<Arg1,Arg2,Arg3,Arg4,Arg5> type;
|
||||
};
|
||||
};
|
||||
Transform_Helper const transform_;
|
||||
|
||||
}}}}
|
||||
|
||||
#endif //BOOST_MSM_FRONT_EUML_TRANSFORMATION_H
|
||||
Reference in New Issue
Block a user