TuTest.cpp 876 B

1234567891011121314151617181920212223242526272829303132333435
  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. #include "TuTest.hpp"
  7. #include <boost/statechart/simple_state.hpp>
  8. #include <boost/statechart/in_state_reaction.hpp>
  9. #include <stdexcept>
  10. struct Initial : sc::simple_state< Initial, TuTest >
  11. {
  12. void Whatever( const EvX & ) {}
  13. typedef sc::in_state_reaction< EvX, Initial, &Initial::Whatever > reactions;
  14. };
  15. void TuTest::initiate()
  16. {
  17. sc::state_machine< TuTest, Initial >::initiate();
  18. }
  19. void TuTest::unconsumed_event( const sc::event_base & )
  20. {
  21. throw std::runtime_error( "Event was not consumed!" );
  22. }