timer_queue_base.hpp
Go to the documentation of this file.
00001 //
00002 // timer_queue_base.hpp
00003 // ~~~~~~~~~~~~~~~~~~~~
00004 //
00005 // Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com)
00006 //
00007 // Distributed under the Boost Software License, Version 1.0. (See accompanying
00008 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
00009 //
00010 
00011 #ifndef ASIO_DETAIL_TIMER_QUEUE_BASE_HPP
00012 #define ASIO_DETAIL_TIMER_QUEUE_BASE_HPP
00013 
00014 #if defined(_MSC_VER) && (_MSC_VER >= 1200)
00015 # pragma once
00016 #endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
00017 
00018 #include "asio/detail/push_options.hpp"
00019 
00020 #include "asio/detail/socket_types.hpp" // Must come before posix_time.
00021 
00022 #include "asio/detail/push_options.hpp"
00023 #include <boost/date_time/posix_time/posix_time_types.hpp>
00024 #include "asio/detail/pop_options.hpp"
00025 
00026 #include "asio/detail/noncopyable.hpp"
00027 
00028 namespace asio {
00029 namespace detail {
00030 
00031 class timer_queue_base
00032   : private noncopyable
00033 {
00034 public:
00035   // Destructor.
00036   virtual ~timer_queue_base() {}
00037 
00038   // Whether there are no timers in the queue.
00039   virtual bool empty() const = 0;
00040 
00041   // Get the time to wait until the next timer.
00042   virtual boost::posix_time::time_duration wait_duration() const = 0;
00043 
00044   // Dispatch all ready timers.
00045   virtual void dispatch_timers() = 0;
00046 
00047   // Dispatch any pending cancels for timers.
00048   virtual void dispatch_cancellations() = 0;
00049 
00050   // Complete all timers that are waiting to be completed.
00051   virtual void complete_timers() = 0;
00052 
00053   // Destroy all timers.
00054   virtual void destroy_timers() = 0;
00055 };
00056 
00057 } // namespace detail
00058 } // namespace asio
00059 
00060 #include "asio/detail/pop_options.hpp"
00061 
00062 #endif // ASIO_DETAIL_TIMER_QUEUE_BASE_HPP
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines


Castor
Author(s): Carpe Noctem
autogenerated on Fri Nov 8 2013 11:05:39