Go to the
documentation of this file.
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00013 #ifndef _FBXSDK_UTILS_CLONE_MANAGER_H_
00014 #define _FBXSDK_UTILS_CLONE_MANAGER_H_
00015
00016 #include <fbxsdk/fbxsdk_def.h>
00017
00018 #include <fbxsdk/core/fbxobject.h>
00019 #include <fbxsdk/core/fbxquery.h>
00020 #include <fbxsdk/core/fbxpropertymap.h>
00021 #include <fbxsdk/core/base/fbxarray.h>
00022
00023 #include <fbxsdk/fbxsdk_nsbegin.h>
00024
00048 class FBXSDK_DLL FbxCloneManager
00049 {
00050 public:
00051
00053 static const int sMaximumCloneDepth;
00054
00058 static const int sConnectToOriginal;
00059
00064 static const int sConnectToClone;
00065
00072 struct FBXSDK_DLL CloneSetElement
00073 {
00074 public:
00082 CloneSetElement( int pSrcPolicy = 0,
00083 int pExternalDstPolicy = 0,
00084 FbxObject::ECloneType pCloneType = FbxObject::eReferenceClone );
00085
00087 FbxObject::ECloneType mType;
00088
00092 int mSrcPolicy;
00093
00098 int mExternalDstPolicy;
00099
00103 FbxObject* mObjectClone;
00104 };
00105
00108 class FBXSDK_DLL ObjectCompare
00109 {
00110 public:
00115 inline int operator()(FbxObject* const& pKeyA, FbxObject* const& pKeyB) const
00116 {
00117 return (pKeyA < pKeyB) ? -1 : ((pKeyB < pKeyA) ? 1 : 0);
00118 }
00119 };
00120
00126 typedef FbxMap<FbxObject*,CloneSetElement,ObjectCompare> CloneSet;
00127
00130 FbxCloneManager();
00131
00134 virtual ~FbxCloneManager();
00135
00143 virtual bool Clone( CloneSet& pSet, FbxObject* pContainer = NULL ) const;
00144
00154 virtual void AddDependents( CloneSet& pSet,
00155 const FbxObject* pObject,
00156 const CloneSetElement& pCloneOptions = CloneSetElement(),
00157 FbxCriteria pTypes = FbxCriteria::ObjectType(FbxObject::ClassId),
00158 int pDepth = sMaximumCloneDepth ) const;
00159
00160
00162
00163
00164
00165
00166
00167
00169 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00170 protected:
00171 bool CloneConnections( CloneSet::RecordType* pIterator, const CloneSet& pSet ) const;
00172
00173 #endif // #ifndef DOXYGEN_SHOULD_SKIP_THIS
00174 };
00175
00176 #include <fbxsdk/fbxsdk_nsend.h>
00177
00178 #endif