# VectorNav C++ Library: vn::xplat::Signal Class Reference

vn::xplat::Signal Class Reference

Provides access to system signals. More...

`#include <signal.h>`

## Classes

class | Observer
| Allows for other objects to listen for signal events. More...

## Public Types

enum | SignalType { UNKNOWN, CTRL_C }
| The available signals. More...
typedef bool(* | HandleSignalFunc) (Signal signal)
| Typedef for a function that can handle signal notifications. More...

## Static Public Member Functions

static void | RegisterForSignalNotifications (HandleSignalFunc handleFunc)
| Allows registering to receive notifications of system signals. More...
static void | UnregisterForSignalNotifications (HandleSignalFunc handleFunc)
| Allows unregistering from receiving signal notifications. More...
static void | RegisterSignalObserver (Observer *observer)
| Allows registering an observer for notification when a signal is received. More...
static void | UnregisterSignalObserver (Observer *observer)
| Allows unregistering of an observer from being notified when a signal is received. More...

## Detailed Description

Provides access to system signals.

## Member Typedef Documentation

typedef bool(* vn::xplat::Signal::HandleSignalFunc) (Signal signal)

Typedef for a function that can handle signal notifications.

Parameters

  [in] | signal | The signal type received.

Returns
  Indicates if the signal was handled or not.

## Member Enumeration Documentation

enum vn::xplat::Signal::SignalType

The available signals.

Enumerator
UNKNOWN | Unknown type of signal.
CTRL_C | User pressed Ctrl-C.

## Member Function Documentation

static void vn::xplat::Signal::RegisterForSignalNotifications | ( | HandleSignalFunc | handleFunc | ) |

static

Allows registering to receive notifications of system signals.

Parameters

  [in] | handleFunc | Function to call when signals are received.

static void vn::xplat::Signal::RegisterSignalObserver | ( | Observer * | observer | ) |

static

Allows registering an observer for notification when a signal is received.

Parameters

  [in] | observer | The observer to register.

static void vn::xplat::Signal::UnregisterForSignalNotifications | ( | HandleSignalFunc | handleFunc | ) |

static

Allows unregistering from receiving signal notifications.

Parameters

  [in] | handleFunc | The function to unregister.

static void vn::xplat::Signal::UnregisterSignalObserver | ( | Observer * | observer | ) |

static

Allows unregistering of an observer from being notified when a signal is received.

Parameters

  [in] | observer | The observer to unregister.

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

- include/vn/signal.h