common_types.hpp 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. // Copyright 2008 Christophe Henry
  2. // henry UNDERSCORE christophe AT hotmail DOT com
  3. // This is an extended version of the state machine available in the boost::mpl library
  4. // Distributed under the same license as the original.
  5. // Copyright for the original version:
  6. // Copyright 2005 David Abrahams and Aleksey Gurtovoy. Distributed
  7. // under the Boost Software License, Version 1.0. (See accompanying
  8. // file LICENSE_1_0.txt or copy at
  9. // http://www.boost.org/LICENSE_1_0.txt)
  10. #ifndef BOOST_MSM_COMMON_TYPES_H
  11. #define BOOST_MSM_COMMON_TYPES_H
  12. #include <boost/tuple/tuple.hpp>
  13. #include <boost/msm/common.hpp>
  14. namespace boost { namespace msm { namespace back
  15. {
  16. // used for disable_if
  17. template <int> struct dummy { dummy(int) {} };
  18. // return value for transition handling
  19. typedef enum
  20. {
  21. HANDLED_FALSE=0,
  22. HANDLED_TRUE =1,
  23. HANDLED_GUARD_REJECT=2,
  24. HANDLED_DEFERRED=4
  25. } HandledEnum;
  26. typedef HandledEnum execute_return;
  27. // source of event provided to RTC algorithm
  28. enum EventSourceEnum
  29. {
  30. EVENT_SOURCE_DEFAULT=0,
  31. EVENT_SOURCE_DIRECT=1,
  32. EVENT_SOURCE_DEFERRED=2,
  33. EVENT_SOURCE_MSG_QUEUE=4
  34. };
  35. typedef unsigned char EventSource;
  36. }}}
  37. #endif //BOOST_MSM_COMMON_TYPES_H