core::posix::SignalTrap Class Referenceabstract

The SignalTrap class encapsulates functionality to trap and handle signals. More...

`#include <signal.h>`

Inheritance diagram for core::posix::SignalTrap:
Collaboration diagram for core::posix::SignalTrap:

## Public Member Functions

| SignalTrap (const SignalTrap &)=delete
virtual | ~SignalTrap ()=default
SignalTrap & | operator= (const SignalTrap &)=delete
bool | operator== (const SignalTrap &) const =delete
virtual bool | has (Signal signal)=0
| Returns true if the given signal is trapped by this instance.
virtual void | run ()=0
| Starts observation of incoming signals, relaying them via signal_raised(). The call blocks until stop is called.
virtual void | stop ()=0
| Stops execution of the signal trap.
virtual core::Signal< Signal > & | signal_raised ()=0
| Emitted whenever a trapped signal is raised by the operating system.

## Protected Member Functions

| SignalTrap ()=default

## Detailed Description

The SignalTrap class encapsulates functionality to trap and handle signals.

Definition at line 65 of file signal.h.

## Constructor & Destructor Documentation

## SignalTrap() [1/2]

core::posix::SignalTrap::SignalTrap | ( | const SignalTrap & |  | ) |

delete

## ~SignalTrap()

virtual core::posix::SignalTrap::~SignalTrap | ( |  | ) |

virtual default

Reimplemented in impl::SignalTrap.

## SignalTrap() [2/2]

core::posix::SignalTrap::SignalTrap | ( |  | ) |

protected default

## Member Function Documentation

## has()

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

pure virtual

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

Implemented in impl::SignalTrap.

## operator=()

SignalTrap & core::posix::SignalTrap::operator= | ( | const SignalTrap & |  | ) |

delete

## operator==()

bool core::posix::SignalTrap::operator== | ( | const SignalTrap & |  | ) | const

delete

## run()

virtual void core::posix::SignalTrap::run | ( |  | ) |

pure virtual

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

Implemented in impl::SignalTrap.

## signal_raised()

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

pure virtual

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

Implemented in impl::SignalTrap.

## stop()

virtual void core::posix::SignalTrap::stop | ( |  | ) |

pure virtual

Stops execution of the signal trap.

Implemented in impl::SignalTrap.

Referenced by TEST_F(), and TEST_F().

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

- signal.h