LocalGuidance
A library that generates velocity references to follow a path.
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.

Member Typedef Documentation

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

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
static void signal_handler::SignalHandler::bind ( int  signal,
const Handler handler 
)
static
template<typename T >
static void signal_handler::SignalHandler::bindAll ( void(T::*)(int)  fp,
T *  object 
)
inlinestatic
static void signal_handler::SignalHandler::signaled ( int  signal)
staticprivate
template<typename T >
static void signal_handler::SignalHandler::unbind ( int  signal,
void(T::*)(int)  fp,
T *  object 
)
inlinestatic
static void signal_handler::SignalHandler::unbind ( int  signal,
const Handler handler 
)
static
template<typename T >
static void signal_handler::SignalHandler::unbindAll ( void(T::*)(int)  fp,
T *  object 
)
inlinestatic

Member Data Documentation

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

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