KFbxEventHandler Class Reference


Detailed Description

FBX event handler class contains a listener and a callback function.

Event handler is used to bind emitter and listener together. Its callback function could process event data. To generate a valid event handler, you can create an event emitter and event listener first and then call KFbxListener::Bind(). It will create an event handler automatically and bind the handler to the listener and the created emitter. After that, the emitter and listener are bound together via event handler.

Remarks:
An object(emitter) can emit a certain type of event, the plug-in(listener) who are listening to that type of event, will receive a signal and take action to process the event data.
The whole process of event is:
  • 1. Create an emitter and a listener, then bind them together via the same event handler.
  • 2. Emitter can emit an event at certain conditions. The event could be handled by event handler.
  • 3. Once an event is emitted, the listener to this event will receive a signal.
  • 4. And then the listener could process the event data according to the types of event, by calling event handler.
Note:
The event data is process by the callback function of event handler.
See also:
KFbxListener KFbxEventBase KFbxEvent KFbxEmitter

Definition at line 72 of file kfbxeventhandler.h.

#include <kfbxeventhandler.h>

Inheritance diagram for KFbxEventHandler:
Inheritance graph
[legend]

List of all members.

Public Types

enum   { eNODE_LISTENER = 0, eNODE_EMITTER, eNODE_COUNT }

Public Member Functions

  KFbxEventHandler ()
  Constructor.
virtual  ~KFbxEventHandler ()
  Destructor.
virtual int  GetHandlerEventType ()=0
  Get event type of current handler.
virtual void  FunctionCall (const KFbxEventBase &pEvent)=0
  call callback function to process event data.
virtual KFbxListener GetListener ()=0
  Get listener of current handler.
  KFBX_LISTNODE (KFbxEventHandler, eNODE_COUNT)

Member Enumeration Documentation

anonymous enum

Constructor & Destructor Documentation

KFbxEventHandler ( ) [inline]

Constructor.

Definition at line 84 of file kfbxeventhandler.h.

{}
virtual ~KFbxEventHandler ( ) [inline, virtual]

Destructor.

Definition at line 88 of file kfbxeventhandler.h.

{}

Member Function Documentation

virtual int GetHandlerEventType ( ) [pure virtual]
virtual void FunctionCall ( const KFbxEventBase pEvent ) [pure virtual]

call callback function to process event data.

Parameters:
pEvent specify the event type. pEvent could be a specific class which derived from KFbxEventBase.
See also:
KFbxEventBase

Implemented in KFbxMemberFuncEventHandler< EventType, ListenerType >, KFbxConstMemberFuncEventHandler< EventType, ListenerType >, and KFbxFuncEventHandler< EventType >.

KFBX_LISTNODE ( KFbxEventHandler  ,
eNODE_COUNT   
)

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

KFbxEventHandler KFbxEventHandler KFbxEventHandler KFbxEventHandler KFbxEventHandler KFbxEventHandler KFbxEventHandler KFbxEventHandler KFbxEventHandler KFbxEventHandler
KFbxEventHandler KFbxEventHandler KFbxEventHandler KFbxEventHandler KFbxEventHandler KFbxEventHandler KFbxEventHandler KFbxEventHandler KFbxEventHandler KFbxEventHandler