Savarese Software Research Corporation
ServiceContext Class Reference

#include <service.h>

Classes

class   TimeoutHandler
 

Public Types

typedef std::shared_ptr< TimeoutHandler timeout_handler_ptr
 
typedef boost::multi_index_container< timeout_handler_ptr, boost::multi_index::indexed_by< boost::multi_index::hashed_unique< boost::multi_index::const_mem_fun< TimeoutHandler, const TimeoutHandler *, &TimeoutHandler::address > > > >  timeout_map
 

Public Member Functions

  ServiceContext (EventLoop *loop=0)
 
timeout_map::size_type  count_timeouts () const
 
void  clear_timeouts ()
 
timeout_handler_ptr  add_timeout (const timeout_handler &handler_fun, const TimeValue &timeout, const bool once)
 
void  remove_timeout (TimeoutHandler *timeout)
 
EventLoop event_loop ()
 

Detailed Description

Definition at line 98 of file service/service.h.

Member Typedef Documentation

§ timeout_handler_ptr

Definition at line 137 of file service/service.h.

§ timeout_map

typedef boost::multi_index_container< timeout_handler_ptr, boost::multi_index::indexed_by< boost::multi_index::hashed_unique< boost::multi_index::const_mem_fun<TimeoutHandler, const TimeoutHandler *, &TimeoutHandler::address> > > > ServiceContext::timeout_map

Definition at line 146 of file service/service.h.

Constructor & Destructor Documentation

§ ServiceContext()

ServiceContext::ServiceContext ( EventLoop loop = 0 )
inlineexplicit

Definition at line 154 of file service/service.h.

Member Function Documentation

§ add_timeout()

timeout_handler_ptr ServiceContext::add_timeout ( const timeout_handler handler_fun,
const TimeValue timeout,
const bool  once 
)
inline

Definition at line 166 of file service/service.h.

References EventLoop::None.

§ clear_timeouts()

void ServiceContext::clear_timeouts ( )
inline

Definition at line 160 of file service/service.h.

§ count_timeouts()

timeout_map::size_type ServiceContext::count_timeouts ( ) const
inline

Definition at line 156 of file service/service.h.

§ event_loop()

EventLoop& ServiceContext::event_loop ( )
inline

Definition at line 182 of file service/service.h.

Referenced by ServiceContext::TimeoutHandler::execute().

§ remove_timeout()

void ServiceContext::remove_timeout ( TimeoutHandler timeout )
inline

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

Savarese Software Research Corporation
Copyright © 2006-2012 Savarese Software Research Corporation. All rights reserved.