asio::deadline_timer_service< TimeType, TimeTraits > Class Template Reference

Default service implementation for a timer. More...

#include <deadline_timer_service.hpp>

Inheritance diagram for asio::deadline_timer_service< TimeType, TimeTraits >:

asio::detail::service_base< Type > asio::io_service::service

List of all members.

Public Types

typedef TimeTraits traits_type
 The time traits type.
typedef traits_type::time_type time_type
 The time type.
typedef traits_type::duration_type duration_type
 The duration type.
typedef
service_impl_type::implementation_type 
implementation_type
 The implementation type of the deadline timer.

Public Member Functions

 deadline_timer_service (asio::io_service &io_service)
 Construct a new timer service for the specified io_service.
void shutdown_service ()
 Destroy all user-defined handler objects owned by the service.
void construct (implementation_type &impl)
 Construct a new timer implementation.
void destroy (implementation_type &impl)
 Destroy a timer implementation.
std::size_t cancel (implementation_type &impl, asio::error_code &ec)
 Cancel any asynchronous wait operations associated with the timer.
time_type expires_at (const implementation_type &impl) const
 Get the expiry time for the timer as an absolute time.
std::size_t expires_at (implementation_type &impl, const time_type &expiry_time, asio::error_code &ec)
 Set the expiry time for the timer as an absolute time.
duration_type expires_from_now (const implementation_type &impl) const
 Get the expiry time for the timer relative to now.
std::size_t expires_from_now (implementation_type &impl, const duration_type &expiry_time, asio::error_code &ec)
 Set the expiry time for the timer relative to now.
void wait (implementation_type &impl, asio::error_code &ec)
template<typename WaitHandler>
void async_wait (implementation_type &impl, WaitHandler handler)

Private Types

typedef
detail::deadline_timer_service
< traits_type,
detail::select_reactor< false > > 
service_impl_type

Private Attributes

service_impl_typeservice_impl_


Detailed Description

template<typename TimeType, typename TimeTraits = asio::time_traits<TimeType>>
class asio::deadline_timer_service< TimeType, TimeTraits >

Default service implementation for a timer.

Definition at line 38 of file deadline_timer_service.hpp.


Member Typedef Documentation

template<typename TimeType, typename TimeTraits = asio::time_traits<TimeType>>
typedef TimeTraits asio::deadline_timer_service< TimeType, TimeTraits >::traits_type

The time traits type.

Definition at line 53 of file deadline_timer_service.hpp.

template<typename TimeType, typename TimeTraits = asio::time_traits<TimeType>>
typedef traits_type::time_type asio::deadline_timer_service< TimeType, TimeTraits >::time_type

The time type.

Definition at line 56 of file deadline_timer_service.hpp.

template<typename TimeType, typename TimeTraits = asio::time_traits<TimeType>>
typedef traits_type::duration_type asio::deadline_timer_service< TimeType, TimeTraits >::duration_type

The duration type.

Definition at line 59 of file deadline_timer_service.hpp.

template<typename TimeType, typename TimeTraits = asio::time_traits<TimeType>>
typedef detail::deadline_timer_service< traits_type, detail::select_reactor<false> > asio::deadline_timer_service< TimeType, TimeTraits >::service_impl_type [private]

Definition at line 74 of file deadline_timer_service.hpp.

template<typename TimeType, typename TimeTraits = asio::time_traits<TimeType>>
typedef service_impl_type::implementation_type asio::deadline_timer_service< TimeType, TimeTraits >::implementation_type

The implementation type of the deadline timer.

Definition at line 82 of file deadline_timer_service.hpp.


Constructor & Destructor Documentation

template<typename TimeType, typename TimeTraits = asio::time_traits<TimeType>>
asio::deadline_timer_service< TimeType, TimeTraits >::deadline_timer_service ( asio::io_service io_service  )  [inline, explicit]

Construct a new timer service for the specified io_service.

Definition at line 86 of file deadline_timer_service.hpp.


Member Function Documentation

template<typename TimeType, typename TimeTraits = asio::time_traits<TimeType>>
void asio::deadline_timer_service< TimeType, TimeTraits >::shutdown_service (  )  [inline, virtual]

Destroy all user-defined handler objects owned by the service.

Implements asio::io_service::service.

Definition at line 94 of file deadline_timer_service.hpp.

template<typename TimeType, typename TimeTraits = asio::time_traits<TimeType>>
void asio::deadline_timer_service< TimeType, TimeTraits >::construct ( implementation_type impl  )  [inline]

template<typename TimeType, typename TimeTraits = asio::time_traits<TimeType>>
void asio::deadline_timer_service< TimeType, TimeTraits >::destroy ( implementation_type impl  )  [inline]

template<typename TimeType, typename TimeTraits = asio::time_traits<TimeType>>
std::size_t asio::deadline_timer_service< TimeType, TimeTraits >::cancel ( implementation_type impl,
asio::error_code ec 
) [inline]

Cancel any asynchronous wait operations associated with the timer.

Definition at line 111 of file deadline_timer_service.hpp.

References asio::detail::deadline_timer_service< Time_Traits, Timer_Scheduler >::cancel(), and asio::deadline_timer_service< TimeType, TimeTraits >::service_impl_.

template<typename TimeType, typename TimeTraits = asio::time_traits<TimeType>>
time_type asio::deadline_timer_service< TimeType, TimeTraits >::expires_at ( const implementation_type impl  )  const [inline]

template<typename TimeType, typename TimeTraits = asio::time_traits<TimeType>>
std::size_t asio::deadline_timer_service< TimeType, TimeTraits >::expires_at ( implementation_type impl,
const time_type expiry_time,
asio::error_code ec 
) [inline]

template<typename TimeType, typename TimeTraits = asio::time_traits<TimeType>>
duration_type asio::deadline_timer_service< TimeType, TimeTraits >::expires_from_now ( const implementation_type impl  )  const [inline]

template<typename TimeType, typename TimeTraits = asio::time_traits<TimeType>>
std::size_t asio::deadline_timer_service< TimeType, TimeTraits >::expires_from_now ( implementation_type impl,
const duration_type expiry_time,
asio::error_code ec 
) [inline]

template<typename TimeType, typename TimeTraits = asio::time_traits<TimeType>>
void asio::deadline_timer_service< TimeType, TimeTraits >::wait ( implementation_type impl,
asio::error_code ec 
) [inline]

template<typename TimeType, typename TimeTraits = asio::time_traits<TimeType>>
template<typename WaitHandler>
void asio::deadline_timer_service< TimeType, TimeTraits >::async_wait ( implementation_type impl,
WaitHandler  handler 
) [inline]


Member Data Documentation

template<typename TimeType, typename TimeTraits = asio::time_traits<TimeType>>
service_impl_type& asio::deadline_timer_service< TimeType, TimeTraits >::service_impl_ [private]


The documentation for this class was generated from the following file:

Generated on Sun May 25 00:21:28 2008 by  doxygen 1.5.6