Image Component Library (ICL)
|
C++ Signal-Handler interface class. More...
#include <SignalHandler.h>
Static Public Member Functions | |
static void | install (const std::string &id, Function< void, const std::string & > handler, const std::string &signalList="SIGINT,SIGTERM,SIGSEGV", int orderPercent=0) |
this cannot be instantiated manually! Use SignalHandler::install instead More... | |
static void | uninstall (const std::string &id) |
Private Member Functions | |
SignalHandler () | |
Create a new Signal handler with a list of signals. More... | |
C++ Signal-Handler interface class.
Just create an own signal handler class, implement its handleSignal() function and create a static object of that signal handler.
example:
The handleSignal() function must not exit the program. This will be done auomatically.
|
private |
Create a new Signal handler with a list of signals.
The default parameters can be used to catch some common signals that may occur, when the program is uncommonly killed.
signals | comma-separated list of string representations of the following Q_SIGNALS:
|
|
static |
this cannot be instantiated manually! Use SignalHandler::install instead
installs a handler to the given signals! several handlers can be installed to the same signals. If a handler is installed twice under the same ID, the handler installation is skipped!
orderPercent | can be used to define an execution order of signal handlers Handlers with a higher value of orderPercent are triggered later The value 100 is used for shutting down the global QApplication, which usually ends Qt's event loop, so it should not be used. |
|
static |