Public Member Functions | Static Public Member Functions | Static Private Attributes
DebugMessageListener Class Referenceabstract

#include <debugmessagelistener.h>

Inheritance diagram for DebugMessageListener:
AssertListener ChatWindow

Public Member Functions

virtual void debugMessage (const std::string &msg)=0
 DebugMessageListener ()
virtual ~ DebugMessageListener ()

Static Public Member Functions

static void distributeEvent (const std::string &msg)
static void addListener (DebugMessageListener *const listener)
static void removeListener (const DebugMessageListener *const listener)

Static Private Attributes

static std::vector< DebugMessageListener * > mListeners

Detailed Description

Definition at line 31 of file debugmessagelistener.h.

Constructor & Destructor Documentation

◆ DebugMessageListener()

DebugMessageListener::DebugMessageListener ( )

Definition at line 28 of file debugmessagelistener.cpp.

◆ ~ DebugMessageListener()

virtual DebugMessageListener::~ DebugMessageListener ( )

Member Function Documentation

◆ addListener()

void DebugMessageListener::addListener ( DebugMessageListener *const  listener)

Definition at line 28 of file debugmessagelistener.cpp.

◆ debugMessage()

virtual void DebugMessageListener::debugMessage ( const std::string &  msg)
pure virtual

Implemented in AssertListener, and ChatWindow.

◆ distributeEvent()

void DebugMessageListener::distributeEvent ( const std::string &  msg)

Definition at line 30 of file debugmessagelistener.cpp.

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

References FOR_EACH, anonymous_namespace{itemlinkhandler.cpp}::listener, and Actions::msg().

Referenced by applyEffectByOption(), applyEffectByOption1(), Logger::assertLog(), and Logger::unimplemented().

◆ removeListener()

void DebugMessageListener::removeListener ( const DebugMessageListener *const  listener)

Definition at line 28 of file debugmessagelistener.cpp.

Referenced by ChatWindow::scheduleDelete().

Field Documentation

◆ mListeners

std::vector< DebugMessageListener * > DebugMessageListener::mListeners

Definition at line 40 of file debugmessagelistener.h.

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