Provide a C++ wrapper for the C sigset_t interface. More...
#include <Signal.h>
Public Member Functions | |
| ACE_Sig_Set (sigset_t *sigset) | |
| ACE_Sig_Set (ACE_Sig_Set *sigset) | |
| ACE_Sig_Set (int fill=0) | |
| ~ACE_Sig_Set (void) | |
| int | empty_set (void) |
| Create a set that excludes all signals defined by the system. | |
| int | fill_set (void) |
| Create a set that includes all signals defined by the system. | |
| int | sig_add (int signo) |
| Adds the individual signal specified by signo to the set. | |
| int | sig_del (int signo) |
| Deletes the individual signal specified by signo from the set. | |
| int | is_member (int signo) const |
| Checks whether the signal specified by signo is in the set. | |
| operator sigset_t * () | |
Returns a pointer to the underlying sigset_t. | |
| sigset_t | sigset (void) const |
Returns a copy of the underlying sigset_t. | |
| void | dump (void) const |
| Dump the state of an object. | |
Public Attributes | |
| ACE_ALLOC_HOOK_DECLARE | |
| Declare the dynamic allocation hooks. | |
Private Attributes | |
| sigset_t | sigset_ |
| Set of signals. | |
Provide a C++ wrapper for the C sigset_t interface.
Handle signals via a more elegant C++ interface (e.g., doesn't require the use of global variables or global functions in an application).
Definition at line 45 of file Signal.h.
| ACE_Sig_Set::ACE_Sig_Set | ( | sigset_t * | sigset | ) |
Initialize <sigset_> with sigset. If sigset == 0 then fill the set.
Definition at line 14 of file Signal.inl.
: sigset_ () { ACE_TRACE ("ACE_Sig_Set::ACE_Sig_Set"); if (ss == 0) ACE_OS::sigfillset (&this->sigset_); else // Structure assignment. this->sigset_ = *ss; }
| ACE_Sig_Set::ACE_Sig_Set | ( | ACE_Sig_Set * | sigset | ) |
Initialize <sigset_> with sigset. If sigset == 0 then fill the set.
Definition at line 39 of file Signal.inl.
: sigset_ () { ACE_TRACE ("ACE_Sig_Set::ACE_Sig_Set"); if (ss == 0) ACE_OS::sigfillset (&this->sigset_); else this->sigset_ = ss->sigset_; }
| ACE_Sig_Set::ACE_Sig_Set | ( | int | fill = 0 |
) |
If fill == 0 then initialize the <sigset_> to be empty, else full.
Definition at line 27 of file Signal.inl.
: sigset_ () { ACE_TRACE ("ACE_Sig_Set::ACE_Sig_Set"); if (fill) ACE_OS::sigfillset (&this->sigset_); else ACE_OS::sigemptyset (&this->sigset_); }
| ACE_Sig_Set::~ACE_Sig_Set | ( | void | ) |
Definition at line 27 of file Signal.cpp.
{
ACE_TRACE ("ACE_Sig_Set::~ACE_Sig_Set");
ACE_OS::sigemptyset (&this->sigset_);
}
| void ACE_Sig_Set::dump | ( | void | ) | const |
Dump the state of an object.
Definition at line 60 of file Signal.cpp.
{
#if defined (ACE_HAS_DUMP)
ACE_TRACE ("ACE_Sig_Set::dump");
#endif /* ACE_HAS_DUMP */
}
| int ACE_Sig_Set::empty_set | ( | void | ) |
Create a set that excludes all signals defined by the system.
Definition at line 51 of file Signal.inl.
{
ACE_TRACE ("ACE_Sig_Set::empty_set");
return ACE_OS::sigemptyset (&this->sigset_);
}
| int ACE_Sig_Set::fill_set | ( | void | ) |
Create a set that includes all signals defined by the system.
Definition at line 58 of file Signal.inl.
{
ACE_TRACE ("ACE_Sig_Set::fill_set");
return ACE_OS::sigfillset (&this->sigset_);
}
| int ACE_Sig_Set::is_member | ( | int | signo | ) | const |
Checks whether the signal specified by signo is in the set.
Definition at line 79 of file Signal.inl.
{
ACE_TRACE ("ACE_Sig_Set::is_member");
return ACE_OS::sigismember (const_cast<sigset_t *> (&this->sigset_), signo);
}
| ACE_Sig_Set::operator sigset_t * | ( | void | ) |
Returns a pointer to the underlying sigset_t.
Definition at line 86 of file Signal.inl.
| int ACE_Sig_Set::sig_add | ( | int | signo | ) |
Adds the individual signal specified by signo to the set.
Definition at line 65 of file Signal.inl.
{
ACE_TRACE ("ACE_Sig_Set::sig_add");
return ACE_OS::sigaddset (&this->sigset_, signo);
}
| int ACE_Sig_Set::sig_del | ( | int | signo | ) |
Deletes the individual signal specified by signo from the set.
Definition at line 72 of file Signal.inl.
{
ACE_TRACE ("ACE_Sig_Set::sig_del");
return ACE_OS::sigdelset (&this->sigset_, signo);
}
| sigset_t ACE_Sig_Set::sigset | ( | void | ) | const |
Returns a copy of the underlying sigset_t.
Definition at line 93 of file Signal.inl.
sigset_t ACE_Sig_Set::sigset_ [private] |
1.7.0