Midge
v3.9.2
Data Processing Framework
|
#include <signal.hh>
Public Types | |
using | signature = void(x_args...) |
Public Member Functions | |
m_signal (const string_t &p_name) | |
template<typename x_owner > | |
m_signal (const string_t &p_name, x_owner *p_owner) | |
m_signal (const m_signal &)=delete | |
m_signal (m_signal &&)=delete | |
virtual | ~m_signal () |
virtual unsigned | connect (slot *p_slot) |
template<typename T > | |
unsigned | connect_function (T *inst, void(T::*func)(x_args...)) |
template<typename T > | |
unsigned | connect_function (T *inst, void(T::*func)(x_args...) const) |
unsigned | connect_function (const std::function< signature > &slot) const |
void | disconnect (unsigned id) const |
void | disconnect_all () const |
void | emit (x_args... args) |
void | operator() (x_args... args) |
m_signal & | operator= (m_signal const &other) |
![]() | |
signal (const string_t &p_name) | |
template<typename x_owner > | |
signal (const string_t &p_name, x_owner *p_owner) | |
virtual | ~signal () |
snake_case_mv_referrable (string_t, name) | |
Private Types | |
typedef std::map< unsigned, std::function< signature > > | slot_map |
Private Member Functions | |
snake_case_mv_referrable_mutable_const (slot_map, slots) | |
snake_case_mv_accessible_mutable_noset (unsigned, current_id) | |
A m_signal object may call multiple slots with the same signature. You can connect functions to the m_signal which will be called when the emit() method on the m_signal object is invoked. Any argument passed to emit() will be passed to the given functions. The name "m_signal" was chosen to avoid conflicting with std::signal.
|
virtual |
Implements signal.
Definition at line 24 of file signal_slot.hh.
unsigned connect_function | ( | T * | inst, |
void(T::*)(x_args...) | func | ||
) |
unsigned connect_function | ( | T * | inst, |
void(T::*)(x_args...) const | func | ||
) |
unsigned connect_function | ( | const std::function< signature > & | slot | ) | const |
|
private |
|
private |