/Src/Dependencies/Boost/boost/asio/detail/null_event.hpp

http://hadesmem.googlecode.com/ · C++ Header · 77 lines · 45 code · 17 blank · 15 comment · 2 complexity · d68d0b6ee354bffadf26586db3beaccc MD5 · raw file

  1. //
  2. // detail/null_event.hpp
  3. // ~~~~~~~~~~~~~~~~~~~~~
  4. //
  5. // Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com)
  6. //
  7. // Distributed under the Boost Software License, Version 1.0. (See accompanying
  8. // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  9. //
  10. #ifndef BOOST_ASIO_DETAIL_NULL_EVENT_HPP
  11. #define BOOST_ASIO_DETAIL_NULL_EVENT_HPP
  12. #if defined(_MSC_VER) && (_MSC_VER >= 1200)
  13. # pragma once
  14. #endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
  15. #include <boost/asio/detail/config.hpp>
  16. #if !defined(BOOST_HAS_THREADS) || defined(BOOST_ASIO_DISABLE_THREADS)
  17. #include <boost/asio/detail/noncopyable.hpp>
  18. #include <boost/asio/detail/push_options.hpp>
  19. namespace boost {
  20. namespace asio {
  21. namespace detail {
  22. class null_event
  23. : private noncopyable
  24. {
  25. public:
  26. // Constructor.
  27. null_event()
  28. {
  29. }
  30. // Destructor.
  31. ~null_event()
  32. {
  33. }
  34. // Signal the event.
  35. template <typename Lock>
  36. void signal(Lock&)
  37. {
  38. }
  39. // Signal the event and unlock the mutex.
  40. template <typename Lock>
  41. void signal_and_unlock(Lock&)
  42. {
  43. }
  44. // Reset the event.
  45. template <typename Lock>
  46. void clear(Lock&)
  47. {
  48. }
  49. // Wait for the event to become signalled.
  50. template <typename Lock>
  51. void wait(Lock&)
  52. {
  53. }
  54. };
  55. } // namespace detail
  56. } // namespace asio
  57. } // namespace boost
  58. #include <boost/asio/detail/pop_options.hpp>
  59. #endif // !defined(BOOST_HAS_THREADS) || defined(BOOST_ASIO_DISABLE_THREADS)
  60. #endif // BOOST_ASIO_DETAIL_NULL_EVENT_HPP