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 void reset ()
 Resets the signal handler to default behaviour. More...
 

Static Protected Member Functions

static void processSignal (int sig)
 Invokes the appropriate exit method based on the given signal. More...
 

Static Protected Attributes

static VoidFuncPtr emergencyExit = [](){}
 Function to invoke when exiting without saving. More...
 
static VoidFuncPtr emergencySaveExit = [](){}
 Function to invoke when exiting with save. More...
 
static VoidFuncPtr killAllChilds = [](){}
 Function to invoke when sub-processes should go away also. More...
 
static std::string myProgName
 Name of executable. More...
 

Detailed Description

Static class with methods for signal handling.

Member Function Documentation

◆ 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.

◆ reset()

void SignalHandler::reset ( )
static

Resets the signal handler to default behaviour.

Member Data Documentation

◆ emergencyExit

VoidFuncPtr SignalHandler::emergencyExit = [](){}
staticprotected

Function to invoke when exiting without saving.

◆ emergencySaveExit

VoidFuncPtr SignalHandler::emergencySaveExit = [](){}
staticprotected

Function to invoke when exiting with save.

◆ killAllChilds

VoidFuncPtr SignalHandler::killAllChilds = [](){}
staticprotected

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

◆ myProgName

std::string SignalHandler::myProgName
staticprotected

Name of executable.


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