fbxclassid.h

Go to the documentation of this file.
00001 /****************************************************************************************
00002  
00003    Copyright (C) 2013 Autodesk, Inc.
00004    All rights reserved.
00005  
00006    Use of this software is subject to the terms of the Autodesk license agreement
00007    provided at the time of installation or download, or which otherwise accompanies
00008    this software in either electronic or hard copy form.
00009  
00010 ****************************************************************************************/
00011 
00013 #ifndef _FBXSDK_CORE_CLASSID_H_
00014 #define _FBXSDK_CORE_CLASSID_H_
00015 
00016 #include <fbxsdk/fbxsdk_def.h>
00017 
00018 #include <fbxsdk/fbxsdk_nsbegin.h>
00019 
00020 class FbxClassIdInfo;
00021 class FbxObject;
00022 class FbxPropertyHandle;
00023 class FbxManager;
00024 
00026 typedef FbxObject* (*FbxObjectCreateProc)(FbxManager& pManager, const char* pName, const FbxObject* pFrom);
00027 
00039 class FBXSDK_DLL FbxClassId
00040 {
00041 public:
00043     FbxClassId();
00044 
00051     FbxClassId(const char* pClassName, const FbxClassId& pParentClassId, FbxObjectCreateProc pConstructor=0, const char* pFBXType=NULL, const char* pFBXSubType=NULL);
00052 
00054     void Destroy();
00055 
00058     const char* GetName() const;
00059 
00062     FbxClassId GetParent() const;
00063 
00069     FbxObject* Create(FbxManager& pManager, const char* pName, const FbxObject* pFrom);
00070 
00074     bool Override(FbxObjectCreateProc pConstructor);
00075 
00080     bool Is(const FbxClassId& pId) const;
00081 
00086     bool operator==(const FbxClassId& pClassId) const;
00087 
00092     bool operator!=(const FbxClassId& pClassId) const;
00093 
00097     const char* GetFbxFileTypeName(bool pAskParent=false) const;
00098 
00102     const char* GetFbxFileSubTypeName() const;
00103 
00106     inline bool IsValid() const { return mClassInfo ? true : false; }
00107     
00112     void SetObjectTypePrefix(const char* pObjectTypePrefix);
00113 
00116     const char* GetObjectTypePrefix();
00117    
00121     FbxPropertyHandle* GetRootClassDefaultPropertyHandle();
00122 
00125     int ClassInstanceIncRef();
00126 
00129     int ClassInstanceDecRef();
00130      
00133     int GetInstanceRef();
00134 
00135 /*****************************************************************************************************************************
00136 ** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
00137 *****************************************************************************************************************************/
00138 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00139     inline FbxClassIdInfo* GetClassIdInfo() { return mClassInfo; }
00140     inline const FbxClassIdInfo* GetClassIdInfo() const { return mClassInfo; }
00141 
00142 private:
00143     FbxClassId(FbxClassIdInfo* mClassInfo);
00144 
00145     bool SetFbxFileTypeName(const char* pName);
00146     bool SetFbxFileSubTypeName(const char* pName);
00147 
00148     FbxClassIdInfo* mClassInfo;
00149 
00150     friend class FbxManager;
00151 #endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
00152 };
00153 
00154 #include <fbxsdk/fbxsdk_nsend.h>
00155 
00156 #endif /* _FBXSDK_CORE_CLASSID_H_ */