FBX C++ API Reference
All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
FbxClassId Class Reference

#include <fbxclassid.h>

Class Description

Internal class used to differentiate objects during run-time.

Essentially, each class has an unique ClassId, that the system can request in order to test if the class match the description. This class implement the necessary tools to be able to perform hierarchic class testing. This means that a class B that inherits from the class A will answer yes to a "Is A" query of type A or B, but will answer no to a class C that can still inherit from A. All class must inherit from FbxObject before they can have their own ClassId. When using the standard macros to create new types of objects in the FBX SDK, a static ClassId will automatically be generated for that new class.

When objects are exported to an FBX file, their class type is maintained using 3 sort of strings. They are the Object Type string, the Object Sub Type string and the Object Type Prefix. There is no good or bad way to choose the value of these identifiers, but it is preferable to use meaningful values to keep the ASCII version of FBX readable and easy to understand.

See also
FbxObject

Definition at line 39 of file fbxclassid.h.

Public Member Functions

 FbxClassId ()
 Constructor. More...
 
 FbxClassId (const char *pClassName, const FbxClassId &pParentClassId, FbxObjectCreateProc pConstructor=0, const char *pFBXType=((void *) 0), const char *pFBXSubType=((void *) 0))
 Advanced constructor were we can specify the general parameters for this ClassId. More...
 
void Destroy ()
 Destructor. More...
 
const char * GetName () const
 Retrieve the class name. More...
 
FbxClassId GetParent () const
 Retrieve the parent ClassId. More...
 
FbxObjectCreate (FbxManager &pManager, const char *pName, const FbxObject *pFrom)
 Create an instance of this class. More...
 
bool Override (FbxObjectCreateProc pConstructor)
 Override the function pointer method to construct this object. More...
 
bool Is (const FbxClassId &pId) const
 Test if this class is a hierarchical children of the specified class type. More...
 
bool operator== (const FbxClassId &pClassId) const
 Equivalence operator. More...
 
bool operator!= (const FbxClassId &pClassId) const
 Inequivalence operator. More...
 
const char * GetFbxFileTypeName (bool pAskParent=false) const
 Retrieve the FBX file Object Type string associated to this class. More...
 
const char * GetFbxFileSubTypeName () const
 Retrieve the FBX file Object Sub Type string associated to this class. More...
 
bool IsValid () const
 Find out if self ClassId is valid or not. More...
 
void SetObjectTypePrefix (const char *pObjectTypePrefix)
 Set the Object Type Prefix string associated to this class. More...
 
const char * GetObjectTypePrefix ()
 Retrieve the Object Type Prefix string associated to this class. More...
 
FbxPropertyHandleGetRootClassDefaultPropertyHandle ()
 Retrieve the root property handle of this class. More...
 
int ClassInstanceIncRef ()
 Increase the instance reference count for this class type. More...
 
int ClassInstanceDecRef ()
 Decrease the instance reference count for this class type. More...
 
int GetInstanceRef ()
 Retrieve the instance reference count for this class type. More...
 

Constructor & Destructor Documentation

◆ FbxClassId() [1/2]

Constructor.

◆ FbxClassId() [2/2]

FbxClassId ( const char *  pClassName,
const FbxClassId pParentClassId,
FbxObjectCreateProc  pConstructor = 0,
const char *  pFBXType = ((void *) 0),
const char *  pFBXSubType = ((void *) 0) 
)

Advanced constructor were we can specify the general parameters for this ClassId.

Parameters
pClassNameThe name of the class represented.
pParentClassIdThe parent ClassId of this class.
pConstructorA function pointer to a construction method for this ClassId.
pFBXTypeThe FBX file Object Type string associated to this class.
pFBXSubTypeThe FBX file Object Sub Type string associated to this class.

Member Function Documentation

◆ Destroy()

void Destroy ( )

Destructor.

◆ GetName()

const char* GetName ( ) const

Retrieve the class name.

Returns
The class identification string name.

◆ GetParent()

