Loading...
Searching...
No Matches
ASSA::CFUNC_Handler Class Reference

CFUNC_Handler class. More...

`#include <SigHandlersList.h>`

Inheritance diagram for ASSA::CFUNC_Handler:

## Public Member Functions

| CFUNC_Handler (C_SIG_HANDLER csigh_)
int | handle_signal (int signum_)
| Signal handler callback.
C_SIG_HANDLER | handler ()
Public Member Functions inherited from ASSA::EventHandler
| EventHandler ()
| Constructor.
virtual | ~EventHandler ()
| Virtual destructor.
virtual int | handle_read (int fd)
| Read event callback.
virtual int | handle_write (int fd)
| Write handler callback.
virtual int | handle_except (int fd)
| Exception handler callback.
virtual int | handle_timeout (TimerId tid)
| Timeout handler callback.
virtual int | handle_close (int fd)
| EOF on peer socket handler callback.
virtual void | resetState (void)
| A hook for derived class to reset internal state as needed.
void | set_id (const std::string &id_)
| Set EventHandler ID.
std::string | get_id () const
| Retrieve EventHandler ID.

## Private Attributes

C_SIG_HANDLER | m_c_sig_hand

## Additional Inherited Members

Protected Attributes inherited from ASSA::EventHandler
std::string | m_id

## Detailed Description

CFUNC_Handler class.

CFUNC_Handler is a wrapper around C signal handler function. It wraps C signal handler function into EventHandler interface.

Definition at line 44 of file SigHandlersList.h.

## Constructor & Destructor Documentation

## CFUNC_Handler()

ASSA::CFUNC_Handler::CFUNC_Handler | ( | C_SIG_HANDLER | csigh_ | ) |

inline

Definition at line 370 of file SigHandlersList.h.

: m_c_sig_hand (csigh_)
{
trace_with_mask("CFUNC_Handler::CFUNC_Handler", SIGHAND);
}
trace_with_mask
#define trace_with_mask(s, m)
trace_with_mask() is used to trace function call chain in C++ program.
Definition Logger.h:437
ASSA::CFUNC_Handler::m_c_sig_hand
C_SIG_HANDLER m_c_sig_hand
Definition SigHandlersList.h:53
ASSA::SIGHAND
@ SIGHAND
Class SigHandler(s) messages
Definition LogMask.h:38

References ASSA::SIGHAND, and trace_with_mask.

## Member Function Documentation

## handle_signal()

int ASSA::CFUNC_Handler::handle_signal | ( | int | signum_ | ) |

inline virtual

Signal handler callback.

Returns
  0 on success, -1 on error

Reimplemented from ASSA::EventHandler.

Definition at line 378 of file SigHandlersList.h.

{
trace_with_mask("CFUNC_Handler::handle_signal", SIGHAND);
if (m_c_sig_hand) {
(*m_c_sig_hand)(signum_);
}
return 1;
}

References m_c_sig_hand, ASSA::SIGHAND, and trace_with_mask.

## handler()

C_SIG_HANDLER ASSA::CFUNC_Handler::handler | ( |  | ) |

inline

Definition at line 50 of file SigHandlersList.h.

{ return m_c_sig_hand; }

References m_c_sig_hand.

## Member Data Documentation

## m_c_sig_hand

C_SIG_HANDLER ASSA::CFUNC_Handler::m_c_sig_hand

private

Definition at line 53 of file SigHandlersList.h.

Referenced by handle_signal(), and handler().

The documentation for this class was generated from the following file:

- SigHandlersList.h