process-cpp: core::posix::SignalTrap Class Reference

process-cpp 3.0.0 A simple convenience library for handling processes in C++11.

Public Member Functions | Protected Member Functions | List of all members
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. More...
virtual void | run ()=0
| Starts observation of incoming signals, relaying them via signal_raised(). The call blocks until stop is called. More...
virtual void | stop ()=0
| Stops execution of the signal trap. More...
virtual core::Signal< Signal > & | signal_raised ()=0
| Emitted whenever a trapped signal is raised by the operating system. More...

## 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 | ( |  | ) |
| virtualdefault

Reimplemented in impl::SignalTrap.

## ◆ SignalTrap() [2/2]

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

## 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().

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

- /build/process-cpp/src/process-cpp-3.0.1/include/core/posix/signal.h