Public Member Functions | Friends

kFbxClassId Class Reference

This reference page is linked to from the following overview topics: List of Python FBX classes.


Search for all occurrences

Detailed 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 KFbxPlug before they can have their own ClassId. Generally, classes inherit from KFbxObject rather than KFbxPlug, since it offer much more functionality and support throughout the FBX SDK API. 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:
KFbxPlug, KFbxObject

Definition at line 72 of file kfbxplug.h.

#include <kfbxplug.h>

List of all members.

Public Member Functions

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

Friends

class  KFbxSdkManager

Constructor & Destructor Documentation

Constructor.

kFbxClassId ( const char *  pClassName,
const kFbxClassId pParentClassId,
kFbxPlugConstructor  pConstructor = 0,
const char *  pFBXType = NULL,
const char *  pFBXSubType = NULL 
)

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

Parameters:
pClassName The name of the class represented.
pParentClassId The parent ClassId of this class.
pConstructor A function pointer to a construction method for this ClassId.
pFBXType The FBX file Object Type string associated to this class.
pFBXSubType The FBX file Object Sub Type string associated to this class.

Member Function Documentation

void Destroy ( )
const char* GetName ( ) const

Retrieve the class name.

Returns:
The class identification string name.
kFbxClassId GetParent ( ) const

Retrieve the parent ClassId.

Returns:
The parent ClassId.
KFbxPlug* Create ( KFbxSdkManager pManager,
const char *  pName,
const KFbxPlug pFrom 
)

Create an instance of this class.

Parameters:
pManager The FBX SDK Manager to be used to instantiate this object. This allow the object to use the same memory manager as the provided manager.
pName The name to assign to this new object instance.
pFrom An object to clone if it matches the same ClassId. This is an optional parameter.
Returns:
The newly created instance of this class.
bool Override ( kFbxPlugConstructor  pConstructor )

Override the function pointer method to construct this object.

Parameters:
pConstructor A newly defined function pointer to a construction method to replace the existing one.
Returns:
True if the operation was successful.
bool Is ( kFbxClassId const  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:
pId The 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.
bool operator== ( kFbxClassId const &  pClassId ) const

Equivalence operator.

Parameters:
pClassId The class type to test against self.
Returns:
True if the ClassId is exactly the same.
Remarks:
This function only perform direct equality test, and doesn't test hierarchic children.
bool operator!= ( kFbxClassId const &  pClassId ) const

Inequivalence operator.

Parameters:
pClassId The class type to test against self.
Returns:
True if the ClassId is not the same.
Remarks:
This function only perform direct inequality test, and doesn't test hierarchic children.
KFbxClassIdInfo* GetClassIdInfo ( ) [inline]

Retrieve the information associated to this ClassId.

Returns:
Various class information such as the constructor function pointer or the parent ClassId.

Definition at line 139 of file kfbxplug.h.

{ return mClassInfo; }
const KFbxClassIdInfo* GetClassIdInfo ( ) const [inline]

Retrieve the information associated to this ClassId.

Returns:
Various class information such as the constructor function pointer or the parent ClassId.

Definition at line 144 of file kfbxplug.h.

{ return mClassInfo; }
const char* GetFbxFileTypeName ( bool  pAskParent = false ) const

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

Parameters:
pAskParent If True, retrieve the parent ClassId, but only if self ClassId is not valid.
Returns:
The FBX file Object Type string associated to this class.
const char* GetFbxFileSubTypeName ( ) const

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

Parameters:
pAskParent If True, retrieve the parent ClassId, but only if self ClassId is not valid.
Returns:
The FBX file Object Sub Type string associated to this class.
bool IsValid ( ) const [inline]

Find out if self ClassId is valid or not.

Returns:
True if self ClassId is valid.

Definition at line 162 of file kfbxplug.h.

{ return mClassInfo ? true : false; }
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:
pObjectTypePrefix The Object Type Prefix string.
const char* GetObjectTypePrefix ( )

Retrieve the Object Type Prefix string associated to this class.

Returns:
The Object Type Prefix string.
KFbxPropertyHandle* 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.
int ClassInstanceIncRef ( )

Increase the instance reference count for this class type.

Returns:
The new count of reference to this class after increment.
int ClassInstanceDecRef ( )

Decrease the instance reference count for this class type.

Returns:
The new count of reference to this class after decrement.
int GetInstanceRef ( )

Retrieve the instance reference count for this class type.

Returns:
The reference count of this class type.

Friends And Related Function Documentation

friend class KFbxSdkManager [friend]

Definition at line 214 of file kfbxplug.h.


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

kFbxClassId kFbxClassId kFbxClassId kFbxClassId kFbxClassId kFbxClassId kFbxClassId kFbxClassId kFbxClassId kFbxClassId
kFbxClassId kFbxClassId kFbxClassId kFbxClassId kFbxClassId kFbxClassId kFbxClassId kFbxClassId kFbxClassId kFbxClassId