Events.hpp 926 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. // Copyright 2010 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 EVENTS_HPP
  11. #define EVENTS_HPP
  12. // events
  13. struct play {};
  14. struct end_pause {};
  15. struct stop {};
  16. struct pause {};
  17. struct open_close {};
  18. // A "complicated" event type that carries some data.
  19. enum DiskTypeEnum
  20. {
  21. DISK_CD=0,
  22. DISK_DVD=1
  23. };
  24. struct cd_detected
  25. {
  26. cd_detected(std::string name, DiskTypeEnum diskType)
  27. : name(name),
  28. disc_type(diskType)
  29. {}
  30. std::string name;
  31. DiskTypeEnum disc_type;
  32. };
  33. #endif