FBX C++ API Reference
fbxclassid.h
Go to the documentation of this file.
1 /****************************************************************************************
2 
3  Copyright (C) 2015 Autodesk, Inc.
4  All rights reserved.
5 
6  Use of this software is subject to the terms of the Autodesk license agreement
7  provided at the time of installation or download, or which otherwise accompanies
8  this software in either electronic or hard copy form.
9 
10 ****************************************************************************************/
11 
13 #ifndef _FBXSDK_CORE_CLASSID_H_
14 #define _FBXSDK_CORE_CLASSID_H_
15 
16 #include <fbxsdk/fbxsdk_def.h>
17 
18 #include <fbxsdk/fbxsdk_nsbegin.h>
19 
20 class FbxClassIdInfo;
21 class FbxObject;
22 class FbxPropertyHandle;
23 class FbxManager;
24 
26 typedef FbxObject* (*FbxObjectCreateProc)(FbxManager& pManager, const char* pName, const FbxObject* pFrom);
27 
40 {
41 public:
43  FbxClassId();
44 
51  FbxClassId(const char* pClassName, const FbxClassId& pParentClassId, FbxObjectCreateProc pConstructor=0, const char* pFBXType=NULL, const char* pFBXSubType=NULL);
52 
54  void Destroy();
55 
58  const char* GetName() const;
59 
62  FbxClassId GetParent() const;
63 
69  FbxObject* Create(FbxManager& pManager, const char* pName, const FbxObject* pFrom);
70 
74  bool Override(FbxObjectCreateProc pConstructor);
75 
80  bool Is(const FbxClassId& pId) const;
81 
86  bool operator==(const FbxClassId& pClassId) const;
87 
92  bool operator!=(const FbxClassId& pClassId) const;
93 
97  const char* GetFbxFileTypeName(bool pAskParent=false) const;
98 
101  const char* GetFbxFileSubTypeName() const;
102 
105  inline bool IsValid() const { return mClassInfo ? true : false; }
106 
111  void SetObjectTypePrefix(const char* pObjectTypePrefix);
112 
115  const char* GetObjectTypePrefix();
116 
120  FbxPropertyHandle* GetRootClassDefaultPropertyHandle();
121 
124  int ClassInstanceIncRef();
125 
128  int ClassInstanceDecRef();
129 
132  int GetInstanceRef();
133 
134 /*****************************************************************************************************************************
135 ** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
136 *****************************************************************************************************************************/
137 #ifndef DOXYGEN_SHOULD_SKIP_THIS
138  inline FbxClassIdInfo* GetClassIdInfo() { return mClassInfo; }
139  inline const FbxClassIdInfo* GetClassIdInfo() const { return mClassInfo; }
140 
141 private:
142  FbxClassId(FbxClassIdInfo* mClassInfo);
143 
144  bool SetFbxFileTypeName(const char* pName);
145  bool SetFbxFileSubTypeName(const char* pName);
146 
147  FbxClassIdInfo* mClassInfo;
148 
149  friend class FbxManager;
150 #endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
151 };
152 
155 {
156  inline int operator()(const FbxClassId& pKeyA, const FbxClassId& pKeyB) const
157  {
158  const FbxClassIdInfo* lKeyA = pKeyA.GetClassIdInfo();
159  const FbxClassIdInfo* lKeyB = pKeyB.GetClassIdInfo();
160  return lKeyA < lKeyB ? -1 : (lKeyA > lKeyB ? 1 : 0);
161  }
162 };
163 
164 #include <fbxsdk/fbxsdk_nsend.h>
165 
166 #endif /* _FBXSDK_CORE_CLASSID_H_ */
Class to manage property handle.
FBX SDK environment definition.
SDK object manager.
Definition: fbxmanager.h:56
Functor to compare FbxClassId.
Definition: fbxclassid.h:154
#define NULL
Definition: fbxarch.h:210
FbxObject *(* FbxObjectCreateProc)(FbxManager &pManager, const char *pName, const FbxObject *pFrom)
The function pointer type for object constructor functions.
Definition: fbxclassid.h:26
The base class of most FBX objects.
Definition: fbxobject.h:157
bool IsValid() const
Find out if self ClassId is valid or not.
Definition: fbxclassid.h:105
int operator()(const FbxClassId &pKeyA, const FbxClassId &pKeyB) const
Definition: fbxclassid.h:156
Internal class used to differentiate objects during run-time.
Definition: fbxclassid.h:39
#define FBXSDK_DLL
Definition: fbxarch.h:173