#include <handler_service.h>
Public Member Functions | |
| handler_service (kernel::module &module) | |
| ~handler_service () | |
| void | stop (void) |
Private Types | |
| typedef std::set< handler * > | handlers |
Private Member Functions | |
| handler_service (const handler_service &) | |
| handler_service & | operator= (const handler_service &) |
| handler_provider * | _add_handler (handler *handler) |
| void | _start_handler (handler *handler) |
| void | _stop_handler (handler *handler) |
Private Attributes | |
| bool | _stop |
| size_t | _handler_count |
| event::service & | _service |
| int | _pipe [2] |
| threading::mutex | _handler_mutex |
| handlers | _handlers |
Friends | |
| class | handler |
This class manages a set of handlers, making sure they are all removed during destruction.
Definition at line 43 of file handler_service.h.
typedef std::set<handler*> scalestack::event::handler_service::handlers [private] |
Definition at line 96 of file handler_service.h.
| scalestack::event::handler_service::handler_service | ( | kernel::module & | module | ) |
Constructor for event handler service.
| [in] | module | Module that the handler service is associated with. |
Definition at line 49 of file handler_service.cc.
| scalestack::event::handler_service::~handler_service | ( | ) |
Definition at line 63 of file handler_service.cc.
| scalestack::event::handler_service::handler_service | ( | const handler_service & | ) | [private] |
Don't allow copying of objects.
| void scalestack::event::handler_service::stop | ( | void | ) |
Stop the handler service by removing all associated handlers. This can block and should most likely only be used in derived class destructors.
Definition at line 70 of file handler_service.cc.
| handler_service& scalestack::event::handler_service::operator= | ( | const handler_service & | ) | [private] |
Don't allow assignment of objects.
| handler_provider * scalestack::event::handler_service::_add_handler | ( | handler * | handler | ) | [inline, private] |
Definition at line 112 of file handler_service.h.
| void scalestack::event::handler_service::_start_handler | ( | handler * | handler | ) | [private] |
Start a handler on the event service.
| [in] | handler | Event handler to start. |
Definition at line 94 of file handler_service.cc.
| void scalestack::event::handler_service::_stop_handler | ( | handler * | handler | ) | [private] |
Stop a handler on the event service.
| [in] | handler | Event handler to stop. |
Definition at line 113 of file handler_service.cc.
friend class handler [friend] |
Definition at line 105 of file handler_service.h.
bool scalestack::event::handler_service::_stop [private] |
Definition at line 98 of file handler_service.h.
size_t scalestack::event::handler_service::_handler_count [private] |
Definition at line 99 of file handler_service.h.
Definition at line 100 of file handler_service.h.
int scalestack::event::handler_service::_pipe[2] [private] |
Definition at line 101 of file handler_service.h.
Definition at line 102 of file handler_service.h.
Definition at line 103 of file handler_service.h.
1.6.3