ManaPlus
Public Member Functions | Static Public Member Functions | Static Private Attributes
UpdateStatusListener Class Referenceabstract

#include <updatestatuslistener.h>

Inheritance diagram for UpdateStatusListener:
MiniStatusWindow

Public Member Functions

virtual void updateStatus ()=0
 
 UpdateStatusListener ()
 
virtual ~ UpdateStatusListener ()
 

Static Public Member Functions

static void distributeEvent ()
 
static void addListener (UpdateStatusListener *const listener)
 
static void removeListener (const UpdateStatusListener *const listener)
 

Static Private Attributes

static std::vector< UpdateStatusListener * > mListeners
 

Detailed Description

Definition at line 29 of file updatestatuslistener.h.

Constructor & Destructor Documentation

◆ UpdateStatusListener()

UpdateStatusListener::UpdateStatusListener ( )

Definition at line 28 of file updatestatuslistener.cpp.

◆ ~ UpdateStatusListener()

virtual UpdateStatusListener::~ UpdateStatusListener ( )
virtual

Member Function Documentation

◆ addListener()

void UpdateStatusListener::addListener ( UpdateStatusListener *const  listener)
static

Definition at line 28 of file updatestatuslistener.cpp.

◆ distributeEvent()

void UpdateStatusListener::distributeEvent ( )
static

Definition at line 30 of file updatestatuslistener.cpp.

31 {
32  FOR_EACH (STD_VECTOR<UpdateStatusListener*>::iterator,
33  it, mListeners)
34  {
35  UpdateStatusListener *const listener = *it;
36  if (listener != nullptr)
37  listener->updateStatus();
38  }
39 }
static std::vector< UpdateStatusListener * > mListeners
#define FOR_EACH(type, iter, array)
Definition: foreach.h:25

References FOR_EACH, and anonymous_namespace{itemlinkhandler.cpp}::listener.

Referenced by AwayListener::action(), GameModifiers::changeAwayMode(), GameModifiers::changeGameModifiers(), GameModifiers::changeMode(), initEngines(), GameModifiers::resetModifiers(), and GameModifiers::setQuickDropCounter().

◆ removeListener()

void UpdateStatusListener::removeListener ( const UpdateStatusListener *const  listener)
static

Definition at line 28 of file updatestatuslistener.cpp.

◆ updateStatus()

virtual void UpdateStatusListener::updateStatus ( )
pure virtual

Implemented in MiniStatusWindow.

Field Documentation

◆ mListeners

std::vector< UpdateStatusListener * > UpdateStatusListener::mListeners
staticprivate

Definition at line 38 of file updatestatuslistener.h.


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