NcEngine
|
An event source supporting multiple Connections. More...
#include <Signal.h>
Public Types | |
using | Slot_t = detail::Slot< Args... > |
Public Member Functions | |
Signal (Signal &&)=default | |
Signal & | operator= (Signal &&)=default |
Signal (const Signal &)=delete | |
Signal & | operator= (const Signal &)=delete |
auto | Connect (std::move_only_function< void(Args...)> func, size_t priority=SignalPriority::Highest) -> Connection |
Connect a std::move_only_function. | |
template<class T > | |
auto | Connect (T *inst, void(T::*func)(Args...), size_t priority=SignalPriority::Highest) -> Connection |
Connect a member function. | |
template<class T > | |
auto | Connect (const T *inst, void(T::*func)(Args...) const, size_t priority=SignalPriority::Highest) -> Connection |
Connect a const member function. | |
void | DisconnectAll () |
Remove all connections. | |
auto | ConnectionCount () const noexcept -> size_t |
Get the number of active connections. | |
void | Emit (Args... args) |
Invoke all slots. | |
void | operator() (Args... args) |
Invoke all slots. | |
An event source supporting multiple Connections.