Boost  v1.57.0
doxygen for www.boost.org
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
boost::asio::waitable_timer_service< Clock, WaitTraits > Class Template Reference

Default service implementation for a timer. More...

#include <waitable_timer_service.hpp>

Inheritance diagram for boost::asio::waitable_timer_service< Clock, WaitTraits >:
Collaboration diagram for boost::asio::waitable_timer_service< Clock, WaitTraits >:

Public Types

typedef Clock clock_type
 The clock type. More...
 
typedef clock_type::duration duration
 The duration type of the clock. More...
 
typedef clock_type::time_point time_point
 The time point type of the clock. More...
 
typedef WaitTraits traits_type
 The wait traits type. More...
 
typedef
service_impl_type::implementation_type 
implementation_type
 The implementation type of the waitable timer. More...
 

Public Member Functions

 waitable_timer_service (boost::asio::io_service &io_service)
 Construct a new timer service for the specified io_service. More...
 
void construct (implementation_type &impl)
 Construct a new timer implementation. More...
 
void destroy (implementation_type &impl)
 Destroy a timer implementation. More...
 
std::size_t cancel (implementation_type &impl, boost::system::error_code &ec)
 Cancel any asynchronous wait operations associated with the timer. More...
 
std::size_t cancel_one (implementation_type &impl, boost::system::error_code &ec)
 Cancels one asynchronous wait operation associated with the timer. More...
 
time_point expires_at (const implementation_type &impl) const
 Get the expiry time for the timer as an absolute time. More...
 
std::size_t expires_at (implementation_type &impl, const time_point &expiry_time, boost::system::error_code &ec)
 Set the expiry time for the timer as an absolute time. More...
 
duration expires_from_now (const implementation_type &impl) const
 Get the expiry time for the timer relative to now. More...
 
std::size_t expires_from_now (implementation_type &impl, const duration &expiry_time, boost::system::error_code &ec)
 Set the expiry time for the timer relative to now. More...
 
void wait (implementation_type &impl, boost::system::error_code &ec)
 
template<typename WaitHandler >
 BOOST_ASIO_INITFN_RESULT_TYPE (WaitHandler, void(boost::system::error_code)) async_wait(implementation_type &impl
 
 BOOST_ASIO_MOVE_ARG (WaitHandler) handler)
 
boost::asio::io_serviceget_io_service ()
 Get the io_service object that owns the service. More...
 

Static Public Attributes

static
boost::asio::detail::service_id
< waitable_timer_service
< Clock, WaitTraits > > 
id
 

Detailed Description

template<typename Clock, typename WaitTraits = boost::asio::wait_traits<Clock>>
class boost::asio::waitable_timer_service< Clock, WaitTraits >

Default service implementation for a timer.

Member Typedef Documentation

template<typename Clock , typename WaitTraits = boost::asio::wait_traits<Clock>>
typedef Clock boost::asio::waitable_timer_service< Clock, WaitTraits >::clock_type

The clock type.

template<typename Clock , typename WaitTraits = boost::asio::wait_traits<Clock>>
typedef clock_type::duration boost::asio::waitable_timer_service< Clock, WaitTraits >::duration

The duration type of the clock.

template<typename Clock , typename WaitTraits = boost::asio::wait_traits<Clock>>
typedef service_impl_type::implementation_type boost::asio::waitable_timer_service< Clock, WaitTraits >::implementation_type

The implementation type of the waitable timer.

template<typename Clock , typename WaitTraits = boost::asio::wait_traits<Clock>>
typedef clock_type::time_point boost::asio::waitable_timer_service< Clock, WaitTraits >::time_point

The time point type of the clock.

template<typename Clock , typename WaitTraits = boost::asio::wait_traits<Clock>>
typedef WaitTraits boost::asio::waitable_timer_service< Clock, WaitTraits >::traits_type

The wait traits type.

Constructor & Destructor Documentation

template<typename Clock , typename WaitTraits = boost::asio::wait_traits<Clock>>
boost::asio::waitable_timer_service< Clock, WaitTraits >::waitable_timer_service ( boost::asio::io_service io_service)
inlineexplicit

Construct a new timer service for the specified io_service.

Member Function Documentation

template<typename Clock , typename WaitTraits = boost::asio::wait_traits<Clock>>
template<typename WaitHandler >
boost::asio::waitable_timer_service< Clock, WaitTraits >::BOOST_ASIO_INITFN_RESULT_TYPE ( WaitHandler  ,
void(boost::system::error_code  
)
template<typename Clock , typename WaitTraits = boost::asio::wait_traits<Clock>>
boost::asio::waitable_timer_service< Clock, WaitTraits >::BOOST_ASIO_MOVE_ARG ( WaitHandler  )
inline
template<typename Clock , typename WaitTraits = boost::asio::wait_traits<Clock>>
std::size_t boost::asio::waitable_timer_service< Clock, WaitTraits >::cancel ( implementation_type impl,
boost::system::error_code ec 
)
inline

Cancel any asynchronous wait operations associated with the timer.

template<typename Clock , typename WaitTraits = boost::asio::wait_traits<Clock>>
std::size_t boost::asio::waitable_timer_service< Clock, WaitTraits >::cancel_one ( implementation_type impl,
boost::system::error_code ec 
)
inline

Cancels one asynchronous wait operation associated with the timer.

template<typename Clock , typename WaitTraits = boost::asio::wait_traits<Clock>>
void boost::asio::waitable_timer_service< Clock, WaitTraits >::construct ( implementation_type impl)
inline

Construct a new timer implementation.

template<typename Clock , typename WaitTraits = boost::asio::wait_traits<Clock>>
void boost::asio::waitable_timer_service< Clock, WaitTraits >::destroy ( implementation_type impl)
inline

Destroy a timer implementation.

template<typename Clock , typename WaitTraits = boost::asio::wait_traits<Clock>>
time_point boost::asio::waitable_timer_service< Clock, WaitTraits >::expires_at ( const implementation_type impl) const
inline

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

template<typename Clock , typename WaitTraits = boost::asio::wait_traits<Clock>>
std::size_t boost::asio::waitable_timer_service< Clock, WaitTraits >::expires_at ( implementation_type impl,
const time_point expiry_time,
boost::system::error_code ec 
)
inline

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

template<typename Clock , typename WaitTraits = boost::asio::wait_traits<Clock>>
duration boost::asio::waitable_timer_service< Clock, WaitTraits >::expires_from_now ( const implementation_type impl) const
inline

Get the expiry time for the timer relative to now.

template<typename Clock , typename WaitTraits = boost::asio::wait_traits<Clock>>
std::size_t boost::asio::waitable_timer_service< Clock, WaitTraits >::expires_from_now ( implementation_type impl,
const duration expiry_time,
boost::system::error_code ec 
)
inline

Set the expiry time for the timer relative to now.

boost::asio::io_service& boost::asio::io_service::service::get_io_service ( )
inherited

Get the io_service object that owns the service.

template<typename Clock , typename WaitTraits = boost::asio::wait_traits<Clock>>
void boost::asio::waitable_timer_service< Clock, WaitTraits >::wait ( implementation_type impl,
boost::system::error_code ec 
)
inline

Member Data Documentation

boost::asio::detail::service_id<waitable_timer_service< Clock, WaitTraits > > boost::asio::detail::service_base< waitable_timer_service< Clock, WaitTraits > >::id
staticinherited

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