Installs handlers for interrupt signals and flips switch on receipt. More...
#include <eagine/signal_switch.hpp>
Public Member Functions | |
signal_switch () noexcept | |
Default constructor. Stores the original handlers if any. More... | |
~signal_switch () noexcept | |
Destructor. Restores the original signal handlers. | |
signal_switch (signal_switch &&)=delete | |
Not moveable. | |
signal_switch (const signal_switch &)=delete | |
Not copyable. | |
auto | operator= (signal_switch &&)=delete |
Not move-assignable. | |
auto | operator= (const signal_switch &)=delete |
Not copy-assignable. | |
auto | reset () noexcept -> signal_switch & |
Resets the signal state as if no signal was received. More... | |
auto | interrupted () const noexcept -> bool |
Indicates if the interrupt signal was received. | |
auto | terminated () const noexcept -> bool |
Indicates if the terminate signal was received. | |
operator bool () const noexcept | |
Indicates if one of the tracked signals was received. | |
Installs handlers for interrupt signals and flips switch on receipt.
This class installs handlers for the interrupt and terminate OS IPC signals and if one of the signals is received it flips a boolean indicator from false to true.
|
inlinenoexcept |
Default constructor. Stores the original handlers if any.
|
inlinenoexcept |
Resets the signal state as if no signal was received.