FEDEM Solver  R8.0
Source code of the dynamics solver
Static Public Member Functions | Static Protected Member Functions | Static Protected Attributes | List of all members
SignalHandler Class Reference

Static class with methods for signal handling. More...

#include <SignalHandler.H>

Static Public Member Functions

static void init (const char *program, VoidFuncPtr f1=NULL, VoidFuncPtr f2=NULL, VoidFuncPtr f3=NULL)
 Initializes the signal handler. More...
 

Static Protected Member Functions

static void processSignal (int sig)
 Invokes the appropriate exit method based on the given signal. More...
 
static void dummy ()
 Empty dummy method (used for function pointer initialization). More...
 

Static Protected Attributes

static VoidFuncPtr emergencyExit = &SignalHandler::dummy
 Function to invoke when exiting without saving. More...
 
static VoidFuncPtr emergencySaveExit = &SignalHandler::dummy
 Function to invoke when exiting with save. More...
 
static VoidFuncPtr killAllChilds = &SignalHandler::dummy
 Function to invoke when sub-processes should go away also. More...
 
static std::string myProgName = "Fedem"
 Name of executable. More...
 

Detailed Description

Static class with methods for signal handling.

Member Function Documentation

◆ dummy()

static void SignalHandler::dummy ( )
inlinestaticprotected

Empty dummy method (used for function pointer initialization).

◆ init()

void SignalHandler::init ( const char *  program,
VoidFuncPtr  f1 = NULL,
VoidFuncPtr  f2 = NULL,
VoidFuncPtr  f3 = NULL 
)
static

Initializes the signal handler.

Parameters
[in]programName of executable
[in]f1Function to invoke when exiting without saving
[in]f2Function to invoke when exiting with save
[in]f3Function to invoke when sub-processes should go away also

◆ processSignal()

void SignalHandler::processSignal ( int  sig)
staticprotected

Invokes the appropriate exit method based on the given signal.

Member Data Documentation

◆ emergencyExit

VoidFuncPtr SignalHandler::emergencyExit = &SignalHandler::dummy
staticprotected

Function to invoke when exiting without saving.

◆ emergencySaveExit

VoidFuncPtr SignalHandler::emergencySaveExit = &SignalHandler::dummy
staticprotected

Function to invoke when exiting with save.

◆ killAllChilds

VoidFuncPtr SignalHandler::killAllChilds = &SignalHandler::dummy
staticprotected

Function to invoke when sub-processes should go away also.

◆ myProgName

std::string SignalHandler::myProgName = "Fedem"
staticprotected

Name of executable.


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