Pixel Dust Game Engine  v0.9.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups
Public Member Functions | List of all members
IEventHandler Class Reference

Public Member Functions

virtual void addRef () const throw ()
 indicate that an additional reference to this object has been given out
 
virtual void release () const throw ()
 a reference to this object is no longer used, free self if nothing references it anymore
 
virtual bool handleEvent (EventEmitter *inEmitter, long inEventType, void *inEventData) throw ()
 

Member Function Documentation

virtual void addRef ( ) const throw ()
inlinevirtual

indicate that an additional reference to this object has been given out

virtual bool handleEvent ( EventEmitter inEmitter,
long  inEventType,
void *  inEventData 
) throw ()
inlinevirtual

handle_event(inEventType, inEventData) in Ruby - Developer implements to handle one or more types of events. The developer using the Pixel Dust Framework must implement this method to handle events. Each handler is invoked only for the event types it was actually registered for using EventManager::addHandler(). You can register a handler multiple times for different events, or register to receive all events.

Warning
You must catch any exceptions in handleEvent, it cannot throw exceptions.
Parameters
inEventTypethe type of event you are expected to handle
(ie: pdg::eventType_Startup, pdg::eventType_Shutdown, etc...) [C++]
(PDG::EventType_Startup, PDG::EventType_Shutdown, etc..) [Ruby]
inEventDatathe data for the event you are expected to handle
Returns
you should true from your handleEvent method if the event has been completely handled and no other handlers should receive it, or false if other handlers should still get an opportunity to handle it
See Also
EventManager
virtual void release ( ) const throw ()
inlinevirtual

a reference to this object is no longer used, free self if nothing references it anymore