HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PDG_EventHandler Class Referenceabstract

#include <PDG_EventHandler.h>

Public Member Functions

 PDG_EventHandler (PDG_BaseType::Language language=PDG_BaseType::eCpp, bool user_handler=false)
 
virtual ~PDG_EventHandler ()
 
void removeFromAllEmitters ()
 Removes the handler from all emitters current in its emitter set. More...
 
void emitters (PDG_EventEmitterSet &emitters) const
 
PDG_BaseType::Language language () const
 
bool isUserHandler () const
 Returns true if this handler was created in user code. More...
 

Protected Member Functions

virtual void handlePDGEvent (const PDG_Event &)=0
 
virtual void eventEmitterNotAvailable (PDG_EventEmitter *emitter)
 

Friends

class PDG_EventQueue
 

Detailed Description

Definition at line 27 of file PDG_EventHandler.h.

Constructor & Destructor Documentation

PDG_EventHandler::PDG_EventHandler ( PDG_BaseType::Language  language = PDG_BaseType::eCpp,
bool  user_handler = false 
)

Constructs a new event handler. The handler keeps track of whether it was created by user code or internally by Houdini/TOPs/PDG, to make it possible for user to remove all "user created" handlers without accidentally removing ones created internally.

virtual PDG_EventHandler::~PDG_EventHandler ( )
virtual

Destroys the handler and removes it from all active emitters, in case the emitter has outlived the life time of the handler

Member Function Documentation

void PDG_EventHandler::emitters ( PDG_EventEmitterSet emitters) const

Returns the set of event emitters that this handler is currently attached to

virtual void PDG_EventHandler::eventEmitterNotAvailable ( PDG_EventEmitter emitter)
inlineprotectedvirtual

Invoke to indicate to subclasses that an emitter is no longer, an has been removed from the emitter set.

Definition at line 69 of file PDG_EventHandler.h.

virtual void PDG_EventHandler::handlePDGEvent ( const PDG_Event )
protectedpure virtual

The main event handling hook, invoked by the event queue each time an event for this handler is dispatched. This method must be implemented by subclasses.

bool PDG_EventHandler::isUserHandler ( ) const
inline

Returns true if this handler was created in user code.

Definition at line 58 of file PDG_EventHandler.h.

PDG_BaseType::Language PDG_EventHandler::language ( ) const
inline

Returns the language that event handler is implemented in. Mostly used to distinguish between C++ event handler subclasses and ones created using the PDG Python API.

Definition at line 54 of file PDG_EventHandler.h.

void PDG_EventHandler::removeFromAllEmitters ( )

Removes the handler from all emitters current in its emitter set.

Friends And Related Function Documentation

friend class PDG_EventQueue
friend

Definition at line 70 of file PDG_EventHandler.h.


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