ASSA::SIGALRMHandler Class Reference

Class SIGALRMHandler handles SIGALRM signal. More...

#include <Handlers.h>

Inheritance diagram for ASSA::SIGALRMHandler:

ASSA::EventHandler

List of all members.

Public Member Functions

 SIGALRMHandler ()
 Constructor.
int handle_signal (int signum_)
 Receive ALRM signal.
sig_atomic_t alarmed ()
 Has alarm gone off?
void resetState ()
 Reset internal state.

Private Attributes

sig_atomic_t m_alarm_flag
 Indicator whether alarm gone off yet.


Detailed Description

Class SIGALRMHandler handles SIGALRM signal.

Definition at line 221 of file Handlers.h.


Constructor & Destructor Documentation

ASSA::SIGALRMHandler::SIGALRMHandler (  )  [inline]

Constructor.

Definition at line 225 of file Handlers.h.

References ASSA::SIGHAND, and trace_with_mask.

00225                      : m_alarm_flag(0) {
00226         trace_with_mask("SIGALRMHandler::SIGALRMHandler", SIGHAND);
00227     }


Member Function Documentation

int ASSA::SIGALRMHandler::handle_signal ( int  signum_  )  [inline, virtual]

Receive ALRM signal.

Reimplemented from ASSA::EventHandler.

Definition at line 231 of file Handlers.h.

References ASSA::SIGHAND, and trace_with_mask.

00231                                    {
00232         trace_with_mask("SIGALRMHandler::handle_signal", SIGHAND);
00233 
00234         if (signum_ == SIGALRM) {
00235             m_alarm_flag = 1; // notice that we have seen alarm
00236             return 0;
00237         }
00238         return -1;
00239     }

sig_atomic_t ASSA::SIGALRMHandler::alarmed (  )  [inline]

Has alarm gone off?

Definition at line 242 of file Handlers.h.

00242 { return m_alarm_flag; }

void ASSA::SIGALRMHandler::resetState ( void   )  [inline, virtual]

Reset internal state.

Reimplemented from ASSA::EventHandler.

Definition at line 245 of file Handlers.h.

00245 { m_alarm_flag = 0; }


Member Data Documentation

sig_atomic_t ASSA::SIGALRMHandler::m_alarm_flag [private]

Indicator whether alarm gone off yet.

Definition at line 249 of file Handlers.h.


The documentation for this class was generated from the following file:
Generated on Mon Nov 5 08:02:14 2007 for libassa by  doxygen 1.5.3-20071008