|
SPARK
0.1.0
A general purpose game engine written in C++.
|
A slot is a connection between a signal and a callback. More...
#include <Slot.h>
Public Member Functions | |
| Slot (const std::function< void(Args...)> &f) | |
| Instantiates a slot with a callback. | |
| Slot (std::function< void(Args...)> &&f) | |
| Instantiates a slot with a callback. | |
| template<class T > | |
| Slot (T *target, void(T::*method)(Args...)) | |
| Instantiates a slot from a non const method pointer. | |
| template<class T > | |
| Slot (T *target, void(T::*method)(Args...) const) | |
| Instantiates a slot from a const method pointer. | |
| Slot (const Slot &slot) | |
| Slot (Slot &&slot) noexcept | |
| Slot & | operator= (const Slot &slot) |
| Slot & | operator= (Slot &&slot) noexcept |
| bool | isConnected () const |
| Checks if this slot is connected to a signal. | |
| void | disconnect () |
| Disconnects this slot from the signal. | |
Friends | |
| class | details::Connection< Args... > |
| class | Signal< Args... > |
A slot is a connection between a signal and a callback.
| Args | The types of the arguments of the callback. |
|
explicit |
Instantiates a slot with a callback.
| f | The callback as a function object. |
|
explicit |
Instantiates a slot with a callback.
| f | The callback as a function object. |
| spark::patterns::Slot< Args >::Slot | ( | T * | target, |
| void(T::* | method )(Args...) ) |
Instantiates a slot from a non const method pointer.
| T | The class containing the method. |
| target | The instance of the class containing the method. |
| method | The address of the method to use as callback. |
| spark::patterns::Slot< Args >::Slot | ( | T * | target, |
| void(T::* | method )(Args...) const ) |
Instantiates a slot from a const method pointer.
| T | The class containing the method. |
| target | The instance of the class containing the method. |
| method | The address of the method to use as callback. |
|
nodiscard |
Checks if this slot is connected to a signal.