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

#include <vendingmodelistener.h>

Inheritance diagram for VendingModeListener:
ShopWindow

Public Member Functions

virtual void vendingEnabled (const bool b)=0
 
 VendingModeListener ()
 
virtual ~ VendingModeListener ()
 

Static Public Member Functions

static void distributeEvent (const bool b)
 
static void addListener (VendingModeListener *const listener)
 
static void removeListener (const VendingModeListener *const listener)
 

Static Private Attributes

static std::vector< VendingModeListener * > mListeners
 

Detailed Description

Definition at line 29 of file vendingmodelistener.h.

Constructor & Destructor Documentation

◆ VendingModeListener()

VendingModeListener::VendingModeListener ( )

Definition at line 28 of file vendingmodelistener.cpp.

◆ ~ VendingModeListener()

virtual VendingModeListener::~ VendingModeListener ( )
virtual

Member Function Documentation

◆ addListener()

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

Definition at line 28 of file vendingmodelistener.cpp.

◆ distributeEvent()

void VendingModeListener::distributeEvent ( const bool  b)
static

Definition at line 30 of file vendingmodelistener.cpp.

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

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

Referenced by ShopWindow::action(), EAthena::VendingRecv::processHideBoard(), and EAthena::VendingRecv::processOpen().

◆ removeListener()

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

Definition at line 28 of file vendingmodelistener.cpp.

◆ vendingEnabled()

virtual void VendingModeListener::vendingEnabled ( const bool  b)
pure virtual

Implemented in ShopWindow.

Field Documentation

◆ mListeners

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

Definition at line 38 of file vendingmodelistener.h.


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