ASSA::SIGUSR1Handler Class Reference

Class SIGUSR1Handler. More...

#include <Handlers.h>

Inheritance diagram for ASSA::SIGUSR1Handler:

Inheritance graph
[legend]
Collaboration diagram for ASSA::SIGUSR1Handler:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 SIGUSR1Handler ()
 Constructor.
int handle_signal (int signum_)
 Catch USR1 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 SIGUSR1Handler.

Handle SIGUSR1 signal.

Definition at line 112 of file Handlers.h.


Constructor & Destructor Documentation

ASSA::SIGUSR1Handler::SIGUSR1Handler  )  [inline]
 

Constructor.

Definition at line 117 of file Handlers.h.

References ASSA::SIGHAND, and trace_with_mask.

00117                      : m_count(0) {
00118         trace_with_mask("SIGUSR1Handler::SIGUSR1Handler", SIGHAND);
00119     }


Member Function Documentation

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

Catch USR1 signal and increment count.

Reimplemented from ASSA::EventHandler.

Definition at line 123 of file Handlers.h.

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

00123                                    {
00124         trace_with_mask("SIGUSR1Handler::handle_signal()", SIGHAND);
00125         
00126         if (signum_ == SIGUSR1) { 
00127             m_count++; 
00128             DL((TRACE, "signal count = %d\n", m_count));
00129             return 0; 
00130         }
00131         return -1;
00132     }

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

Report count of received signals.

Definition at line 136 of file Handlers.h.

References m_count.

00136 { return m_count; }

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

Set received signals count back to 0.

Reimplemented from ASSA::EventHandler.

Definition at line 140 of file Handlers.h.

References m_count.

00140 { m_count = 0; }


Member Data Documentation

sig_atomic_t ASSA::SIGUSR1Handler::m_count [private]
 

Received signals count.

Definition at line 144 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 Sun Aug 13 15:08:20 2006 for libassa by  doxygen 1.4.6