Torque2D Reference
Classes | Public Member Functions | Friends | List of all members
EventManagerListener Class Reference

#include <eventManager.h>

+ Inheritance diagram for EventManagerListener:

Public Member Functions

virtual bool onMessageReceived (StringTableEntry queue, const char *event, const char *data)
 Called by the EventManager queue when an event is triggered. Calls all listeners subscribed to the triggered event. More...
 
virtual bool onMessageObjectReceived (StringTableEntry queue, Message *msg)
 Callback for when message objects are received. More...
 
- Public Member Functions inherited from IMessageListener
virtual ~IMessageListener ()
 
virtual void onAddToQueue (StringTableEntry queue)
 Callback for when the listener is added to a queue. More...
 
virtual void onRemoveFromQueue (StringTableEntry queue)
 Callback for when the listener is removed from a queue. More...
 

Friends

class EventManager
 

Additional Inherited Members

- Protected Attributes inherited from IMessageListener
Vector< StringTableEntry > mQueues
 List of queues this listener is registered with. More...
 

Detailed Description

Listener class used by the EventManager to dispatch messages to specific callbacks.

Member Function Documentation

virtual bool onMessageObjectReceived ( StringTableEntry  queue,
Message msg 
)
inlinevirtual

Callback for when message objects are received.

Parameters
queueThe name of the queue the message was dispatched to
msgThe message object
Returns
false to prevent other listeners receiving this message, true otherwise
See also
onMessageReceived()

Implements IMessageListener.

bool onMessageReceived ( StringTableEntry  queue,
const char *  event,
const char *  data 
)
virtual

Called by the EventManager queue when an event is triggered. Calls all listeners subscribed to the triggered event.

Gets a list of all listeners of a specific event type and executes a callback on each one.

Parameters
eventThe name of the event that was triggered.
dataThe data associated with the event.
Returns
true to allow other listeners to receive the event, false otherwise

Implements IMessageListener.

Friends And Related Function Documentation

friend class EventManager
friend

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