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

#include <gamemodifierlistener.h>

Inheritance diagram for GameModifierListener:
SetupQuickItem

Public Member Functions

virtual void gameModifiersChanged ()=0
 
 GameModifierListener ()
 
virtual ~ GameModifierListener ()
 

Static Public Member Functions

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

Static Private Attributes

static std::vector< GameModifierListener * > mListeners
 

Detailed Description

Definition at line 29 of file gamemodifierlistener.h.

Constructor & Destructor Documentation

◆ GameModifierListener()

GameModifierListener::GameModifierListener ( )

Definition at line 28 of file gamemodifierlistener.cpp.

◆ ~ GameModifierListener()

virtual GameModifierListener::~ GameModifierListener ( )
virtual

Member Function Documentation

◆ addListener()

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

Definition at line 28 of file gamemodifierlistener.cpp.

◆ distributeEvent()

void GameModifierListener::distributeEvent ( )
static

Definition at line 30 of file gamemodifierlistener.cpp.

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

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

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

◆ gameModifiersChanged()

virtual void GameModifierListener::gameModifiersChanged ( )
pure virtual

Implemented in SetupQuickItem.

◆ removeListener()

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

Definition at line 28 of file gamemodifierlistener.cpp.

Field Documentation

◆ mListeners

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

Definition at line 38 of file gamemodifierlistener.h.


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