fix doc example typo
[boost.git] / boost / asio / detail / timer_queue_base.hpp
blob1d986c08aedfa1978bbcf675b9ad339aeb8706c4
1 //
2 // timer_queue_base.hpp
3 // ~~~~~~~~~~~~~~~~~~~~
4 //
5 // Copyright (c) 2003-2008 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 //
11 #ifndef BOOST_ASIO_DETAIL_TIMER_QUEUE_BASE_HPP
12 #define BOOST_ASIO_DETAIL_TIMER_QUEUE_BASE_HPP
14 #if defined(_MSC_VER) && (_MSC_VER >= 1200)
15 # pragma once
16 #endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
18 #include <boost/asio/detail/push_options.hpp>
20 #include <boost/asio/detail/socket_types.hpp> // Must come before posix_time.
22 #include <boost/asio/detail/push_options.hpp>
23 #include <boost/date_time/posix_time/posix_time_types.hpp>
24 #include <boost/asio/detail/pop_options.hpp>
26 #include <boost/asio/detail/noncopyable.hpp>
28 namespace boost {
29 namespace asio {
30 namespace detail {
32 class timer_queue_base
33 : private noncopyable
35 public:
36 // Destructor.
37 virtual ~timer_queue_base() {}
39 // Whether there are no timers in the queue.
40 virtual bool empty() const = 0;
42 // Get the time to wait until the next timer.
43 virtual boost::posix_time::time_duration wait_duration() const = 0;
45 // Dispatch all ready timers.
46 virtual void dispatch_timers() = 0;
48 // Dispatch any pending cancels for timers.
49 virtual void dispatch_cancellations() = 0;
51 // Complete all timers that are waiting to be completed.
52 virtual void complete_timers() = 0;
54 // Destroy all timers.
55 virtual void destroy_timers() = 0;
58 } // namespace detail
59 } // namespace asio
60 } // namespace boost
62 #include <boost/asio/detail/pop_options.hpp>
64 #endif // BOOST_ASIO_DETAIL_TIMER_QUEUE_BASE_HPP