Scanframe Modular Application 0.1.0
Loading...
Searching...
No Matches
sf::ListenerList Class Reference

Base class used as container for classes having listeners created by sf::TListener template. More...

#include <TListener.h>

Classes

struct  base_type
 Type definition of a class having a virtual destructor used as a base class for sf::TListener. More...
 

Public Member Functions

 ~ListenerList ()
 Destructor deleting all entries by calling flushListeners().
 
size_t flushListeners ()
 Deletes all the linked entries in the list.
 
size_t removeListener (base_type *entry)
 Removes the given entry from the list.
 
size_t cleanupListeners ()
 Removes all invalid/unused entries.
 

Friends

template<typename... Args>
class TListener
 Allows access to appendListener() method from the TListener template.
 

Detailed Description

Base class used as container for classes having listeners created by sf::TListener template.

Constructor & Destructor Documentation

◆ ~ListenerList()

sf::ListenerList::~ListenerList ( )
inline

Destructor deleting all entries by calling flushListeners().

Member Function Documentation

◆ cleanupListeners()

size_t sf::ListenerList::cleanupListeners ( )
inline

Removes all invalid/unused entries.

There is no real need call this method explicitly since it is called when a new link is added. It is mainly used during unit tests to check proper functioning.

Returns
Amount of removed entries.

◆ flushListeners()

size_t sf::ListenerList::flushListeners ( )
inline

Deletes all the linked entries in the list.

Returns
A mount of flushed entries.

◆ removeListener()

size_t sf::ListenerList::removeListener ( base_type entry)
inline

Removes the given entry from the list.

Returns
Amount of removed entries.

Friends And Related Symbol Documentation

◆ TListener

template<typename... Args>
friend class TListener
friend

Allows access to appendListener() method from the TListener template.


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