FBX C++ API Reference
FbxEvent< T > Class Template Reference

#include <fbxevent.h>

Class Description

template<typename T>
class FbxEvent< T >

FBX event class, derived from FbxEventBase, and it contains a type ID for event.

It's a template class. You can derive your own types of even. Such as:

class FbxEventCustom : public FbxEvent<FbxEventCustom>
See also
FbxObjectPropertyChanged FbxEventReferencedDocument FbxEventPostExport
FbxEventPostImport FbxEventPreExport FbxEventPreImport FbxEventPopulateSystemLibrary
A FBX event is something that is emitted by an emitter, with the goal of being filled by the listener that listen to it. 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.
The event data is process by the callback function of event handler.
See also
FbxEventBase FbxEventHandler FbxListener FbxEmitter

Definition at line 134 of file fbxevent.h.

+ Inheritance diagram for FbxEvent< T >:

Public Member Functions

virtual ~FbxEvent ()
 Destructor. More...
virtual int GetTypeId () const
 Retrieve the event type ID. More...
- Public Member Functions inherited from FbxEventBase
virtual const char * GetEventName () const =0
 Force events to give us a name. More...
virtual ~FbxEventBase ()
 Destructor. More...

Static Public Member Functions

static void ForceTypeId (int pTypeId)
 Update the type ID of current event with the given type ID. More...
static int GetStaticTypeId ()
 Retrieve the event type ID. More...

Additional Inherited Members

- Static Protected Member Functions inherited from FbxEventBase
static int GetStaticTypeId (const char *)

Constructor & Destructor Documentation

◆ ~FbxEvent()

virtual ~FbxEvent ( )


Definition at line 138 of file fbxevent.h.

138 {}

Member Function Documentation

◆ ForceTypeId()

static void ForceTypeId ( int  pTypeId)

Update the type ID of current event with the given type ID.

pTypeIdthe new type ID.

Definition at line 143 of file fbxevent.h.

144  {
145  // This is to handle specific cases where the type ID must be hard coded
146  // It is useful for shared event across DLL. We can then guarantee that
147  // The ID of a certain type will always have the same ID
148  smTypeId = pTypeId;
149  }

◆ GetTypeId()

virtual int GetTypeId ( ) const

Retrieve the event type ID.

This may be called from multiple threads.
type id

Implements FbxEventBase.

Definition at line 155 of file fbxevent.h.

156  {
157  return GetStaticTypeId();
158  }
static int GetStaticTypeId()
Retrieve the event type ID.
Definition: fbxevent.h:163

◆ GetStaticTypeId()

static int GetStaticTypeId ( )

Retrieve the event type ID.

type id

Definition at line 163 of file fbxevent.h.

164  {
165  if( !smTypeId )
166  {
167  if( !smTypeId )
168  {
169  // If this does not compile, you need to add
170  // FBXSDK_EVENT_DECLARE(YourEventClassName) to your class declaration
171  smTypeId = FbxEventBase::GetStaticTypeId(T::FbxEventName());
172  }
173  }
175  return smTypeId;
176  }
static int GetStaticTypeId(const char *)

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