TuTest.hpp 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. #ifndef BOOST_STATECHART_TEST_TU_TEST_HPP_INCLUDED
  2. #define BOOST_STATECHART_TEST_TU_TEST_HPP_INCLUDED
  3. //////////////////////////////////////////////////////////////////////////////
  4. // Copyright 2005-2006 Andreas Huber Doenni
  5. // Distributed under the Boost Software License, Version 1.0. (See accompany-
  6. // ing file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  7. //////////////////////////////////////////////////////////////////////////////
  8. #include <boost/statechart/event.hpp>
  9. #include <boost/statechart/state_machine.hpp>
  10. #include <boost/config.hpp>
  11. #ifdef BOOST_STATECHART_TEST_DYNAMIC_LINK
  12. #ifdef BOOST_STATECHART_TEST_DLL_EXPORT
  13. #define BOOST_STATECHART_DECL BOOST_SYMBOL_EXPORT
  14. #else
  15. #define BOOST_STATECHART_DECL BOOST_SYMBOL_IMPORT
  16. #endif
  17. #endif
  18. #ifndef BOOST_STATECHART_DECL
  19. #define BOOST_STATECHART_DECL
  20. #endif
  21. namespace sc = boost::statechart;
  22. #ifdef BOOST_MSVC
  23. # pragma warning( push )
  24. // class X needs to have dll-interface to be used by clients of class Y
  25. # pragma warning( disable: 4251 )
  26. // non dll-interface class X used as base for dll-interface class
  27. # pragma warning( disable: 4275 )
  28. #endif
  29. struct BOOST_STATECHART_DECL EvX : sc::event< EvX > {};
  30. struct BOOST_STATECHART_DECL EvY : sc::event< EvY > {};
  31. struct Initial;
  32. struct BOOST_STATECHART_DECL TuTest : sc::state_machine< TuTest, Initial >
  33. {
  34. void initiate();
  35. void unconsumed_event( const sc::event_base & );
  36. };
  37. #ifdef BOOST_MSVC
  38. # pragma warning( pop )
  39. #endif
  40. #endif