1 //////////////////////////////////////////////////////////////////////////////
2 // Copyright 2005-2008 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 "TuTest.hpp"
10 
11 #include <boost/statechart/simple_state.hpp>
12 #include <boost/statechart/in_state_reaction.hpp>
13 
14 #include <stdexcept>
15 
16 
17 
18 struct Initial : sc::simple_state< Initial, TuTest >
19 {
WhateverInitial20   void Whatever( const EvX & ) {}
21 
22   typedef sc::in_state_reaction< EvX, Initial, &Initial::Whatever > reactions;
23 };
24 
25 
26 
initiate()27 void TuTest::initiate()
28 {
29   sc::state_machine< TuTest, Initial >::initiate();
30 }
31 
unconsumed_event(const sc::event_base &)32 void TuTest::unconsumed_event( const sc::event_base & )
33 {
34   throw std::runtime_error( "Event was not consumed!" );
35 }
36