FbxClassId GetParent ( ) const

Retrieve the parent ClassId.

Returns
The parent ClassId.

◆ Create()

FbxObject* Create ( FbxManager pManager,
const char *  pName,
const FbxObject pFrom 
)

Create an instance of this class.

Parameters
pManagerThe FBX SDK Manager to be used to instantiate this object. This allow the object to use the same memory manager as the provided manager.
pNameThe name to assign to this new object instance.
pFromAn object to clone if it matches the same ClassId. This is an optional parameter.
Returns
The newly created instance of this class.

◆ Override()

bool Override ( FbxObjectCreateProc  pConstructor)

Override the function pointer method to construct this object.

Parameters
pConstructorA newly defined function pointer to a construction method to replace the existing one.
Returns
True if the operation was successful.

◆ Is()

bool Is ( const FbxClassId pId) const

Test if this class is a hierarchical children of the specified class type.

This is the standard method to differentiate object classes.

Parameters
pIdThe class type to test against self.
Returns
True if the object is a hierarchical children of the type specified.
Remarks
This function will perform a complete search until it reaches the top level class, but it will stop as soon as one ClassId matches the test.
Examples:
ImportScene/DisplayMaterial.cxx.

◆ operator==()

bool operator== ( const FbxClassId pClassId) const

Equivalence operator.

Parameters
pClassIdThe class type to test against self.
Returns
true if the ClassId is exactly the same, false otherwise.
Remarks
This function only perform direct equality test, and doesn't test hierarchic children.

◆ operator!=()

bool operator!= ( const FbxClassId pClassId) const

Inequivalence operator.

Parameters
pClassIdThe class type to test against self.
Returns
true if the ClassId is not the same, false otherwise.
Remarks
This function only perform direct inequality test, and doesn't test hierarchic children.

◆ GetFbxFileTypeName()

const char* GetFbxFileTypeName ( bool  pAskParent = false) const

Retrieve the FBX file Object Type string associated to this class.

Parameters
pAskParentIf true, retrieve the parent ClassId, but only if self ClassId is not valid.
Returns
The FBX file Object Type string associated to this class.

◆ GetFbxFileSubTypeName()

const char* GetFbxFileSubTypeName ( ) const

Retrieve the FBX file Object Sub Type string associated to this class.

Returns
The FBX file Object Sub Type string associated to this class.

◆ IsValid()

bool IsValid ( ) const
inline

Find out if self ClassId is valid or not.

Returns
true if self ClassId is valid, false otherwise.

Definition at line 105 of file fbxclassid.h.

105 { return mClassInfo ? true : false; }

◆ SetObjectTypePrefix()

void SetObjectTypePrefix ( const char *  pObjectTypePrefix)

Set the Object Type Prefix string associated to this class.

This will change the "ObjectTypePrefix::" found in front of object name in the FBX file. This is useful to differentiate objects by their name without using the Object Type or Sub Type strings in the file.

Parameters
pObjectTypePrefixThe Object Type prefix string.

◆ GetObjectTypePrefix()

const char* GetObjectTypePrefix ( )

Retrieve the Object Type Prefix string associated to this class.

Returns
The Object Type Prefix string.

◆ GetRootClassDefaultPropertyHandle()

FbxPropertyHandle* GetRootClassDefaultPropertyHandle ( )

Retrieve the root property handle of this class.

This is useful to access the default property hierarchy for this class. This allow users to retrieve information such as the default value for all properties of this class.

Returns
The root property handle for this class.

◆ ClassInstanceIncRef()

int ClassInstanceIncRef ( )

Increase the instance reference count for this class type.

Returns
the new count of reference to this class after increment.

◆ ClassInstanceDecRef()

int ClassInstanceDecRef ( )

Decrease the instance reference count for this class type.

Returns
the new count of reference to this class after decrement.

◆ GetInstanceRef()

int GetInstanceRef ( )

Retrieve the instance reference count for this class type.

Returns
The reference count of this class type.

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