ESPResSo
Extensible Simulation Package for Research on Soft Matter Systems
Loading...
Searching...
No Matches
SignalHandler Class Reference

RAII guard for signal handling. More...

#include <signalhandling.hpp>

Public Member Functions

 SignalHandler (SignalHandler &&)=delete
 
SignalHandleroperator= (SignalHandler &&)=delete
 
 SignalHandler (SignalHandler const &)=delete
 
SignalHandleroperator= (SignalHandler const &)=delete
 
 SignalHandler (int signal, void(*handler)(int))
 Constructor.
 
 ~SignalHandler ()
 Destructor.
 

Detailed Description

RAII guard for signal handling.

This object saves the current signal handler for signal, replaces it with a custom handler handler and restores it on destruction.

Definition at line 34 of file signalhandling.hpp.

Constructor & Destructor Documentation

◆ SignalHandler() [1/3]

SignalHandler::SignalHandler ( SignalHandler &&  )
delete

◆ SignalHandler() [2/3]

SignalHandler::SignalHandler ( SignalHandler const &  )
delete

◆ SignalHandler() [3/3]

SignalHandler::SignalHandler ( int  signal,
void(*)(int)  handler 
)
inline

Constructor.

Parameters
[in]signalNumber of signal to replace
[in]handlerFunction to handle the signal

Definition at line 49 of file signalhandling.hpp.

References runtimeErrorMsg.

◆ ~SignalHandler()

SignalHandler::~SignalHandler ( )
inline

Destructor.

Restores the handler which was active at the time of construction.

Definition at line 65 of file signalhandling.hpp.

References runtimeErrorMsg.

Member Function Documentation

◆ operator=() [1/2]

SignalHandler & SignalHandler::operator= ( SignalHandler &&  )
delete

◆ operator=() [2/2]

SignalHandler & SignalHandler::operator= ( SignalHandler const &  )
delete

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