ASSA::SIGUSR2Handler Class Reference

Class SIGUSR2Handler handles SIGUSR2 signal. More...

#include <Handlers.h>

Inheritance diagram for ASSA::SIGUSR2Handler:

ASSA::EventHandler List of all members.

Public Member Functions

 SIGUSR2Handler ()
 Constructor.
int handle_signal (int signum_)
 Catch USR2 signal and increment count.
sig_atomic_t received_count () const
 Report count of received signals.
void resetState ()
 Set received signals count back to 0.

Private Attributes

sig_atomic_t m_count
 Received signals count.

Detailed Description

Class SIGUSR2Handler handles SIGUSR2 signal.

Definition at line 145 of file Handlers.h.


Constructor & Destructor Documentation

ASSA::SIGUSR2Handler::SIGUSR2Handler  )  [inline]
 

Constructor.

Definition at line 150 of file Handlers.h.

References ASSA::SIGHAND, and trace_with_mask.

00150                      : m_count(0) {
00151         trace_with_mask("SIGUSR2Handler::SIGUSR2Handler", SIGHAND);
00152     }


Member Function Documentation

int ASSA::SIGUSR2Handler::handle_signal int  signum_  )  [inline, virtual]
 

Catch USR2 signal and increment count.

Reimplemented from ASSA::EventHandler.

Definition at line 156 of file Handlers.h.

References DL, m_count, ASSA::SIGHAND, ASSA::TRACE, and trace_with_mask.

00156                                    {
00157         trace_with_mask("SIGUSR2Handler::handle_signal()", SIGHAND);
00158         
00159         if (signum_ == SIGUSR2) { 
00160             m_count++; 
00161             DL((TRACE, "signal count = %d\n", m_count));
00162             return 0; 
00163         }
00164         return -1;
00165     }

sig_atomic_t ASSA::SIGUSR2Handler::received_count  )  const [inline]
 

Report count of received signals.

Definition at line 169 of file Handlers.h.

References m_count.

00169 { return m_count; }

void ASSA::SIGUSR2Handler::resetState void   )  [inline, virtual]
 

Set received signals count back to 0.

Reimplemented from ASSA::EventHandler.

Definition at line 173 of file Handlers.h.

References m_count.

00173 { m_count = 0; }


Member Data Documentation

sig_atomic_t ASSA::SIGUSR2Handler::m_count [private]
 

Received signals count.

Definition at line 177 of file Handlers.h.

Referenced by handle_signal(), received_count(), and resetState().


The documentation for this class was generated from the following file:
Generated on Mon Dec 19 15:59:02 2005 for libassa by  doxygen 1.4.5