- Main Page
- Classes
- Files
- Directories
- Examples

- File List
- File Members

# fbxproperty.h

Go to the documentation of this file.

    00001 /****************************************************************************************
    00002
    00003    Copyright (C) 2012 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_PROPERTY_H_
    00014 #define _FBXSDK_CORE_PROPERTY_H_
    00015
    00016 #include <fbxsdk/fbxsdk_def.h>
    00017
    00018 #include <fbxsdk/core/fbxplug.h>
    00019 #include <fbxsdk/core/fbxpropertytypes.h>
    00020 #include <fbxsdk/core/fbxdatatypes.h>
    00021 #include <fbxsdk/core/fbxpropertydef.h>
    00022 #include <fbxsdk/core/base/fbxmap.h>
    00023
    00024 #include <fbxsdk/fbxsdk_nsbegin.h>
    00025
    00026 // Forward declarations
    00027 class FbxObject;
    00028 class FbxColor;
    00029 class FbxCriteria;
    00030 class FbxAnimLayer;
    00031 class FbxAnimCurveNode;
    00032 class FbxAnimCurve;
    00033
    00037 class FBXSDK_DLL FbxProperty
    00038 {
    00039 public:
    00052         static FbxProperty Create(const FbxProperty& pCompoundProperty, const FbxDataType& pDataType, const char* pName, const char* pLabel="", bool pCheckForDup=true, bool* pWasFound=NULL);
    00053
    00062         static FbxProperty Create(FbxObject* pObject, const FbxDataType& pDataType, const char* pName, const char* pLabel="", bool pCheckForDup=true, bool* pWasFound=NULL);
    00063
    00070         static FbxProperty CreateFrom(const FbxProperty& pCompoundProperty, FbxProperty& pFromProperty, bool pCheckForDup=true);
    00071
    00078         static FbxProperty CreateFrom(FbxObject* pObject, FbxProperty& pFromProperty, bool pCheckForDup=true);
    00079
    00082         void Destroy();
    00083
    00087         void DestroyRecursively();
    00088
    00092         void DestroyChildren();
    00093
    00096         FbxProperty();
    00097
    00101         FbxProperty(const FbxProperty& pProperty);
    00102
    00106         FbxProperty(const FbxPropertyHandle& pPropertyHandle);
    00107
    00110         ~FbxProperty();
    00112
    00120         FbxDataType GetPropertyDataType() const;
    00121
    00125         FbxString GetName() const;
    00126
    00130         const char* GetNameAsCStr() const;
    00131
    00135         FbxString GetHierarchicalName() const;
    00136
    00146         FbxString GetLabel(bool pReturnNameIfEmpty=true) const;
    00147
    00148
    00152         void SetLabel(const FbxString& pLabel);
    00153
    00157         FbxObject* GetFbxObject() const;
    00159
    00167         void SetUserTag(int pTag);
    00168
    00170         int GetUserTag();
    00171
    00175         void SetUserDataPtr(void* pUserData);
    00176
    00180         void* GetUserDataPtr();
    00182
    00191         void ModifyFlag(FbxPropertyAttr::EFlags pFlag, bool pValue);
    00192
    00197         bool GetFlag(FbxPropertyAttr::EFlags pFlag) const;
    00198
    00203         FbxPropertyAttr::EInheritType GetFlagInheritType( FbxPropertyAttr::EFlags pFlag ) const;
    00204
    00210         bool SetFlagInheritType( FbxPropertyAttr::EFlags pFlag, FbxPropertyAttr::EInheritType pType );
    00211
    00216         bool ModifiedFlag( FbxPropertyAttr::EFlags pFlag ) const;
    00218
    00227         FbxProperty& operator= (const FbxProperty& pProperty);
    00228
    00233         bool operator== (const FbxProperty& pProperty) const;
    00234
    00239         bool operator!= (const FbxProperty& pProperty) const;
    00240
    00245         inline bool operator== (int pValue) const { return (pValue == 0) ? !IsValid() : IsValid(); }
    00246
    00251         inline bool operator!= (int pValue) const { return (pValue != 0) ? !IsValid() : IsValid(); }
    00252
    00257         bool CompareValue(const FbxProperty& pProperty) const;
    00259
    00264     bool CopyValue(const FbxProperty& pProperty);
    00265
    00274         template <class T> inline T Get() const { T lValue; Get(&lValue, FbxTypeOf(lValue)); return lValue; }
    00275
    00280         template <class T> inline bool Set(const T& pValue){ return Set(&pValue, FbxTypeOf(pValue)); }
    00281
    00285         bool IsValid() const;
    00286
    00295         static bool HasDefaultValue(FbxProperty& pProperty);
    00296
    00302         FbxPropertyAttr::EInheritType GetValueInheritType() const;
    00303
    00314         bool SetValueInheritType( FbxPropertyAttr::EInheritType pType );
    00315
    00323         bool Modified() const;
    00325
    00341         void SetMinLimit(double pMin);
    00342
    00347         bool HasMinLimit() const;
    00348
    00352         double GetMinLimit() const;
    00353
    00358         bool HasMaxLimit() const;
    00359
    00363         void SetMaxLimit(double pMax);
    00364
    00368         double GetMaxLimit() const;
    00369
    00374         void SetLimits(double pMin, double pMax);
    00376
    00387         int AddEnumValue(const char* pStringValue);
    00388
    00396         void InsertEnumValue(int pIndex, const char* pStringValue);
    00397
    00402         int GetEnumCount() const;
    00403
    00412         void SetEnumValue(int pIndex, const char* pStringValue);
    00413
    00418         void RemoveEnumValue(int pIndex);
    00419
    00424         const char* GetEnumValue(int pIndex) const;
    00426
    00434         inline bool IsRoot() const { return mPropertyHandle.IsRoot(); }
    00435
    00440         inline bool IsChildOf(const FbxProperty& pParent) const { return mPropertyHandle.IsChildOf(pParent.mPropertyHandle); }
    00441
    00446         inline bool IsDescendentOf(const FbxProperty& pAncestor) const { return mPropertyHandle.IsDescendentOf(pAncestor.mPropertyHandle); }
    00447
    00451         inline FbxProperty GetParent() const { return FbxProperty(mPropertyHandle.GetParent());  }
    00452
    00457         bool SetParent(const FbxProperty& pOther);
    00458
    00462         inline FbxProperty GetChild() const { return FbxProperty(mPropertyHandle.GetChild());   }
    00463
    00467         inline FbxProperty GetSibling() const { return FbxProperty(mPropertyHandle.GetSibling()); }
    00468
    00472         inline FbxProperty GetFirstDescendent() const { return FbxProperty(mPropertyHandle.GetFirstDescendent());   }
    00473
    00478         inline FbxProperty GetNextDescendent(const FbxProperty& pProperty) const { return FbxProperty(mPropertyHandle.GetNextDescendent(pProperty.mPropertyHandle)); }
    00479
    00486         inline FbxProperty Find (const char* pName, bool pCaseSensitive = true) const { return FbxProperty(mPropertyHandle.Find(pName,pCaseSensitive));  }
    00487
    00495         inline FbxProperty Find (const char* pName, const FbxDataType& pDataType, bool pCaseSensitive = true) const { return FbxProperty(mPropertyHandle.Find(pName,pDataType.GetTypeInfoHandle(),pCaseSensitive));  }
    00496
    00503         inline FbxProperty FindHierarchical (const char* pName, bool pCaseSensitive = true) const { return FbxProperty(mPropertyHandle.Find(pName,sHierarchicalSeparator,pCaseSensitive));  }
    00504
    00512         inline FbxProperty FindHierarchical (const char* pName, const FbxDataType& pDataType, bool pCaseSensitive = true) const { return FbxProperty(mPropertyHandle.Find(pName,sHierarchicalSeparator,pDataType.GetTypeInfoHandle(),pCaseSensitive));  }
    00514
    00519
    00520         inline void BeginCreateOrFindProperty(){ mPropertyHandle.BeginCreateOrFindProperty(); }
    00521
    00523         inline void EndCreateOrFindProperty(){ mPropertyHandle.EndCreateOrFindProperty(); }
    00524
    00526         class FbxPropertyNameCache
    00527         {
    00528         public:
    00532             FbxPropertyNameCache(const FbxProperty& prop) : mProp(const_cast<FbxProperty&>(prop)){ mProp.BeginCreateOrFindProperty(); }
    00533
    00535             ~FbxPropertyNameCache(){ mProp.EndCreateOrFindProperty(); }
    00536
    00537         private:
    00538             FbxProperty& mProp;
    00539             FbxPropertyNameCache& operator=(const FbxPropertyNameCache& pOther){ mProp = pOther.mProp; mProp.BeginCreateOrFindProperty(); return *this; }
    00540         };
    00542
    00551     bool    SetArraySize( int pSize, bool pVariableArray );
    00552
    00554     int     GetArraySize() const;
    00555
    00560     FbxProperty GetArrayItem(int pIndex) const;
    00561
    00566     inline FbxProperty operator[](int pIndex) const { return GetArrayItem(pIndex); }
    00568
    00581     FbxAnimCurveNode* CreateCurveNode(FbxAnimLayer* pAnimLayer);
    00582
    00591     FbxAnimCurveNode* GetCurveNode(FbxAnimLayer* pAnimLayer, bool pCreateAsNeeded=false);
    00592
    00598     FbxAnimCurveNode* GetCurveNode(bool pCreateAsNeeded=false, const char* pAnimStackName = NULL);
    00599
    00613     template <class T> inline T* GetCurve(FbxAnimLayer* pAnimLayer, bool pCreateAsNeeded=false)
    00614     {
    00615         return FbxCast<T>(GetCurve(pAnimLayer, GetName(), NULL, pCreateAsNeeded));
    00616     }
    00617
    00633     template <class T> inline T* GetCurve(FbxAnimLayer* pAnimLayer, const char* pChannel, bool pCreateAsNeeded=false)
    00634     {
    00635         return FbxCast<T>(GetCurve(pAnimLayer, GetName(), pChannel, pCreateAsNeeded));
    00636     }
    00637
    00655     template <class T> inline T* GetCurve(FbxAnimLayer* pAnimLayer, const char* pName, const char* pChannel, bool pCreateAsNeeded=false)
    00656     {
    00657         return FbxCast<T>(GetCurve(pAnimLayer, pName, pChannel, pCreateAsNeeded));
    00658     }
    00660
    00665
    00666     // SrcObjects
    00672     bool    ConnectSrcObject(FbxObject* pObject,FbxConnection::EType pType=FbxConnection::eNone);
    00673
    00678     bool    IsConnectedSrcObject(const FbxObject* pObject) const;
    00679
    00684     bool    DisconnectSrcObject(FbxObject* pObject);
    00685
    00689     bool    DisconnectAllSrcObject();
    00690
    00695     bool    DisconnectAllSrcObject(const FbxCriteria& pCriteria);
    00696
    00701     bool    DisconnectAllSrcObject(const FbxClassId& pClassId);
    00702
    00708     bool    DisconnectAllSrcObject(const FbxClassId& pClassId, const FbxCriteria& pCriteria);
    00709
    00713     int     GetSrcObjectCount() const;
    00714
    00719     int     GetSrcObjectCount(const FbxCriteria& pCriteria) const;
    00720
    00725     int     GetSrcObjectCount(const FbxClassId& pClassId) const;
    00726
    00732     int     GetSrcObjectCount(const FbxClassId& pClassId, const FbxCriteria& pCriteria) const;
    00733
    00738     FbxObject*      GetSrcObject(int pIndex=0) const;
    00739
    00745     FbxObject*      GetSrcObject(const FbxCriteria& pCriteria, int pIndex=0) const;
    00746
    00752     FbxObject*      GetSrcObject(const FbxClassId& pClassId, int pIndex=0) const;
    00753
    00760     FbxObject*      GetSrcObject(const FbxClassId& pClassId, const FbxCriteria& pCriteria, int pIndex=0) const;
    00761
    00767     FbxObject*      FindSrcObject(const char* pName, int pStartIndex=0) const;
    00768
    00775     FbxObject*      FindSrcObject(const FbxCriteria& pCriteria, const char* pName, int pStartIndex=0) const;
    00776
    00783     FbxObject*      FindSrcObject(const FbxClassId& pClassId, const char* pName, int pStartIndex=0) const;
    00784
    00792     FbxObject*      FindSrcObject(const FbxClassId& pClassId, const FbxCriteria& pCriteria, const char* pName, int pStartIndex=0) const;
    00793
    00798     template < class T > inline bool DisconnectAllSrcObject (const T*){ return DisconnectAllSrcObject(T::ClassId);}
    00799
    00805     template < class T > inline bool DisconnectAllSrcObject (const T*, const FbxCriteria& pCriteria)  { return DisconnectAllSrcObject(T::ClassId,pCriteria);  }
    00806
    00811     template < class T > inline int  GetSrcObjectCount(const T*) const{ return GetSrcObjectCount(T::ClassId); }
    00812
    00818     template < class T > inline int  GetSrcObjectCount(const T*, const FbxCriteria& pCriteria) const { return GetSrcObjectCount(T::ClassId,pCriteria); }
    00819
    00825     template < class T > inline T*   GetSrcObject(const T*, int pIndex=0) const { return (T*)GetSrcObject(T::ClassId,pIndex); }
    00826
    00833     template < class T > inline T*   GetSrcObject(const T*, const FbxCriteria& pCriteria,int pIndex=0) const { return (T*)GetSrcObject(T::ClassId,pCriteria,pIndex); }
    00834
    00841     template < class T > inline T*   FindSrcObject(const T*, const char* pName, int pStartIndex=0) const { return (T*)FindSrcObject(T::ClassId,pName,pStartIndex); }
    00842
    00850     template < class T > inline T*   FindSrcObject(const T*, const FbxCriteria& pCriteria, const char* pName, int pStartIndex=0) const { return (T*)FindSrcObject(T::ClassId,pCriteria,pName,pStartIndex); }
    00851
    00852     // DstObjects
    00858     bool    ConnectDstObject(FbxObject* pObject, FbxConnection::EType pType=FbxConnection::eNone);
    00859
    00864     bool    IsConnectedDstObject(const FbxObject* pObject) const;
    00865
    00870     bool    DisconnectDstObject(FbxObject* pObject);
    00871
    00875     bool    DisconnectAllDstObject();
    00876
    00881     bool    DisconnectAllDstObject(const FbxCriteria& pCriteria);
    00882
    00887     bool    DisconnectAllDstObject(const FbxClassId& pClassId);
    00888
    00894     bool    DisconnectAllDstObject(const FbxClassId& pClassId, const FbxCriteria& pCriteria);
    00895
    00899     int     GetDstObjectCount() const;
    00900
    00905     int     GetDstObjectCount(const FbxCriteria& pCriteria) const;
    00906
    00911     int     GetDstObjectCount(const FbxClassId& pClassId) const;
    00912
    00918     int     GetDstObjectCount(const FbxClassId& pClassId, const FbxCriteria& pCriteria) const;
    00919
    00924     FbxObject*      GetDstObject(int pIndex=0) const;
    00925
    00931     FbxObject*      GetDstObject(const FbxCriteria& pCriteria, int pIndex=0) const;
    00932
    00938     FbxObject*      GetDstObject(const FbxClassId& pClassId, int pIndex=0) const;
    00939
    00946     FbxObject*      GetDstObject(const FbxClassId& pClassId, const FbxCriteria& pCriteria, int pIndex=0) const;
    00947
    00953     FbxObject*      FindDstObject(const char* pName, int pStartIndex=0) const;
    00954
    00961     FbxObject*      FindDstObject(const FbxCriteria& pCriteria, const char* pName, int pStartIndex=0) const;
    00962
    00969     FbxObject*      FindDstObject(const FbxClassId& pClassId, const char* pName, int pStartIndex=0) const;
    00970
    00978     FbxObject*      FindDstObject(const FbxClassId& pClassId, const FbxCriteria& pCriteria, const char* pName, int pStartIndex=0) const;
    00979
    00984     template < class T > inline bool DisconnectAllDstObject (const T*){ return DisconnectAllDstObject(T::ClassId);    }
    00985
    00991     template < class T > inline bool DisconnectAllDstObject (const T*, const FbxCriteria& pCriteria)  { return DisconnectAllDstObject(T::ClassId,pCriteria);  }
    00992
    00997     template < class T > inline int  GetDstObjectCount(const T*) const { return GetDstObjectCount(T::ClassId); }
    00998
    01004     template < class T > inline int  GetDstObjectCount(const T*, const FbxCriteria& pCriteria) const { return GetDstObjectCount(T::ClassId,pCriteria); }
    01005
    01011     template < class T > inline T*   GetDstObject(const T*, int pIndex=0) const { return (T*)GetDstObject(T::ClassId,pIndex); }
    01012
    01019     template < class T > inline T*   GetDstObject(const T*, const FbxCriteria& pCriteria, int pIndex=0) const { return (T*)GetDstObject(T::ClassId,pCriteria,pIndex); }
    01020
    01027     template < class T > inline T*   FindDstObject(const T*, const char* pName, int pStartIndex=0) const { return (T*)FindDstObject(T::ClassId,pName,pStartIndex); }
    01028
    01036     template < class T > inline T*   FindDstObject(const T*, const FbxCriteria& pCriteria, const char* pName, int pStartIndex=0) const { return (T*)FindDstObject(T::ClassId,pCriteria,pName,pStartIndex); }
    01038
    01043         // Properties
    01048         bool ConnectSrcProperty(const FbxProperty& pProperty);
    01049
    01054         bool IsConnectedSrcProperty(const FbxProperty& pProperty);
    01055
    01060         bool DisconnectSrcProperty(const FbxProperty& pProperty);
    01061
    01065         int GetSrcPropertyCount() const;
    01066
    01071         bool ConnectDstProperty(FbxProperty const&  pProperty);
    01072
    01077         bool IsConnectedDstProperty(const FbxProperty& pProperty);
    01078
    01083         bool DisconnectDstProperty(const FbxProperty& pProperty);
    01084
    01088         int GetDstPropertyCount() const;
    01089
    01091         void ClearConnectCache();
    01092
    01097         FbxProperty GetSrcProperty(int pIndex=0) const;
    01098
    01104         FbxProperty FindSrcProperty(const char* pName, int pStartIndex=0) const;
    01105
    01110         FbxProperty GetDstProperty(int pIndex=0) const;
    01111
    01117         FbxProperty FindDstProperty(const char* pName, int pStartIndex=0) const;
    01119
    01121     static const char* sHierarchicalSeparator;
    01122
    01124 //  WARNING!
    01125 //  Anything beyond these lines may not be documented accurately and is
    01126 //  subject to change without notice.
    01128 #ifndef DOXYGEN_SHOULD_SKIP_THIS
    01129 protected:
    01130     FbxProperty(FbxObject* pObject, char const* pName, const FbxDataType& pDataType=FbxDataType(), const char* pLabel="");
    01131     FbxProperty(const FbxProperty& pParent, const char* pName, const FbxDataType& pDataType, const char* pLabel);
    01132
    01133     bool Set(const void* pValue, const EFbxType& pValueType, bool pCheckForValueEquality=true);
    01134     bool Get(void* pValue, const EFbxType& pValueType) const;
    01135
    01136 private:
    01137     inline void*    Get() const { FBX_ASSERT_NOW("Cannot get property value as void!"); return NULL; }
    01138     inline bool     Set(const void* &){ FBX_ASSERT_NOW("Cannot set property value as void!"); return false; }
    01139
    01140     bool            ConnectSrc(const FbxProperty& pProperty, FbxConnection::EType pType=FbxConnection::eNone);
    01141     bool            DisconnectSrc(const FbxProperty& pProperty);
    01142     bool            DisconnectAllSrc();
    01143     bool            DisconnectAllSrc(const FbxCriteria& pCriteria);
    01144     bool            IsConnectedSrc(const FbxProperty& pProperty) const;
    01145     int             GetSrcCount() const;
    01146     int             GetSrcCount(const FbxCriteria& pCriteria) const;
    01147     FbxProperty     GetSrc(int pIndex=0) const;
    01148     FbxProperty     GetSrc(const FbxCriteria& pCriteria, int pIndex=0) const;
    01149     FbxProperty     FindSrc(const FbxCriteria& pCriteria, const char* pName, int pStartIndex=0) const;
    01150
    01151     bool            ConnectDst(const FbxProperty& pProperty, FbxConnection::EType pType=FbxConnection::eNone);
    01152     bool            DisconnectDst(const FbxProperty& pProperty);
    01153     bool            DisconnectAllDst();
    01154     bool            DisconnectAllDst(const FbxCriteria& pCriteria);
    01155     bool            IsConnectedDst(const FbxProperty& pProperty) const;
    01156     int             GetDstCount() const;
    01157     int             GetDstCount(const FbxCriteria& pCriteria) const;
    01158     FbxProperty     GetDst(int pIndex=0) const;
    01159     FbxProperty     GetDst(const FbxCriteria& pCriteria, int pIndex=0) const;
    01160     FbxProperty     FindDst(const FbxCriteria& pCriteria, const char* pName, int pStartIndex=0) const;
    01161
    01162     FbxAnimCurve*   GetCurve(FbxAnimLayer* pAnimLayer, const char* pName, const char* pChannel, bool pCreateAsNeeded);
    01163
    01164     mutable FbxPropertyHandle mPropertyHandle;
    01165
    01166     friend class FbxObject;
    01167     friend class FbxIOSettings;
    01168     friend class FbxBindingOperator;
    01169     friend class FbxAnimEvalClassic;
    01170     friend void FbxMarkObject(FbxObject* pObject, FbxMap<FbxObject*, int>& pObjectDstDisconnectCount, FbxSet2<FbxObject*>& pObjectsToDeleted, FbxArray<FbxObject*>& pObjectToDeletedInSequence);
    01171     friend void FbxCleanUpConnectionsAtDestructionBoundary(FbxScene* pObject, FbxArray<FbxObject*>& pObjectToDeletedInSequence);
    01172 #endif // #ifndef DOXYGEN_SHOULD_SKIP_THIS
    01173 };
    01174
    01178 template <class T> class FbxPropertyT : public FbxProperty
    01179 {
    01180 public:
    01192         FbxProperty& StaticInit(FbxObject* pObject, const char* pName, const T& pValue, bool pForceSet=true, FbxPropertyAttr::EFlags pFlags=FbxPropertyAttr::eNone)
    01193         {
    01194             return StaticInit(pObject, pName, FbxGetDataTypeFromEnum(FbxTypeOf(*((T*)0))), pValue, pForceSet, pFlags);
    01195         }
    01196
    01205         FbxProperty& StaticInit(FbxObject* pObject, const char* pName, const FbxDataType& pDataType, const T& pValue, bool pForceSet=true, FbxPropertyAttr::EFlags pFlags=FbxPropertyAttr::eNone)
    01206         {
    01207             bool lWasFound = false;
    01208             *this = Create(pObject, pDataType, pName, "", true, &lWasFound);
    01209             if( pForceSet || !lWasFound )
    01210             {
    01211                 ModifyFlag(pFlags, true);   // modify the flags before we set the value
    01212                 FbxProperty::Set(&pValue, FbxTypeOf(pValue), false);
    01213             }
    01214             return *this;
    01215         }
    01216
    01225         FbxProperty& StaticInit(FbxProperty pCompound, const char* pName, const FbxDataType& pDataType, const T& pValue, bool pForceSet=true, FbxPropertyAttr::EFlags pFlags=FbxPropertyAttr::eNone)
    01226         {
    01227             bool lWasFound = false;
    01228             *this = Create(pCompound, pDataType, pName, "", true, &lWasFound);
    01229             if( pForceSet || !lWasFound )
    01230             {
    01231                 ModifyFlag(pFlags, true);   // modify the flags before we set the value
    01232                 FbxProperty::Set(&pValue, FbxTypeOf(pValue), false);
    01233             }
    01234             return *this;
    01235         }
    01237
    01246         FbxPropertyT& Set(const T& pValue){ FbxProperty::Set(&pValue, FbxTypeOf(pValue)); return *this; }
    01247
    01251         T Get() const { T lValue; FbxProperty::Get(&lValue, FbxTypeOf(lValue)); return lValue; }
    01252
    01257         FbxPropertyT& operator=(const T& pValue){ return Set(pValue); }
    01258
    01262         operator T() const { return Get(); }
    01264
    01266 //  WARNING!
    01267 //  Anything beyond these lines may not be documented accurately and is
    01268 //  subject to change without notice.
    01270 #ifndef DOXYGEN_SHOULD_SKIP_THIS
    01271     FbxPropertyT() : FbxProperty(){}
    01272     FbxPropertyT(const FbxProperty& pProperty) : FbxProperty(pProperty){}
    01273     ~FbxPropertyT(){}
    01274 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
    01275 };
    01276
    01278 //  WARNING!
    01279 //  Anything beyond these lines may not be documented accurately and is
    01280 //  subject to change without notice.
    01282 #ifndef DOXYGEN_SHOULD_SKIP_THIS
    01283 template <> class FbxPropertyT<FbxReference> : public FbxProperty
    01284 {
    01285 public:
    01286     FbxPropertyT() : FbxProperty(){}
    01287     FbxPropertyT(const FbxProperty& pProperty) : FbxProperty(pProperty){}
    01288     ~FbxPropertyT(){}
    01289
    01290     const FbxProperty& StaticInit(FbxObject* pObject, const char* pName, const FbxReference& pValue, bool pForceSet=true, FbxPropertyAttr::EFlags pFlags=FbxPropertyAttr::eNone)
    01291     {
    01292         return StaticInit(pObject, pName, FbxGetDataTypeFromEnum(FbxTypeOf(*((FbxReference*)0))), pValue, pForceSet, pFlags);
    01293     }
    01294
    01295     const FbxProperty& StaticInit(FbxObject* pObject, const char* pName, const FbxDataType& pDataType, const FbxReference& pValue, bool pForceSet=true, FbxPropertyAttr::EFlags pFlags=FbxPropertyAttr::eNone)
    01296     {
    01297         bool lWasFound = false;
    01298         *this = Create(pObject, pDataType, pName, "", true, &lWasFound);
    01299         if( pForceSet || !lWasFound )
    01300         {
    01301             ModifyFlag(pFlags, true);   // modify the flags before we set the value
    01302             Set(pValue);            // since we will trigger callbacks in there!
    01303         }
    01304         return *this;
    01305     }
    01306
    01307     FbxPropertyT& Set(const FbxReference& pValue)
    01308     {
    01309         DisconnectAllSrcObject();
    01310         ConnectSrcObject((FbxObject*)pValue);
    01311         return *this;
    01312     }
    01313     FbxPropertyT& operator=(const FbxReference& pValue){ return Set(pValue); }
    01314
    01315     FbxReference Get() const
    01316     {
    01317         return ( GetSrcObjectCount() > 0 ) ? (FbxReference)GetSrcObject() : NULL;
    01318     }
    01319     operator FbxReference() const { return Get(); }
    01320 };
    01321
    01322 class FBXSDK_DLL FbxConnectEvent
    01323 {
    01324 public:
    01325     enum EType
    01326     {
    01327         eConnectRequest,
    01328         eConnect,
    01329         eConnected,
    01330         eDisconnectRequest,
    01331         eDisconnect,
    01332         eDisconnected
    01333     };
    01334
    01335     enum EDirection
    01336     {
    01337         eSource,
    01338         eDestination
    01339     };
    01340
    01341     inline FbxConnectEvent(EType pType,EDirection pDir,FbxProperty *pSrc,FbxProperty *pDst) :
    01342         mType(pType),
    01343         mDirection(pDir),
    01344         mSrc(pSrc),
    01345         mDst(pDst)
    01346     {
    01347     }
    01348     inline EType GetType() const { return mType; }
    01349     inline EDirection GetDirection() const { return mDirection; }
    01350     inline FbxProperty& GetSrc() const { return *mSrc;  }
    01351     inline FbxProperty& GetDst() const { return *mDst;  }
    01352     template < class T > inline T*  GetSrcIfObject(const T*) const { return mSrc->IsRoot() ? FbxCast<T>(mSrc->GetFbxObject()) : (T*)0; }
    01353     template < class T > inline T*  GetDstIfObject(const T*) const { return mDst->IsRoot() ? FbxCast<T>(mDst->GetFbxObject()) : (T*)0; }
    01354
    01355 private:
    01356     EType           mType;
    01357     EDirection      mDirection;
    01358     FbxProperty*    mSrc;
    01359     FbxProperty*    mDst;
    01360 };
    01361 #endif // #ifndef DOXYGEN_SHOULD_SKIP_THIS
    01362
    01363 #include <fbxsdk/fbxsdk_nsend.h>
    01364
    01365 #endif /* _FBXSDK_CORE_PROPERTY_H_ */