1 | ////////////////////////////////////////////////////////////////////////////// |
---|---|
2 | // Copyright 2005-2006 Andreas Huber Doenni |
3 | // Distributed under the Boost Software License, Version 1.0. (See accompany- |
4 | // ing file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) |
5 | ////////////////////////////////////////////////////////////////////////////// |
6 | |
7 | |
8 | |
9 | #include <boost/statechart/state_machine.hpp> |
10 | #include <boost/statechart/simple_state.hpp> |
11 | #include <boost/statechart/event.hpp> |
12 | #include <boost/statechart/shallow_history.hpp> |
13 | #include <boost/statechart/transition.hpp> |
14 | |
15 | |
16 | |
17 | namespace sc = boost::statechart; |
18 | |
19 | |
20 | |
21 | struct EvX : sc::event< EvX > {}; |
22 | |
23 | struct A; |
24 | struct InconsistentHistoryTest : sc::state_machine< |
25 | InconsistentHistoryTest, A > {}; |
26 | |
27 | struct B; |
28 | // A only has deep history |
29 | struct A : sc::simple_state< |
30 | A, InconsistentHistoryTest, B, sc::has_deep_history > |
31 | { |
32 | typedef sc::transition< EvX, sc::shallow_history< B > > reactions; |
33 | }; |
34 | |
35 | struct B : sc::simple_state< B, A > {}; |
36 | |
37 | |
38 | int main() |
39 | { |
40 | InconsistentHistoryTest machine; |
41 | machine.initiate(); |
42 | return 0; |
43 | } |
44 |