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

#include <banklistener.h>

Inheritance diagram for BankListener:
BankWindow

Public Member Functions

virtual void bankMoneyChanged (const int money)=0
 
 BankListener ()
 
virtual ~ BankListener ()
 

Static Public Member Functions

static void distributeEvent (const int money)
 
static void addListener (BankListener *const listener)
 
static void removeListener (const BankListener *const listener)
 

Static Private Attributes

static std::vector< BankListener * > mListeners
 

Detailed Description

Definition at line 29 of file banklistener.h.

Constructor & Destructor Documentation

◆ BankListener()

BankListener::BankListener ( )

Definition at line 28 of file banklistener.cpp.

◆ ~ BankListener()

virtual BankListener::~ BankListener ( )
virtual

Member Function Documentation

◆ addListener()

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

Definition at line 28 of file banklistener.cpp.

◆ bankMoneyChanged()

virtual void BankListener::bankMoneyChanged ( const int  money)
pure virtual

Implemented in BankWindow.

◆ distributeEvent()

void BankListener::distributeEvent ( const int  money)
static

Definition at line 30 of file banklistener.cpp.

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

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

Referenced by EAthena::BankRecv::processBankDeposit(), EAthena::BankRecv::processBankStatus(), and EAthena::BankRecv::processBankWithdraw().

◆ removeListener()

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

Definition at line 28 of file banklistener.cpp.

Field Documentation

◆ mListeners

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

Definition at line 38 of file banklistener.h.


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