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

#include <buyingstoreslotslistener.h>

Inheritance diagram for BuyingStoreSlotsListener:
ShopWindow

Public Member Functions

virtual void buyingStoreSlotsChanged (const int slots)=0
 
 BuyingStoreSlotsListener ()
 
virtual ~ BuyingStoreSlotsListener ()
 

Static Public Member Functions

static void distributeEvent (const int slots)
 
static void addListener (BuyingStoreSlotsListener *const listener)
 
static void removeListener (const BuyingStoreSlotsListener *const listener)
 

Static Private Attributes

static std::vector< BuyingStoreSlotsListener * > mListeners
 

Detailed Description

Definition at line 29 of file buyingstoreslotslistener.h.

Constructor & Destructor Documentation

◆ BuyingStoreSlotsListener()

BuyingStoreSlotsListener::BuyingStoreSlotsListener ( )

Definition at line 28 of file buyingstoreslotslistener.cpp.

◆ ~ BuyingStoreSlotsListener()

virtual BuyingStoreSlotsListener::~ BuyingStoreSlotsListener ( )
virtual

Member Function Documentation

◆ addListener()

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

Definition at line 28 of file buyingstoreslotslistener.cpp.

◆ buyingStoreSlotsChanged()

virtual void BuyingStoreSlotsListener::buyingStoreSlotsChanged ( const int  slots)
pure virtual

Implemented in ShopWindow.

◆ distributeEvent()

void BuyingStoreSlotsListener::distributeEvent ( const int  slots)
static

Definition at line 30 of file buyingstoreslotslistener.cpp.

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

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

Referenced by EAthena::BuyingStoreRecv::processBuyingStoreOpen().

◆ removeListener()

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

Definition at line 28 of file buyingstoreslotslistener.cpp.

Field Documentation

◆ mListeners

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

Definition at line 38 of file buyingstoreslotslistener.h.


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