ASSA::SigSet Class Reference

#include <SigSet.h>

List of all members.

Public Member Functions

 SigSet ()
 Default constructor creates SigSet object with an empty signal set.
 SigSet (sigset_t *source_)
 Copy constructor from source_.
 ~SigSet ()
 Destructor.
int empty (void)
 This function initializes a signal set to be empty, no signals in it.
int fill (void)
 This function initializes a signal set to be full; all the signals defined by POSIX will be in the set.
int add (int signo_)
 This function adds the signal numbered signo_ to the set.
int del (int signo_)
 This function removes the signal signo_ from the set.
int is_member (int signo_)
 Use this function to tell whether the signal signo_ is in the set.
 operator sigset_t * ()
 Conversion operator to sigset_t structure.

Private Attributes

sigset_t m_sigset
 POSIX signal set.


Detailed Description

Definition at line 50 of file SigSet.h.


Constructor & Destructor Documentation

ASSA::SigSet::SigSet  )  [inline]
 

Default constructor creates SigSet object with an empty signal set.

Definition at line 116 of file SigSet.h.

References m_sigset.

00116 {   (int) sigemptyset(&m_sigset); }

ASSA::SigSet::SigSet sigset_t *  source_  )  [inline]
 

Copy constructor from source_.

Definition at line 120 of file SigSet.h.

References m_sigset.

00120 { m_sigset = *s_; }

ASSA::SigSet::~SigSet  )  [inline]
 

Destructor.

Definition at line 124 of file SigSet.h.

00124 { /* no-op */ }


Member Function Documentation

int ASSA::SigSet::add int  signo_  )  [inline]
 

This function adds the signal numbered signo_ to the set.

Returns:
0 on success, -1 on error, with errno set to error number.

Definition at line 136 of file SigSet.h.

References m_sigset.

00136 { return sigaddset(&m_sigset,signo_); }

int ASSA::SigSet::del int  signo_  )  [inline]
 

This function removes the signal signo_ from the set.

Returns:
0 on success, -1 on error, with errno set to error number.

Definition at line 140 of file SigSet.h.

References m_sigset.

00140 { return sigdelset(&m_sigset,signo_); }

int ASSA::SigSet::empty void   )  [inline]
 

This function initializes a signal set to be empty, no signals in it.

Returns:
0 on success, -1 on error, with errno set to error number.

Definition at line 128 of file SigSet.h.

References m_sigset.

00128 { return sigemptyset(&m_sigset); }

int ASSA::SigSet::fill void   )  [inline]
 

This function initializes a signal set to be full; all the signals defined by POSIX will be in the set.

Returns:
0 on success, -1 on error, with errno set to error number.

Definition at line 132 of file SigSet.h.

References m_sigset.

00132 { return sigfillset(&m_sigset); }

int ASSA::SigSet::is_member int  signo_  )  [inline]
 

Use this function to tell whether the signal signo_ is in the set.

Returns:
0 on success, -1 on error, with errno set to error number.

Definition at line 144 of file SigSet.h.

References m_sigset.

00144 { return sigismember(&m_sigset,signo_); }

ASSA::SigSet::operator sigset_t *  )  [inline]
 

Conversion operator to sigset_t structure.

Returns:
pointer to the internal sigset_t structure.

Definition at line 148 of file SigSet.h.

References m_sigset.

00148 {   return &m_sigset; }


Member Data Documentation

sigset_t ASSA::SigSet::m_sigset [private]
 

POSIX signal set.

Definition at line 111 of file SigSet.h.

Referenced by add(), del(), empty(), fill(), is_member(), operator sigset_t *(), and SigSet().


The documentation for this class was generated from the following file:
Generated on Sat Dec 31 19:52:17 2005 for libassa by  doxygen 1.4.5