Public Types | Public Member Functions

FbxEventHandler Class Reference

Search for all occurrences

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 FbxListener::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:
FbxListener FbxEventBase FbxEvent FbxEmitter

Definition at line 45 of file fbxeventhandler.h.

#include <fbxeventhandler.h>

Inheritance diagram for FbxEventHandler:
Inheritance graph
[legend]

List of all members.

Public Types

enum   EType { eListener, eEmitter, eCount }

Public Member Functions

  FbxEventHandler ()
  Constructor.
virtual  ~FbxEventHandler ()
  Destructor.
virtual int  GetHandlerEventType ()=0
  Get event type of current handler.
virtual void  FunctionCall (const FbxEventBase &pEvent)=0
  call callback function to process event data.
virtual FbxListener GetListener ()=0
  Get listener of current handler.
  FBXSDK_INTRUSIVE_LIST_NODE (FbxEventHandler, eCount)

Member Enumeration Documentation

enum EType

Constructor & Destructor Documentation

FbxEventHandler ( ) [inline]

Constructor.

Definition at line 57 of file fbxeventhandler.h.

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

Destructor.

Definition at line 61 of file fbxeventhandler.h.

{}

Member Function Documentation

virtual int GetHandlerEventType ( ) [pure virtual]
virtual void FunctionCall ( const FbxEventBase 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 FbxEventBase.
See also:
FbxEventBase

Implemented in FbxMemberFuncEventHandler< EventType, ListenerType >, FbxConstMemberFuncEventHandler< EventType, ListenerType >, and FbxFuncEventHandler< EventType >.

virtual FbxListener* GetListener ( ) [pure virtual]
FBXSDK_INTRUSIVE_LIST_NODE ( FbxEventHandler  ,
eCount   
)

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

FbxEventHandler FbxEventHandler FbxEventHandler FbxEventHandler FbxEventHandler FbxEventHandler FbxEventHandler FbxEventHandler FbxEventHandler FbxEventHandler
FbxEventHandler FbxEventHandler FbxEventHandler FbxEventHandler FbxEventHandler FbxEventHandler FbxEventHandler FbxEventHandler FbxEventHandler FbxEventHandler