FBX C++ API Reference
fbxpropertyhandle.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_PROPERTY_HANDLE_H_
14 #define _FBXSDK_CORE_PROPERTY_HANDLE_H_
15 
16 #include <fbxsdk/fbxsdk_def.h>
17 
21 
22 #include <fbxsdk/fbxsdk_nsbegin.h>
23 
24 class FbxPropertyPage;
25 class FbxPropertyHandle;
27 
30 {
31 public:
36  static FbxPropertyHandle Create();
38 
41  static FbxPropertyHandle Create(const FbxPropertyHandle& pInstanceOf);
42 
46  static FbxPropertyHandle Create(const char* pName, EFbxType pType=eFbxUndefined);
47 
51  static FbxPropertyHandle Create(const char* pName, FbxPropertyHandle pTypeInfo);
52 
55  bool Destroy();
56 
59 
62  FbxPropertyHandle(const FbxPropertyHandle& pAddress);
63 
66 
72 
79  FbxPropertyHandle& operator=(const FbxPropertyHandle& pHandle);
80 
84  bool operator==(const FbxPropertyHandle& pHandle) const;
85 
89  bool operator!=(const FbxPropertyHandle& pHandle) const;
90 
94  bool operator< (const FbxPropertyHandle& pHandle) const;
95 
99  bool operator> (const FbxPropertyHandle& pHandle) const;
100 
104  bool Is(const FbxPropertyHandle& pHandle) const;
105 
107  bool Valid() const;
108 
110  const char* GetName() const;
111 
113  const char* GetLabel() const;
114 
118  bool SetLabel(const char* pLabel);
119 
121  EFbxType GetType() const;
122 
124  FbxPropertyHandle GetTypeInfo() const;
125 
127  FbxPropertyFlags::EFlags GetFlags() const;
128 
133  FbxPropertyFlags::EInheritType GetFlagsInheritType(FbxPropertyFlags::EFlags pFlags, bool pCheckReferences) const;
134 
139  bool ModifyFlags(FbxPropertyFlags::EFlags pFlags, bool pValue);
140 
145  bool SetFlagsInheritType(FbxPropertyFlags::EFlags pFlags, FbxPropertyFlags::EInheritType pType);
146 
148  void* GetUserData() const;
149 
153  bool SetUserData(const void* pUserData);
154 
156  int GetUserTag() const;
157 
161  bool SetUserTag(int pUserData);
163 
171  int AddEnumValue(const char* pStringValue);
172 
176  void InsertEnumValue(int pIndex, const char* pStringValue);
177 
180  int GetEnumCount();
181 
185  void SetEnumValue(int pIndex, const char* pStringValue);
186 
189  void RemoveEnumValue(int pIndex);
190 
194  char* GetEnumValue(int pIndex);
196 
201  void BeginCreateOrFindProperty();
203 
205  void EndCreateOrFindProperty();
206 
209  inline bool IsRoot() const { return ( mPage && mId == 0 ) ? true : false; }
210 
214  bool IsChildOf(const FbxPropertyHandle& pParent) const;
215 
219  bool IsDescendentOf(const FbxPropertyHandle& pParent) const;
220 
224  bool SetParent(const FbxPropertyHandle& pOther );
225 
230  FbxPropertyHandle Add(const char* pName, const FbxPropertyHandle& pTypeInfo);
231 
234  FbxPropertyHandle GetParent() const;
235 
238  FbxPropertyHandle GetChild() const;
239 
242  FbxPropertyHandle GetSibling() const;
243 
246  FbxPropertyHandle GetFirstDescendent() const;
247 
252  FbxPropertyHandle GetNextDescendent(const FbxPropertyHandle& pHandle) const;
253 
258  FbxPropertyHandle Find(const char* pName, bool pCaseSensitive) const;
259 
265  FbxPropertyHandle Find(const char* pName, const FbxPropertyHandle& pTypeInfo, bool pCaseSensitive) const;
266 
274  FbxPropertyHandle Find(const char* pName, const char* pChildrenSeparator, bool pCaseSensitive) const;
275 
284  FbxPropertyHandle Find(const char* pName, const char* pChildrenSeparator, const FbxPropertyHandle& pTypeInfo, bool pCaseSensitive) const;
286 
295  bool ConnectSrc(const FbxPropertyHandle& pSrc, const FbxConnection::EType pType=FbxConnection::eDefault);
296 
301  int GetSrcCount(FbxConnectionPointFilter* pFilter=0) const;
302 
308  FbxPropertyHandle GetSrc(FbxConnectionPointFilter* pFilter=0, int pIndex=0) const;
309 
313  bool DisconnectSrc(const FbxPropertyHandle& pSrc);
314 
318  bool IsConnectedSrc(const FbxPropertyHandle& pSrc);
319 
324  bool ConnectDst(const FbxPropertyHandle& pDst, const FbxConnection::EType pType=FbxConnection::eDefault);
325 
330  int GetDstCount(FbxConnectionPointFilter* pFilter=0) const;
331 
337  FbxPropertyHandle GetDst(FbxConnectionPointFilter* pFilter=0, int pIndex=0) const;
338 
342  bool DisconnectDst(const FbxPropertyHandle& pDst);
343 
347  bool IsConnectedDst(const FbxPropertyHandle& pDst);
348 
350  void ClearConnectCache();
351 
353  void WipeAllConnections();
355 
368  bool HasMin() const;
369 
374  bool GetMin(void* pValue, EFbxType pValueType) const;
375 
380  bool SetMin(const void* pValue, EFbxType pValueType);
381 
386  template <class T> inline bool SetMin(const T& pValue){ return SetMin(&pValue, FbxTypeOf(pValue)); }
387 
392  template <class T> inline T GetMin(const T* pFBX_TYPE) const { T lValue; GetMin(&lValue, FbxTypeOf(lValue)); return lValue; }
393 
396  bool HasSoftMin() const;
397 
402  bool GetSoftMin(void* pValue, EFbxType pValueType) const;
403 
408  bool SetSoftMin(const void* pValue, EFbxType pValueType);
409 
413  template <class T> inline bool SetSoftMin(const T& pValue){ return SetSoftMin(&pValue, FbxTypeOf(pValue)); }
414 
419  template <class T> inline T GetSoftMin(const T* pFBX_TYPE) const { T lValue; GetSoftMin(&lValue, FbxTypeOf(lValue)); return lValue; }
420 
423  bool HasMax() const;
424 
429  bool GetMax(void* pValue, EFbxType pValueType) const;
430 
435  bool SetMax(const void* pValue, EFbxType pValueType);
436 
440  template <class T> inline bool SetMax(const T& pValue){ return SetMax(&pValue, FbxTypeOf(pValue)); }
441 
446  template <class T> inline T GetMax(const T* pFBX_TYPE) const { T lValue; GetMax(&lValue, FbxTypeOf(lValue)); return lValue; }
447 
450  bool HasSoftMax() const;
451 
456  bool GetSoftMax(void* pValue, EFbxType pValueType) const;
457 
462  bool SetSoftMax(const void* pValue, EFbxType pValueType);
463 
467  template <class T> inline bool SetSoftMax(const T& pValue){ return SetSoftMax(&pValue, FbxTypeOf(pValue)); }
468 
473  template <class T> inline T GetSoftMax(const T* pFBX_TYPE) const { T lValue; GetSoftMax(&lValue, FbxTypeOf(lValue)); return lValue; }
475 
483  FbxPropertyFlags::EInheritType GetValueInheritType(bool pCheckReferences) const;
484 
488  bool SetValueInheritType(FbxPropertyFlags::EInheritType pType);
489 
494  bool GetDefaultValue(void* pValue, EFbxType pValueType) const;
495 
500  bool Get(void* pValue, EFbxType pValueType) const;
501 
508  bool Set(const void* pValue, EFbxType pValueType, bool pCheckValueEquality);
509 
513  template <class T> inline bool Set(const T& pValue){ return Set(&pValue, FbxTypeOf(pValue)); }
514 
518  template <class T> inline T Get(const T* pFBX_TYPE) const { T lValue; Get(&lValue, FbxTypeOf(lValue)); return lValue; }
520 
527  void SetPageDataPtr(void* pData);
528 
531  void* GetPageDataPtr() const;
533 
540  bool PushPropertiesToParentInstance();
542 
549  bool IsAReferenceTo(void) const;
550 
553  void* GetReferenceTo(void) const;
554 
557  bool IsReferencedBy(void) const;
558 
561  int GetReferencedByCount(void) const;
562 
566  void* GetReferencedBy(int pIndex) const;
568 
569 private:
570  FbxPropertyPage* mPage;
571  FbxInt mId;
572 };
573 
574 #include <fbxsdk/fbxsdk_nsend.h>
575 
576 #endif /* _FBXSDK_CORE_PROPERTY_HANDLE_H_ */
Class to manage property handle.
FBX SDK environment definition.
Unidentified.
EFlags
Property flags that affect their behaviors.
T GetSoftMax(const T *pFBX_TYPE) const
Get the soft maximum value of this property.
bool SetSoftMax(const T &pValue)
According the given value and its value type, set the soft maximum value and value type for this prop...
bool Set(const T &pValue)
Set property value with the given value .
bool IsRoot() const
Judge if the property is the root property.
bool SetMax(const T &pValue)
According the given value and its value type, set the maximum value and value type for this property...
T GetMin(const T *pFBX_TYPE) const
Get the minimum value of this property.
EFbxType
Type identifier constants.
T GetSoftMin(const T *pFBX_TYPE) const
Get the soft minimum value of this property.
EFbxType FbxTypeOf(const FbxChar &)
bool SetMin(const T &pValue)
According the given value and its value type, set the minimum value and value type for this property...
Class to manage Connect Filter.
#define FBXSDK_PROPERTY_ID_ROOT
T Get(const T *pFBX_TYPE) const
get property value.
#define FBXSDK_DLL
Definition: fbxarch.h:173
signed int FbxInt
Definition: fbxtypes.h:39
T GetMax(const T *pFBX_TYPE) const
Get the maximum value of this property.
EInheritType
Property inherit types.
bool SetSoftMin(const T &pValue)
According the given value and its value type, set the soft minimum value and value type for this prop...