Public Types | Public Member Functions | Static Public Member Functions | Static Private Member Functions | Static Private Attributes | List of all members
signal_handler::SignalHandler Class Reference

Signal handling. More...

#include <SignalHandler.hpp>

Public Types

using Handler = std::function< void(int)>
 

Public Member Functions

 SignalHandler ()=delete
 

Static Public Member Functions

template<typename T >
static void bind (int signal, void(T::*fp)(int), T *object)
 
static void bind (int signal, const Handler &handler)
 
template<typename T >
static void bindAll (void(T::*fp)(int), T *object)
 
template<typename T >
static void unbind (int signal, void(T::*fp)(int), T *object)
 
static void unbind (int signal, const Handler &handler)
 
template<typename T >
static void unbindAll (void(T::*fp)(int), T *object)
 

Static Private Member Functions

static void signaled (int signal)
 

Static Private Attributes

static std::map< int, std::list< Handler > > handlers_
 
static std::mutex mutex_
 

Detailed Description

Signal handling.

This class provides a static interface to bind a common process signal handler.

Definition at line 20 of file SignalHandler.hpp.

Member Typedef Documentation

using signal_handler::SignalHandler::Handler = std::function<void(int)>

Definition at line 25 of file SignalHandler.hpp.

Constructor & Destructor Documentation

signal_handler::SignalHandler::SignalHandler ( )
delete

Member Function Documentation

template<typename T >
static void signal_handler::SignalHandler::bind ( int  signal,
void(T::*)(int)  fp,
T *  object 
)
inlinestatic

Definition at line 28 of file SignalHandler.hpp.

void signal_handler::SignalHandler::bind ( int  signal,
const Handler handler 
)
static

Definition at line 16 of file SignalHandler.cpp.

template<typename T >
static void signal_handler::SignalHandler::bindAll ( void(T::*)(int)  fp,
T *  object 
)
inlinestatic

Definition at line 36 of file SignalHandler.hpp.

void signal_handler::SignalHandler::signaled ( int  signal)
staticprivate

Definition at line 65 of file SignalHandler.cpp.

template<typename T >
static void signal_handler::SignalHandler::unbind ( int  signal,
void(T::*)(int)  fp,
T *  object 
)
inlinestatic

Definition at line 50 of file SignalHandler.hpp.

void signal_handler::SignalHandler::unbind ( int  signal,
const Handler handler 
)
static

Definition at line 38 of file SignalHandler.cpp.

template<typename T >
static void signal_handler::SignalHandler::unbindAll ( void(T::*)(int)  fp,
T *  object 
)
inlinestatic

Definition at line 58 of file SignalHandler.hpp.

Member Data Documentation

std::map< int, std::list< SignalHandler::Handler > > signal_handler::SignalHandler::handlers_
staticprivate

Definition at line 71 of file SignalHandler.hpp.

std::mutex signal_handler::SignalHandler::mutex_
staticprivate

Definition at line 72 of file SignalHandler.hpp.


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


bota_signal_handler
Author(s):
autogenerated on Wed Mar 3 2021 03:09:09