Scanframe Modular Application 0.1.0
Loading...
Searching...
No Matches
sf::TListener< Args >::emitter_type Class Reference

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.
 
TListenerlinkListener (ListenerList *listener_list, const func_type &function)
 Assigns a listener instance to this handler instance and also to the passed listener list.
 
void callListeners (Args... args)
 Call the registered listeners.
 
size_t cleanup ()
 Removes expired listeners.
 
void flush ()
 Removes all listeners.
 

Detailed Description

template<typename... Args>
class sf::TListener< Args >::emitter_type

Emitter class type for creating an instance which is emitting events to listeners.

Constructor & Destructor Documentation

◆ emitter_type()

template<typename... Args>
sf::TListener< Args >::emitter_type::emitter_type ( )
default

Default constructor.

◆ ~emitter_type()

template<typename... Args>
sf::TListener< Args >::emitter_type::~emitter_type ( )
inline

Destructor clearing all shared pointers.

Member Function Documentation

◆ callListeners()

template<typename... Args>
void sf::TListener< Args >::emitter_type::callListeners ( Args...  args)
inline

Call the registered listeners.

Also cleans up when pointer expired.

Parameters
argsArguments set using this template.

◆ cleanup()

template<typename... Args>
size_t sf::TListener< Args >::emitter_type::cleanup ( )
inline

Removes expired listeners.

Returns
Amount of removed entries.

◆ flush()

template<typename... Args>
void sf::TListener< Args >::emitter_type::flush ( )
inline

Removes all listeners.

◆ linkListener()

template<typename... Args>
TListener * sf::TListener< Args >::emitter_type::linkListener ( ListenerList listener_list,
const func_type function 
)
inline

Assigns a listener instance to this handler instance and also to the passed listener list.

Returns
Pointer to created TListener which can be deleted to unlink.

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