NcEngine
nc::Signal< Args > Class Template Reference

An event source supporting multiple Connections. More...

#include <Signal.h>

Public Types

using Slot_t = detail::Slot< Args... >
 

Public Member Functions

 Signal (Signal &&)=default
 
Signaloperator= (Signal &&)=default
 
 Signal (const Signal &)=delete
 
Signaloperator= (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.
 

Detailed Description

template<class... Args>
class nc::Signal< Args >

An event source supporting multiple Connections.


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