Dali 3D User Interface Engine
List of all members | Public Member Functions | Private Types | Private Member Functions | Static Private Member Functions | Private Attributes | Static Private Attributes
Dali::Internal::Adaptor::AbortHandler Class Reference

Class to listen to system signals and trigger an abort callback when they occur. More...

#include <abort-handler.h>

Collaboration diagram for Dali::Internal::Adaptor::AbortHandler:
Collaboration graph

Public Member Functions

 AbortHandler (CallbackBase *callback)
 Constructor. More...
 ~AbortHandler ()
 Destructor. More...
bool AbortOnSignal (int signum)
 Add a signal you want to be handled by this abort handler. More...

Private Types

typedef void(* SignalHandlerFuncPtr )(int)

Private Member Functions

 AbortHandler ()
 Default constructor - undefined. More...
 AbortHandler (const AbortHandler &rhs)
 Copy constructor - undefined. More...
AbortHandleroperator= (const AbortHandler &rhs)
 Assignment operator - undefined. More...

Static Private Member Functions

static void SignalHandler (int signum)
 Signal handler - Called when signal is received. More...

Private Attributes

SignalHandlerFuncPtr mSignalOldHandlers [_NSIG-1]
unsigned long long mSignalMask

Static Private Attributes

static AbortHandlergInstance

Detailed Description

Class to listen to system signals and trigger an abort callback when they occur.

This class maintains a process wide singleton, as the signal(2) system call is process specific, not thread specific.

Currently, this precludes having multiple DALi instances in the same process.

Definition at line 44 of file abort-handler.h.

Member Typedef Documentation

typedef void(* Dali::Internal::Adaptor::AbortHandler::SignalHandlerFuncPtr)(int)

Definition at line 89 of file abort-handler.h.

Constructor & Destructor Documentation

Dali::Internal::Adaptor::AbortHandler::AbortHandler ( CallbackBase callback)


[in]callbackThe function to call when abort signals occur
The ownership of callback is passed onto this class.

Definition at line 33 of file abort-handler.cpp.

References DALI_ASSERT_ALWAYS, gInstance, and mSignalOldHandlers.

Dali::Internal::Adaptor::AbortHandler::~AbortHandler ( )


Definition at line 43 of file abort-handler.cpp.

References gInstance, mCallback, mSignalMask, and mSignalOldHandlers.

Dali::Internal::Adaptor::AbortHandler::AbortHandler ( )

Default constructor - undefined.

Dali::Internal::Adaptor::AbortHandler::AbortHandler ( const AbortHandler rhs)

Copy constructor - undefined.

Member Function Documentation

bool Dali::Internal::Adaptor::AbortHandler::AbortOnSignal ( int  signum)

Add a signal you want to be handled by this abort handler.

[in]signumThe signal number (from signum.h)
true if the signal handler was installed ok

Definition at line 59 of file abort-handler.cpp.

References mSignalMask, mSignalOldHandlers, and SignalHandler().

Here is the call graph for this function:

AbortHandler& Dali::Internal::Adaptor::AbortHandler::operator= ( const AbortHandler rhs)

Assignment operator - undefined.

void Dali::Internal::Adaptor::AbortHandler::SignalHandler ( int  signum)

Signal handler - Called when signal is received.

Stops the application.

Definition at line 77 of file abort-handler.cpp.

References Dali::CallbackBase::Execute(), gInstance, and mCallback.

Referenced by AbortOnSignal().

Here is the call graph for this function:

Here is the caller graph for this function:

Member Data Documentation

AbortHandler * Dali::Internal::Adaptor::AbortHandler::gInstance

Definition at line 97 of file abort-handler.h.

Referenced by AbortHandler(), SignalHandler(), and ~AbortHandler().

CallbackBase* Dali::Internal::Adaptor::AbortHandler::mCallback

Definition at line 95 of file abort-handler.h.

Referenced by SignalHandler(), and ~AbortHandler().

unsigned long long Dali::Internal::Adaptor::AbortHandler::mSignalMask

Definition at line 93 of file abort-handler.h.

Referenced by AbortOnSignal(), and ~AbortHandler().

SignalHandlerFuncPtr Dali::Internal::Adaptor::AbortHandler::mSignalOldHandlers[_NSIG-1]

Definition at line 92 of file abort-handler.h.

Referenced by AbortHandler(), AbortOnSignal(), and ~AbortHandler().

The documentation for this class was generated from the following files:
Dali Docs Home
Read more about Dali