Realistic 3D camera system
3D camera system components
timer_queue_base.hpp
Go to the documentation of this file.
1 //
2 // detail/timer_queue_base.hpp
3 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~
4 //
5 // Copyright (c) 2003-2015 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 
11 #ifndef ASIO_DETAIL_TIMER_QUEUE_BASE_HPP
12 #define ASIO_DETAIL_TIMER_QUEUE_BASE_HPP
13 
14 #if defined(_MSC_VER) && (_MSC_VER >= 1200)
15 # pragma once
16 #endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
17 
18 #include "asio/detail/config.hpp"
20 #include "asio/detail/op_queue.hpp"
22 
24 
25 namespace asio {
26 namespace detail {
27 
29  : private noncopyable
30 {
31 public:
32  // Constructor.
33  timer_queue_base() : next_(0) {}
34 
35  // Destructor.
36  virtual ~timer_queue_base() {}
37 
38  // Whether there are no timers in the queue.
39  virtual bool empty() const = 0;
40 
41  // Get the time to wait until the next timer.
42  virtual long wait_duration_msec(long max_duration) const = 0;
43 
44  // Get the time to wait until the next timer.
45  virtual long wait_duration_usec(long max_duration) const = 0;
46 
47  // Dequeue all ready timers.
48  virtual void get_ready_timers(op_queue<operation>& ops) = 0;
49 
50  // Dequeue all timers.
51  virtual void get_all_timers(op_queue<operation>& ops) = 0;
52 
53 private:
54  friend class timer_queue_set;
55 
56  // Next timer queue in the set.
57  timer_queue_base* next_;
58 };
59 
60 template <typename Time_Traits>
61 class timer_queue;
62 
63 } // namespace detail
64 } // namespace asio
65 
67 
68 #endif // ASIO_DETAIL_TIMER_QUEUE_BASE_HPP
virtual long wait_duration_msec(long max_duration) const =0
virtual void get_ready_timers(op_queue< operation > &ops)=0
virtual bool empty() const =0
virtual void get_all_timers(op_queue< operation > &ops)=0
virtual long wait_duration_usec(long max_duration) const =0