Files
statechart/test/InvalidTransitionTest4.cpp
Andreas Huber fc9d6004a1 - Changed the library namespace from fsm to statechart
- Changed the library name from boost::fsm to Boost.Statechart


[SVN r28788]
2005-05-10 18:24:35 +00:00

49 lines
1.2 KiB
C++

//////////////////////////////////////////////////////////////////////////////
// (c) Copyright Andreas Huber Doenni 2004-2005
// Distributed under the Boost Software License, Version 1.0. (See accompany-
// ing file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//////////////////////////////////////////////////////////////////////////////
#include <boost/statechart/state_machine.hpp>
#include <boost/statechart/simple_state.hpp>
#include <boost/statechart/event.hpp>
#include <boost/statechart/transition.hpp>
#include <boost/statechart/deep_history.hpp>
namespace sc = boost::statechart;
struct EvX : sc::event< EvX > {};
struct Active;
struct InvalidTransitionTest : sc::state_machine<
InvalidTransitionTest, Active > {};
struct Idle0;
struct Active : sc::simple_state< Active, InvalidTransitionTest,
sc::no_reactions, Idle0, sc::has_deep_history >
{
};
struct Running0 : sc::simple_state< Running0, Active > {};
// Invalid transition to deep history from a state residing on the same
// level as the history connector.
struct Idle0 : sc::simple_state< Idle0, Active,
sc::transition< EvX, sc::deep_history< Running0 > > >
{
};
int main()
{
InvalidTransitionTest machine;
machine.initiate();
return 0;
}