libassa 3.5.1
|
SigHandlersList class. More...
#include <SigHandlersList.h>
Classes | |
struct | CompSHL |
Public Types | |
typedef EventHandler * | key_type |
typedef EventHandler * | data_type |
typedef set< key_type, CompSHL > | set_t |
typedef set< key_type, CompSHL >::iterator | iterator |
Public Member Functions | |
~SigHandlersList () | |
Destructor. | |
bool | empty () const |
Is list empty. | |
size_t | size () const |
Size of the list. | |
bool | insert (data_type data_) |
Add an event handler data_ to the list. | |
void | erase (const key_type key_) |
Find and remove event handler key_ from the list. | |
void | erase (iterator it_) |
Remove an event handler pointed by iterator it_ from the list. | |
void | erase () |
Empty event handlers' list. | |
iterator | begin () |
Return an iterator pointing to the beginning of the list. | |
iterator | end () |
Return an iterator pointing to the end of the list. | |
iterator | find (const key_type key_) |
Find event handler by its pointer key_. | |
CFUNC_Handler * | cfunc_handler (CFUNC_Handler *cfp_) |
Save 3rd party C function handler to remember. | |
CFUNC_Handler * | cfunc_handler () const |
Retrieve pointer to 3rd party C function handler. | |
void | seen_cfunc_handler (bool ft_) |
Indicate whether 3rd party C function handler was installed. | |
bool | seen_cfunc_handler () const |
Static Public Member Functions | |
static SigHandlersList * | instance (int signum_) |
Retrieve a pointer to the list of event handlers listening to signum_ signal delivery. | |
Static Public Attributes | |
static SigHandlersList * | m_instance [NSIG] |
Static map of signal numbers to SigHandlerLists. | |
Protected Member Functions | |
SigHandlersList () | |
SigHandlersList (const SigHandlersList &map_) | |
SigHandlersList & | operator= (const SigHandlersList &map_) |
Private Attributes | |
set_t * | m_set |
Set of all event handlers registered for this signal. | |
int | m_seen_cfh |
If true this flag indicates that 3rd party event handler has already been installed prior taking control by SigHandlers manager. | |
CFUNC_Handler * | m_cfhp |
Pointer to the 3rd party signal handler in the set. | |
SigHandlersList class.
SigHandlersList class is used by SigHandlers class to keep track of EventHandlers installed to be called on signal's delivery. It is sort of global process map of signal numbers into corresponding sets of EventHandlers that are listening for signal delivery.
Definition at line 65 of file SigHandlersList.h.
Definition at line 69 of file SigHandlersList.h.
typedef set<key_type,CompSHL>::iterator ASSA::SigHandlersList::iterator |
Definition at line 82 of file SigHandlersList.h.
Definition at line 68 of file SigHandlersList.h.
Definition at line 81 of file SigHandlersList.h.
|
inline |
Destructor.
Definition at line 191 of file SigHandlersList.h.
References erase(), m_set, ASSA::SIGHAND, and trace_with_mask.
|
inlineprotected |
Definition at line 181 of file SigHandlersList.h.
References m_set, ASSA::SIGHAND, and trace_with_mask.
Referenced by instance().
|
protected |
|
inline |
Return an iterator pointing to the beginning of the list.
Definition at line 299 of file SigHandlersList.h.
References m_set, ASSA::SIGHAND, and trace_with_mask.
|
inline |
Retrieve pointer to 3rd party C function handler.
Definition at line 339 of file SigHandlersList.h.
References m_cfhp, ASSA::SIGHAND, and trace_with_mask.
|
inline |
Save 3rd party C function handler to remember.
cfp_ | New 3rd party C function handler. If it is NULL, then seen_cfh flag is set to FALSE. |
Definition at line 327 of file SigHandlersList.h.
References m_cfhp, m_seen_cfh, ASSA::SIGHAND, and trace_with_mask.
|
inline |
Is list empty.
Definition at line 218 of file SigHandlersList.h.
References m_set, ASSA::SIGHAND, and trace_with_mask.
|
inline |
Return an iterator pointing to the end of the list.
Definition at line 308 of file SigHandlersList.h.
References m_set, ASSA::SIGHAND, and trace_with_mask.
|
inline |
Empty event handlers' list.
Definition at line 279 of file SigHandlersList.h.
References m_set, ASSA::SIGHAND, and trace_with_mask.
Referenced by ~SigHandlersList().
Find and remove event handler key_ from the list.
Definition at line 269 of file SigHandlersList.h.
References m_set, ASSA::SIGHAND, and trace_with_mask.
Remove an event handler pointed by iterator it_ from the list.
Definition at line 289 of file SigHandlersList.h.
References m_set, ASSA::SIGHAND, and trace_with_mask.
|
inline |
Find event handler by its pointer key_.
Definition at line 317 of file SigHandlersList.h.
References m_set, ASSA::SIGHAND, and trace_with_mask.
Add an event handler data_ to the list.
Definition at line 240 of file SigHandlersList.h.
References m_set, ASSA::SIGHAND, and trace_with_mask.
|
inlinestatic |
Retrieve a pointer to the list of event handlers listening to signum_ signal delivery.
Definition at line 202 of file SigHandlersList.h.
References ASSA::APP, DL, m_instance, ASSA::SIGHAND, SigHandlersList(), and trace_with_mask.
Referenced by ASSA::SigHandlers::dispatch(), ASSA::SigHandlers::install(), and ASSA::SigHandlers::remove().
|
protected |
|
inline |
Definition at line 357 of file SigHandlersList.h.
References m_seen_cfh, ASSA::SIGHAND, and trace_with_mask.
Indicate whether 3rd party C function handler was installed.
ft_ | TRUE if was, FALSE if not. |
Definition at line 348 of file SigHandlersList.h.
References m_seen_cfh, ASSA::SIGHAND, and trace_with_mask.
|
inline |
Size of the list.
Definition at line 229 of file SigHandlersList.h.
References m_set, ASSA::SIGHAND, and trace_with_mask.
|
private |
Pointer to the 3rd party signal handler in the set.
Definition at line 173 of file SigHandlersList.h.
Referenced by cfunc_handler(), and cfunc_handler().
|
static |
Static map of signal numbers to SigHandlerLists.
Definition at line 159 of file SigHandlersList.h.
Referenced by instance().
|
private |
If true this flag indicates that 3rd party event handler has already been installed prior taking control by SigHandlers manager.
Definition at line 169 of file SigHandlersList.h.
Referenced by cfunc_handler(), seen_cfunc_handler(), and seen_cfunc_handler().
|
private |
Set of all event handlers registered for this signal.
Definition at line 163 of file SigHandlersList.h.
Referenced by begin(), empty(), end(), erase(), erase(), erase(), find(), insert(), SigHandlersList(), size(), and ~SigHandlersList().