![]() |
Scanframe Modular Application 0.1.0
|
Emitter class type for creating an instance which is emitting events to listeners. More...
#include <TListener.h>
Public Member Functions | |
| emitter_type ()=default | |
| ~emitter_type () | |
| Destructor clearing all shared pointers. | |
| TListener * | link (ListenerList *list, const func_type &function) const |
| Assigns a listener instance to this handler instance and also to the passed listener list. | |
| template<typename T > | |
| TListener * | link (ListenerList *list, T *obj, void(T::*method)(Args... args)) const |
| Assigns a listener instance to this handler instance and also to the passed listener list. | |
| void | call (Args... args) |
| Calls the linked listeners and also cleans up when pointer expired. | |
| size_t | cleanup () |
| Removes expired listeners. | |
| void | flush () |
| Removes all listeners. | |
Emitter class type for creating an instance which is emitting events to listeners.
|
default |
Default constructor.
| sf::TListener< Args >::emitter_type::~emitter_type | ( | ) |
Destructor clearing all shared pointers.
| void sf::TListener< Args >::emitter_type::call | ( | Args... | args | ) |
Calls the linked listeners and also cleans up when pointer expired.
| args | Arguments set using this template. |
| size_t sf::TListener< Args >::emitter_type::cleanup | ( | ) |
Removes expired listeners.
| void sf::TListener< Args >::emitter_type::flush | ( | ) |
Removes all listeners.
| TListener * sf::TListener< Args >::emitter_type::link | ( | ListenerList * | list, |
| const func_type & | function | ||
| ) | const |
Assigns a listener instance to this handler instance and also to the passed listener list.
| TListener * sf::TListener< Args >::emitter_type::link | ( | ListenerList * | list, |
| T * | obj, | ||
| void(T::*)(Args... args) | method | ||
| ) | const |
Assigns a listener instance to this handler instance and also to the passed listener list.