FBX C++ API Reference
FbxEventHandler Class Referenceabstract

#include <fbxeventhandler.h>

Class Description

Event handler class contains a listener and a callback function.

Event handler is used to bind emitter and listener together. Its callback function can 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.

An object(emitter) can emit a certain type of event, the object(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.
The event data is process by the callback function of event handler.
See also
FbxListener FbxEventBase FbxEvent FbxEmitter

Definition at line 41 of file fbxeventhandler.h.

Public Types

enum  EType { eListener, eEmitter, eCount }
 Event handler base type. More...

Public Member Functions

virtual int GetHandlerEventType ()=0
 Get event type of current handler. More...
virtual void FunctionCall (const FbxEventBase &pEvent)=0
 Call function that process event data. More...
virtual FbxListenerGetListener ()=0
 Get listener of current handler. More...

Member Enumeration Documentation

◆ EType

enum EType

Event handler base type.


Listener event handler type.


Emitter event handler type.


Count of different event handler types.

Definition at line 45 of file fbxeventhandler.h.

46  {
47  eListener,
48  eEmitter,
49  eCount
50  };
Emitter event handler type.
Listener event handler type.
Count of different event handler types.

Member Function Documentation

◆ GetHandlerEventType()

virtual int GetHandlerEventType ( )
pure virtual

Get event type of current handler.

The type ID of event.

◆ FunctionCall()

virtual void FunctionCall ( const FbxEventBase pEvent)
pure virtual

Call function that process event data.

pEventspecify the event type. pEvent could be a specific class which derived from FbxEventBase.
See also

◆ GetListener()

virtual FbxListener* GetListener ( )
pure virtual

Get listener of current handler.

A pointer to the listener object.

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