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

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

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 ( EventLoop loop = 0 )
inlineexplicit

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

Member Function Documentation

timeout_handler_ptr ServiceContext::add_timeout ( const timeout_handler handler_fun,
const TimeValue timeout,
const bool  once 
)
inline
void ServiceContext::clear_timeouts ( )
inline
timeout_map::size_type ServiceContext::count_timeouts ( ) const
inline
EventLoop& ServiceContext::event_loop ( )
inline

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

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

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.