impl::SignalTrap Class Reference
Inheritance diagram for impl::SignalTrap:
Collaboration diagram for impl::SignalTrap:

## Public Types

enum class | Scope { process , thread }
enum class | State { not_running , running }

## Public Member Functions

| SignalTrap (Scope scope, std::initializer_list< core::posix::Signal > blocked_signals)
| ~SignalTrap ()
bool | has (core::posix::Signal signal) override
| Returns true if the given signal is trapped by this instance.
void | run () override
| Starts observation of incoming signals, relaying them via signal_raised(). The call blocks until stop is called.
void | stop () override
| Stops execution of the signal trap.
core::Signal< core::posix::Signal > & | signal_raised () override
| Emitted whenever a trapped signal is raised by the operating system.
Public Member Functions inherited from core::posix::SignalTrap
| SignalTrap (const SignalTrap &)=delete
SignalTrap & | operator= (const SignalTrap &)=delete
bool | operator== (const SignalTrap &) const =delete

## Additional Inherited Members

Protected Member Functions inherited from core::posix::SignalTrap
| SignalTrap ()=default

## Detailed Description

Definition at line 42 of file signal.cpp.

## Member Enumeration Documentation

## Scope

enum class impl::SignalTrap::Scope

strong

Enumerator
process |
thread |

Definition at line 45 of file signal.cpp.

## State

enum class impl::SignalTrap::State

strong

Enumerator
not_running |
running |

Definition at line 51 of file signal.cpp.

## Constructor & Destructor Documentation

## SignalTrap()

impl::SignalTrap::SignalTrap | ( | Scope | scope,
|  | std::initializer_list< core::posix::Signal > | blocked_signals )

inline

Definition at line 57 of file signal.cpp.

References process, impl::set_process_signal_mask(), impl::set_thread_signal_mask(), and thread.

Here is the call graph for this function:

## ~SignalTrap()

impl::SignalTrap::~SignalTrap | ( |  | ) |

inline virtual

Reimplemented from core::posix::SignalTrap.

Definition at line 81 of file signal.cpp.

References process, impl::set_process_signal_mask(), impl::set_thread_signal_mask(), and thread.

Here is the call graph for this function:

## Member Function Documentation

## has()

bool impl::SignalTrap::has | ( | core::posix::Signal | signal | ) |

inline override virtual

Returns true if the given signal is trapped by this instance.

Implements core::posix::SignalTrap.

Definition at line 96 of file signal.cpp.

Referenced by run().

## run()

void impl::SignalTrap::run | ( |  | ) |

inline override virtual

Starts observation of incoming signals, relaying them via signal_raised(). The call blocks until stop is called.

Implements core::posix::SignalTrap.

Definition at line 101 of file signal.cpp.

References has(), not_running, and running.

Here is the call graph for this function:

## signal_raised()

core::Signal< core::posix::Signal > & impl::SignalTrap::signal_raised | ( |  | ) |

inline override virtual

Emitted whenever a trapped signal is raised by the operating system.

Implements core::posix::SignalTrap.

Definition at line 187 of file signal.cpp.

## stop()

void impl::SignalTrap::stop | ( |  | ) |

inline override virtual

Stops execution of the signal trap.

Implements core::posix::SignalTrap.

Definition at line 180 of file signal.cpp.

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

- signal.cpp