HEventListenerManager Class Reference

The HEventListenerManager class is used to dispatch event for a specific type. More...

#include <HEventListener.h>

Public Member Functions

void AddEventListener (HEventListener *eventlistener, int priority)
 
HEventListenerGetEventListener ()
 
 HEventListenerManager ()
 
bool RemoveEventListener (HEventListener *eventlistener)
 
void Reset ()
 
void StartQuery ()
 

Protected Attributes

bool m_bQueryInProgress
 
struct vlist_s * m_pEventListenerList
 

Detailed Description

The HEventListenerManager class is used to dispatch event for a specific type.

Constructor & Destructor Documentation

◆ HEventListenerManager()

HEventListenerManager::HEventListenerManager ( )

Constructs an HEventListenerManager object.

Member Function Documentation

◆ AddEventListener()

void HEventListenerManager::AddEventListener ( HEventListener eventlistener,
int  priority 
)

This method adds eventlistener to a list of subscribers who want to receive notification when an event handled by this manager occurs.

Parameters
eventlistenerEvent Listener to add.
priorityPriority for this listener. You can pass one of the following #HLISTENER_PRIORITY_NORMAL, #HLISTENER_PRIORITY_HIGH or #HLISTENER_PRIORITY_LOW.

◆ GetEventListener()

HEventListener* HEventListenerManager::GetEventListener ( )

Use this method to iterate through the list of event listeners during a query. If StartQuery() was not called first, then the method will return 0.

Returns
A pointer to next Event Listener in the priority queue. This method will return null if you are at the end of queue or StartQuery was not called to begin the query process.

◆ RemoveEventListener()

bool HEventListenerManager::RemoveEventListener ( HEventListener eventlistener)

This method removes eventlistener from the list of subscribers who want to receive notification when an event handled by this manager occurs.

Parameters
eventlistenerEvent Listener to remove.

◆ Reset()

void HEventListenerManager::Reset ( )

This method stops the query process. If you call GetEventListener() after a call to Reset(), GetEventListener will return a null pointer.

◆ StartQuery()

void HEventListenerManager::StartQuery ( )

This method starts the query process. Once StartQuery() has been called,

Member Data Documentation

◆ m_bQueryInProgress

bool HEventListenerManager::m_bQueryInProgress
protected

True if query in progress and False if query not in progress.

◆ m_pEventListenerList

struct vlist_s* HEventListenerManager::m_pEventListenerList
protected

List of Event Listeners


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