#include <nap/signalslot.h>
Public Types | |
using | Function = std::function< void(Args... args)> |
Public Member Functions | |
Slot ()=default | |
Slot (Function inFunction) | |
template<typename U , typename F > | |
Slot (U *parent, F memberFunction) | |
template<typename U , typename F > | |
Slot (U *parent, F memberFunction, Signal< Args... > &signal) | |
~Slot () | |
void | disconnect () |
void | setFunction (Function func) |
void | trigger (Args... args) |
void | copyCauses (const Slot &rhs) |
Slot.
A slot manages a function call that can be connected to a signal. A slot hides the connect / disconnect behavior of an event.
using Function = std::function<void(Args... args)> |
|
default |
Slot | ( | U * | parent, |
F | memberFunction | ||
) |
This templated constructor can be used to initialize the slot with a member function with one single parameter
This templated constructor can be used to initialize the slot with a member function with one single parameter, last argument is a signal to connect to straightaway after construction
~Slot | ( | ) |
void copyCauses | ( | const Slot< Args > & | rhs | ) |
void disconnect |
Disconnects the slot from all signals it is connected to
void setFunction | ( | Function | func | ) |
void trigger | ( | Args... | args | ) |