1.10
Public Types | Public Member Functions | Protected Attributes | List of all members
SignalW< Args > Class Template Reference

#include <signal.h>

Public Types

enum  { INVALID_HANDLE = 0 }
 
using EventCallback = std::function< void(Args...)>
 
using RegisterHandle = uint32_t
 

Public Member Functions

 SignalW (Signal< Args... > *src)
 
void clear ()
 
void disable ()
 
void enable ()
 
EGT_NODISCARD bool enabled () const
 
void invoke (Args... args)
 
RegisterHandle on_event (const EventCallback &handler)
 
RegisterHandle operator() (const EventCallback &handler)
 
void remove (RegisterHandle handle)
 
void set_src_signal (Signal<> *src)
 

Protected Attributes

Signal< Args... > * m_src_signal {nullptr}
 

Member Typedef Documentation

◆ EventCallback

template<typename... Args>
using EventCallback = std::function<void(Args...)>

◆ RegisterHandle

template<typename... Args>
using RegisterHandle = uint32_t

Member Enumeration Documentation

◆ anonymous enum

template<typename... Args>
anonymous enum
Enumerator
INVALID_HANDLE 

Constructor & Destructor Documentation

◆ SignalW()

template<typename... Args>
SignalW ( Signal< Args... > *  src)
inline

Member Function Documentation

◆ clear()

template<typename... Args>
void clear ( )
inline

◆ disable()

template<typename... Args>
void disable ( )
inline

◆ enable()

template<typename... Args>
void enable ( )
inline

◆ enabled()

template<typename... Args>
EGT_NODISCARD bool enabled ( ) const
inline

◆ invoke()

template<typename... Args>
void invoke ( Args...  args)
inline

◆ on_event()

template<typename... Args>
RegisterHandle on_event ( const EventCallback handler)
inline

◆ operator()()

template<typename... Args>
RegisterHandle operator() ( const EventCallback handler)
inline

◆ remove()

template<typename... Args>
void remove ( RegisterHandle  handle)
inline

◆ set_src_signal()

template<typename... Args>
void set_src_signal ( Signal<> *  src)
inline

Member Data Documentation

◆ m_src_signal

template<typename... Args>
Signal<Args...>* m_src_signal {nullptr}
protected