Inheritance diagram for MCEventListener:
Public Member Functions
|virtual void||handleEvent (const MCEvent &event)=0|
|Interface to EventListeners. |
|Allow virtual delete. |
The event listeners handleEvent() method is called when an event is notified via the MCEvent::notify() method. The handleEvent method is guaranteed to be called once per call to the notify() method. It is safe to call the static MCEvent methods dealing with event and listener registration while in the handleEvent method.
Interface to EventListeners.
The implementation must override the handleEvent function. The framework calls handleEvent with the event that occured. The event may contain additional data other than the event id. Because a single listener may be registered for different events, it is recommended that the handleEvent() method obtains the eventId from the event before deciding what action to take.