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

#include <vendingslotslistener.h>

Inheritance diagram for VendingSlotsListener:
ShopWindow

Public Member Functions

virtual void vendingSlotsChanged (const int slots)=0
 
 VendingSlotsListener ()
 
virtual ~ VendingSlotsListener ()
 

Static Public Member Functions

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

Static Private Attributes

static std::vector< VendingSlotsListener * > mListeners
 

Detailed Description

Definition at line 29 of file vendingslotslistener.h.

Constructor & Destructor Documentation

◆ VendingSlotsListener()

VendingSlotsListener::VendingSlotsListener ( )

Definition at line 28 of file vendingslotslistener.cpp.

◆ ~ VendingSlotsListener()

virtual VendingSlotsListener::~ VendingSlotsListener ( )
virtual

Member Function Documentation

◆ addListener()

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

Definition at line 28 of file vendingslotslistener.cpp.

◆ distributeEvent()

void VendingSlotsListener::distributeEvent ( const int  slots)
static

Definition at line 30 of file vendingslotslistener.cpp.

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

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

Referenced by EAthena::VendingRecv::processOpenReq().

◆ removeListener()

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

Definition at line 28 of file vendingslotslistener.cpp.

◆ vendingSlotsChanged()

virtual void VendingSlotsListener::vendingSlotsChanged ( const int  slots)
pure virtual

Implemented in ShopWindow.

Field Documentation

◆ mListeners

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

Definition at line 38 of file vendingslotslistener.h.


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