Go to the
documentation of this file.
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00013 #ifndef _FBXSDK_CORE_PROPERTY_HANDLE_H_
00014 #define _FBXSDK_CORE_PROPERTY_HANDLE_H_
00015
00016 #include <fbxsdk/fbxsdk_def.h>
00017
00018 #include <fbxsdk/core/fbxpropertytypes.h>
00019 #include <fbxsdk/core/fbxpropertydef.h>
00020
00021 #include <fbxsdk/fbxsdk_nsbegin.h>
00022
00023
00024 class FbxPropertyPage;
00025 class FbxPropertyHandle;
00026 class FbxConnectionPointFilter;
00027
00028
00029
00030
00031 typedef FbxPropertyHandle FbxTypeInfoHandle;
00032
00036 class FBXSDK_DLL FbxPropertyHandle
00037 {
00038 public:
00043
00044 static FbxPropertyHandle Create();
00045
00049 static FbxPropertyHandle Create(const FbxPropertyHandle& pInstanceOf);
00050
00055 static FbxTypeInfoHandle Create(const char* pName, EFbxType pType=eFbxUndefined);
00056
00061 static FbxTypeInfoHandle Create(const char* pName, FbxTypeInfoHandle pTypeInfo);
00062
00066 bool Destroy();
00067
00069 FbxPropertyHandle();
00073 FbxPropertyHandle(const FbxPropertyHandle& pAddress);
00074
00076 ~FbxPropertyHandle();
00077
00078
00083 FbxPropertyHandle(FbxPropertyPage* pPage, FbxInt pId=FBXSDK_PROPERTY_ID_ROOT);
00084
00085
00087
00092
00093
00097 FbxPropertyHandle& operator=(const FbxPropertyHandle& pHandle);
00098
00103 bool operator==(const FbxPropertyHandle& pHandle) const;
00104
00109 bool operator!=(const FbxPropertyHandle& pHandle) const;
00110
00115 bool Is(const FbxPropertyHandle& pHandle) const;
00116
00118 bool Valid() const;
00119
00121 const char* GetName() const;
00123 const char* GetLabel() const;
00128 bool SetLabel(const char* pLabel);
00129
00131 EFbxType GetType() const;
00133 FbxTypeInfoHandle GetTypeInfo() const;
00134
00135
00137 FbxPropertyAttr::EFlags GetFlags() const;
00138
00144 FbxPropertyAttr::EInheritType GetFlagsInheritType( FbxPropertyAttr::EFlags pFlags, bool pCheckReferences ) const;
00145
00151 bool ModifyFlags(FbxPropertyAttr::EFlags pFlags, bool pValue);
00152
00158 bool SetFlagsInheritType( FbxPropertyAttr::EFlags pFlags, FbxPropertyAttr::EInheritType pType );
00159
00161 void* GetUserData() const;
00162
00167 bool SetUserData(const void* pUserData);
00168
00170 int GetUserTag() const;
00171
00176 bool SetUserTag(int pUserData);
00178
00183
00188 int AddEnumValue(const char* pStringValue);
00189
00194 void InsertEnumValue(int pIndex, const char* pStringValue);
00195
00199 int GetEnumCount();
00200
00205 void SetEnumValue(int pIndex, const char* pStringValue);
00206
00210 void RemoveEnumValue(int pIndex);
00211
00216 char* GetEnumValue(int pIndex);
00218
00219
00224
00225
00226
00228 void BeginCreateOrFindProperty();
00230 void EndCreateOrFindProperty();
00231
00235 inline bool IsRoot() const { return (mPage && (mId==0)) ? true : false; }
00236
00241 bool IsChildOf(const FbxPropertyHandle& pParent) const;
00242
00247 bool IsDescendentOf(const FbxPropertyHandle& pParent) const;
00248
00253 bool SetParent(const FbxPropertyHandle& pOther );
00254
00260 FbxPropertyHandle Add(const char* pName, const FbxTypeInfoHandle& pTypeInfo);
00261
00265 FbxPropertyHandle GetParent() const;
00266
00267
00268
00272 FbxPropertyHandle GetChild() const;
00273
00277 FbxPropertyHandle GetSibling() const;
00278
00282 FbxPropertyHandle GetFirstDescendent() const;
00283
00289 FbxPropertyHandle GetNextDescendent(const FbxPropertyHandle& pHandle) const;
00290
00296 FbxPropertyHandle Find(const char* pName, bool pCaseSensitive) const;
00297
00304 FbxPropertyHandle Find(const char* pName, const FbxTypeInfoHandle& pTypeInfo, bool pCaseSensitive) const;
00305
00314 FbxPropertyHandle Find(const char* pName, const char* pChildrenSeparator, bool pCaseSensitive) const;
00315
00325 FbxPropertyHandle Find(const char* pName, const char* pChildrenSeparator, const FbxTypeInfoHandle& pTypeInfo, bool pCaseSensitive) const;
00327
00332
00338 bool ConnectSrc(const FbxPropertyHandle& pSrc, const FbxConnection::EType pType=FbxConnection::eDefault);
00339
00345 int GetSrcCount(FbxConnectionPointFilter* pFilter=0) const;
00346
00353 FbxPropertyHandle GetSrc(FbxConnectionPointFilter* pFilter=0, int pIndex=0) const;
00354
00359 bool DisconnectSrc(const FbxPropertyHandle& pSrc);
00360
00365 bool IsConnectedSrc(const FbxPropertyHandle& pSrc);
00366
00372 bool ConnectDst(const FbxPropertyHandle& pDst, const FbxConnection::EType pType=FbxConnection::eDefault);
00373
00379 int GetDstCount(FbxConnectionPointFilter* pFilter=0) const;
00380
00387 FbxPropertyHandle GetDst(FbxConnectionPointFilter* pFilter=0, int pIndex=0) const;
00388
00393 bool DisconnectDst(const FbxPropertyHandle& pDst);
00394
00399 bool IsConnectedDst(const FbxPropertyHandle& pDst);
00400
00402 void ClearConnectCache();
00403
00405 void WipeAllConnections();
00407
00421
00425 bool HasMin() const;
00426
00432 bool GetMin(void* pValue, EFbxType pValueType) const;
00433
00439 bool SetMin(const void* pValue, EFbxType pValueType);
00440
00445 template <class T> inline bool SetMin( const T& pValue ) { return SetMin( &pValue,FbxTypeOf(pValue) ); }
00446
00452 template <class T> inline T GetMin( const T* pFBX_TYPE) const { T lValue; GetMin( &lValue,FbxTypeOf(lValue) ); return lValue; }
00453
00457 bool HasSoftMin() const;
00458
00464 bool GetSoftMin(void* pValue, EFbxType pValueType) const;
00465
00471 bool SetSoftMin(const void* pValue, EFbxType pValueType);
00472
00477 template <class T> inline bool SetSoftMin( const T& pValue ) { return SetSoftMin( &pValue,FbxTypeOf(pValue) ); }
00478
00484 template <class T> inline T GetSoftMin( const T* pFBX_TYPE) const { T lValue; GetSoftMin( &lValue,FbxTypeOf(lValue) ); return lValue; }
00485
00489 bool HasMax() const;
00490
00496 bool GetMax(void* pValue, EFbxType pValueType) const;
00497
00503 bool SetMax(const void* pValue, EFbxType pValueType);
00504
00509 template <class T> inline bool SetMax( const T& pValue ) { return SetMax( &pValue,FbxTypeOf(pValue) ); }
00510
00516 template <class T> inline T GetMax( const T* pFBX_TYPE) const { T lValue; GetMax( &lValue,FbxTypeOf(lValue) ); return lValue; }
00517
00521 bool HasSoftMax() const;
00522
00528 bool GetSoftMax(void* pValue, EFbxType pValueType) const;
00529
00535 bool SetSoftMax (const void* pValue, EFbxType pValueType);
00536
00541 template <class T> inline bool SetSoftMax( const T& pValue ) { return SetSoftMax( &pValue,FbxTypeOf(pValue) ); }
00542
00548 template <class T> inline T GetSoftMax( const T* pFBX_TYPE) const { T lValue; GetSoftMax( &lValue,FbxTypeOf(lValue) ); return lValue; }
00549
00550
00555
00560 FbxPropertyAttr::EInheritType GetValueInheritType(bool pCheckReferences) const;
00561
00566 bool SetValueInheritType(FbxPropertyAttr::EInheritType pType);
00567
00573 bool GetDefaultValue(void* pValue, EFbxType pValueType) const;
00574
00580 bool Get(void* pValue, EFbxType pValueType) const;
00581
00589 bool Set(const void* pValue, EFbxType pValueType, bool pCheckValueEquality);
00590
00595 template <class T> inline bool Set( const T& pValue ) { return Set( &pValue,FbxTypeOf(pValue) ); }
00596
00601 template <class T> inline T Get( const T* pFBX_TYPE) const { T lValue; Get( &lValue,FbxTypeOf(lValue) ); return lValue; }
00603
00608 public:
00609
00613 void SetPageDataPtr(void* pData);
00614
00618 void* GetPageDataPtr() const;
00619
00621
00626
00630 bool PushPropertiesToParentInstance();
00631
00632
00634
00639
00643 bool IsAReferenceTo(void) const;
00644
00648 void* GetReferenceTo(void) const;
00649
00653 bool IsReferencedBy(void) const;
00654
00658 int GetReferencedByCount(void) const;
00659
00664 void* GetReferencedBy(int pIndex) const;
00666
00667
00668 private:
00669 FbxPropertyPage* mPage;
00670 FbxInt mId;
00671
00672 };
00673
00674 #include <fbxsdk/fbxsdk_nsend.h>
00675
00676 #endif