asio 0.3.8rc3 Home | Reference | Tutorial | Examples | Design
Reference Class Hierarchy | Class Index | Member Index

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

Inherits asio::io_service::service.

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

Inheritance graph
List of all members.

Detailed Description

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

Default service implementation for a timer.


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 implementation_defined 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.
asio::io_serviceio_service ()
 Get the io_service object that owns the service.

Static Public Attributes

static asio::io_service::id id
 The unique service identifier.


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.

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.

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.

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

The implementation type of the deadline timer.


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  )  [explicit]

Construct a new timer service for the specified io_service.


Member Function Documentation

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

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

Implements asio::io_service::service.

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

Construct a new timer implementation.

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

Destroy a timer implementation.

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 
)

Cancel any asynchronous wait operations associated with the timer.

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

Get the expiry time for the timer as an absolute time.

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 
)

Set the expiry time for the timer as an absolute time.

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

Get the expiry time for the timer relative to now.

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 
)

Set the expiry time for the timer relative to now.

asio::io_service & asio::io_service::service::io_service (  )  [inherited]

Get the io_service object that owns the service.


Member Data Documentation

template<typename TimeType, typename TimeTraits = asio::time_traits<TimeType>>
asio::io_service::id asio::deadline_timer_service< TimeType, TimeTraits >::id [static]

The unique service identifier.

asio 0.3.8rc3 Home | Reference | Tutorial | Examples | Design