FBX C++ API Reference
All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
FbxLayerElementArray Class Reference

#include <fbxlayer.h>

Class Description

FbxLayerElementArray is the base class for FbxLayerElementArrayTemplate, it provides lock handling and data array manipulation of the data buffer for FbxLayerElement.

Definition at line 332 of file fbxlayer.h.

+ Inheritance diagram for FbxLayerElementArray:

Public Types

enum  ELockMode { eReadLock = 1, eWriteLock = 2, eReadWriteLock = 3 }
 Identifies the access mode to the data buffer. More...
 

Public Member Functions

bool IsInUse () const
 Returns whether this Array is accessed in any way. More...
 
int ReadLock () const
 Increments the number of read locks on this array. More...
 
int ReadUnlock () const
 Releases a read lock on this array. More...
 
bool WriteLock () const
 Locks this array for writing. More...
 
void WriteUnlock () const
 Releases the write lock on this array. More...
 
bool ReadWriteLock () const
 Locks this array for writing. More...
 
void ReadWriteUnlock () const
 Releases the write lock on this array. More...
 
virtual void * GetLocked (ELockMode pLockMode, EFbxType pDataType)
 Grants a locked access to the data buffer. More...
 
void * GetLocked (ELockMode pLockMode=eReadWriteLock)
 Grants a locked access to the data buffer. More...
 
template<class T >
T * GetLocked (T *, ELockMode pLockMode=eReadWriteLock)
 Grants a locked access to the data buffer. More...
 
virtual void Release (void **pDataPtr, EFbxType pDataType)
 Unlock the data buffer. More...
 
void Release (void **pDataPtr)
 Unlock the data buffer. More...
 
template<class T >
void Release (T **pDataPtr, T *dummy)
 Unlock the data buffer. More...
 
virtual size_t GetStride () const
 Returns the Stride size which equals the size of the data type of the data buffer. More...
 

Protected Member Functions

void * GetDataPtr ()
 
void * GetReference (int pIndex, EFbxType pValueType)
 
void GetReferenceTo (int pIndex, void **pRef, EFbxType pValueType)
 
void SetStatus (LockAccessStatus::ELockAccessStatus pVal) const
 
void SetImplementation (void *pImplementation)
 
void * GetImplementation ()
 
virtual void ConvertDataType (EFbxType pDataType, void **pDataPtr, size_t *pStride)
 

Protected Attributes

EFbxType mDataType
 

Constructor and Destructor

 FbxLayerElementArray (EFbxType pDataType)
 Constructor. More...
 
virtual ~FbxLayerElementArray ()
 Destructor. More...
 

Status handling

void ClearStatus ()
 Clears the access state and sets it to eSuccess. More...
 
LockAccessStatus::ELockAccessStatus GetStatus () const
 Retrieves the access state. More...
 

Locks handling

bool IsWriteLocked () const
 Returns whether write is locked. More...
 
int GetReadLockCount () const
 Retrieves the read lock count. More...
 

Data array manipulation

int GetCount () const
 Returns the count of items in the data buffer. More...
 
void SetCount (int pCount)
 Sets the count of items in the data buffer. More...
 
void Clear ()
 Clears the data buffer. More...
 
void Resize (int pItemCount)
 Resizes the data buffer. More...
 
void AddMultiple (int pItemCount)
 Appends space to the data buffer. More...
 
int Add (const void *pItem, EFbxType pValueType)
 Appends a new item to the end of the data buffer. More...
 
int InsertAt (int pIndex, const void *pItem, EFbxType pValueType)
 Inserts a new item at the specified position of the data buffer. More...
 
void SetAt (int pIndex, const void *pItem, EFbxType pValueType)
 Sets the value for the specified item. More...
 
void SetLast (const void *pItem, EFbxType pValueType)
 Sets the value of the last item. More...
 
void RemoveAt (int pIndex, void **pItem, EFbxType pValueType)
 Removes the specified item from the data buffer. More...
 
void RemoveLast (void **pItem, EFbxType pValueType)
 Removes the last item from the data buffer. More...
 
bool RemoveIt (void **pItem, EFbxType pValueType)
 Removes one item from the data buffer. More...
 
bool GetAt (int pIndex, void **pItem, EFbxType pValueType) const
 Returns the specified item's value. More...
 
bool GetFirst (void **pItem, EFbxType pValueType) const
 Returns the first item's value. More...
 
bool GetLast (void **pItem, EFbxType pValueType) const
 Returns the last item's value. More...
 
int Find (const void *pItem, EFbxType pValueType) const
 Searches for an item in the data buffer. More...
 
int FindAfter (int pAfterIndex, const void *pItem, EFbxType pValueType) const
 Searches for an item after the specified index in the data buffer. More...
 
int FindBefore (int pBeforeIndex, const void *pItem, EFbxType pValueType) const
 Searches for an item before the specified index in the data buffer. More...
 
bool IsEqual (const FbxLayerElementArray &pArray) const
 Equivalence operator. More...
 
template<class T >
int Add (T const &pItem)
 Appends a new item to the end of the data buffer. More...
 
template<class T >
int InsertAt (int pIndex, T const &pItem)
 Inserts a new item at the specified position of the data buffer. More...
 
template<class T >
void SetAt (int pIndex, T const &pItem)
 Sets the value of the specified item. More...
 
template<class T >
void SetLast (T const &pItem)
 Sets the value of the last item. More...
 
template<class T >
void RemoveAt (int pIndex, T *pItem)
 Removes the specified item from the data buffer. More...
 
template<class T >
void RemoveLast (T *pItem)
 Removes the last item from the data buffer. More...
 
template<class T >
bool RemoveIt (T *pItem)
 Removes one item from the data buffer. More...
 
template<class T >
bool GetAt (int pIndex, T *pItem) const
 Returns the specified item's value. More...
 
template<class T >
bool GetFirst (T *pItem) const
 Returns the first item's value. More...
 
template<class T >
bool GetLast (T *pItem) const
 Returns the last item's value. More...
 
template<class T >
int Find (T const &pItem) const
 Searches for an item in the data buffer. More...
 
template<class T >
int FindAfter (int pAfterIndex, T const &pItem) const
 Searches for an item after the specified index in the data buffer. More...
 
template<class T >
int FindBefore (int pBeforeIndex, T const &pItem) const
 Searches for one item before the specified index in the data buffer. More...
 
template<typename T >
void CopyTo (FbxArray< T > &pDst)
 Copies the items in the data buffer to an array. More...
 

Member Enumeration Documentation

◆ ELockMode

enum ELockMode

Identifies the access mode to the data buffer.

  • eReadLock Read mode.
  • eWriteLock Write mode.
  • eReadWriteLock Read-write mode.
Enumerator
eReadLock 
eWriteLock 
eReadWriteLock 

Definition at line 419 of file fbxlayer.h.

Constructor & Destructor Documentation

◆ FbxLayerElementArray()

Constructor.

Parameters
pDataTypeThe data type of the items in the data array.

◆ ~FbxLayerElementArray()

virtual ~FbxLayerElementArray ( )
virtual

Destructor.

Member Function Documentation

◆ ClearStatus()

void ClearStatus ( )
inline

Clears the access state and sets it to eSuccess.

Definition at line 356 of file fbxlayer.h.

◆ GetStatus()

LockAccessStatus::ELockAccessStatus GetStatus ( ) const
inline

Retrieves the access state.

Definition at line 359 of file fbxlayer.h.

359 { return mStatus; }

◆ IsWriteLocked()

bool IsWriteLocked ( ) const
inline

Returns whether write is locked.

Returns
True if write is locked, false otherwise.

Definition at line 370 of file fbxlayer.h.

370 { return mWriteLock; };

◆ GetReadLockCount()

int GetReadLockCount ( ) const
inline

Retrieves the read lock count.

Returns
The read lock count.

Definition at line 375 of file fbxlayer.h.

375 { return mReadLockCount; }

◆ IsInUse()

bool IsInUse ( ) const

Returns whether this Array is accessed in any way.

Returns
True if it is in use, false otherwise.

◆ ReadLock()

int ReadLock ( ) const

Increments the number of read locks on this array.

Returns
The current number of read locks (including the one just grabbed) or 0 if a write lock is active.

◆ ReadUnlock()

int ReadUnlock ( ) const

Releases a read lock on this array.

Returns
The remaining read locks or -1 if a write lock is active.

◆ WriteLock()

bool WriteLock ( ) const

Locks this array for writing.

The data in the array is wiped out.

Returns
True if a write lock has been successfully granted, false if one or more read locks are active.

◆ WriteUnlock()

void WriteUnlock ( ) const

Releases the write lock on this array.

◆ ReadWriteLock()

bool ReadWriteLock ( ) const

Locks this array for writing.

The data that already exists in the array is kept and is valid.

Returns
True if a write lock has been successfully granted, false if one or more read locks are active.

◆ ReadWriteUnlock()

void ReadWriteUnlock ( ) const

Releases the write lock on this array.

◆ GetLocked() [1/3]

virtual void* GetLocked ( ELockMode  pLockMode,
EFbxType  pDataType 
)
virtual

Grants a locked access to the data buffer.

Parameters
pLockModeAccess mode to the data buffer.
pDataTypeIf defined, tries to return the data as this type.
Returns
A pointer to the data buffer or NULL if a failure occurs.
Remarks
In the case of a failure, the Status is updated with the reason for the failure. Also, when a type conversion occurs, a second buffer of the new type is allocated. In this case, the LockMode does not apply to the returned buffer since it is a copy but it does apply to the internal data of this object. The returned buffer still remains a property of this object and is deleted when the pointer is released or the object is destroyed. At the moment of release or destruction, the values in this buffer are copied back into this object.

◆ GetLocked() [2/3]

void* GetLocked ( ELockMode  pLockMode = eReadWriteLock)
inline

Grants a locked access to the data buffer.

Parameters
pLockModeAccess mode to the data buffer.
Returns
A pointer to the data buffer or NULL if a failure occurs.
Remarks
In the case of a failure, the Status is updated with the reason for the failure. Also, when a type conversion occurs, a second buffer of the new type is allocated. In this case, the LockMode does not apply to the returned buffer since it is a copy but it does apply to the internal data of this object. The returned buffer still remains a property of this object and is deleted when the pointer is released or the object is destroyed. At the moment of release or destruction, the values in this buffer are copied back into this object.

Definition at line 451 of file fbxlayer.h.

451 { return GetLocked(pLockMode, mDataType); }
virtual void * GetLocked(ELockMode pLockMode, EFbxType pDataType)
Grants a locked access to the data buffer.
EFbxType mDataType
Definition: fbxlayer.h:798

◆ GetLocked() [3/3]

T* GetLocked ( T *  ,
ELockMode  pLockMode = eReadWriteLock 
)
inline

Grants a locked access to the data buffer.

Parameters
pLockModeAccess mode to the data buffer.
Returns
A pointer to the data buffer or NULL if a failure occurs.
Remarks
In the case of a failure, the Status is updated with the reason for the failure. Also, when a type conversion occurs, a second buffer of the new type is allocated. In this case, the LockMode does not apply to the returned buffer since it is a copy but it does apply to the internal data of this object. The returned buffer still remains a property of this object and is deleted when the pointer is released or the object is destroyed. At the moment of release or destruction, the values in this buffer are copied back into this object.

Definition at line 464 of file fbxlayer.h.

464 {T v; return (T*)GetLocked(pLockMode, FbxTypeOf(v)); }
EFbxType FbxTypeOf(const FbxRefPtr &)
Definition: fbxlayer.h:322
virtual void * GetLocked(ELockMode pLockMode, EFbxType pDataType)
Grants a locked access to the data buffer.

◆ Release() [1/3]

virtual void Release ( void **  pDataPtr,
EFbxType  pDataType 
)
virtual

Unlock the data buffer.

Parameters
pDataPtrThe buffer to be released.
pDataTypeThe data type of the data buffer.
Remarks
The passed pointer must be the one obtained by the call to GetLocked(). Any other pointer causes this method to fail and the Status is updated with the reason for the failure. If the passed pointer refers a converted data buffer (see comment of GetLocked), this method copies the GetCount() items of the received buffer back into this object. Any other items that may have been added using a realloc call are ignored.

◆ Release() [2/3]

void Release ( void **  pDataPtr)
inline

Unlock the data buffer.

Parameters
pDataPtrThe buffer to be released.
Remarks
The passed pointer must be the one obtained by the call to GetLocked(). Any other pointer causes this method to fail and the Status is updated with the reason for the failure. If the passed pointer refers a converted data buffer (see comment of GetLocked), this method copies the GetCount() items of the received buffer back into this object. Any other items that may have been added using a realloc call are ignored.

Definition at line 487 of file fbxlayer.h.

487 { Release(pDataPtr, mDataType); }
virtual void Release(void **pDataPtr, EFbxType pDataType)
Unlock the data buffer.
EFbxType mDataType
Definition: fbxlayer.h:798

◆ Release() [3/3]

void Release ( T **  pDataPtr,
T *  dummy 
)
inline

Unlock the data buffer.

Parameters
pDataPtrThe buffer to be released.
dummyThe data type of dummy is used to specialize this function.
Remarks
The passed pointer must be the one obtained by the call to GetLocked(). Any other pointer causes this method to fail and the Status is updated with the reason for the failure. If the passed pointer refers a converted data buffer (see comment of GetLocked), this method copies the GetCount() items of the received buffer back into this object. Any other items that may have been added using a realloc call are ignored.

Definition at line 499 of file fbxlayer.h.

500  {
501  T*** voidPtr = &pDataPtr;
502  Release((void**)*voidPtr, FbxTypeOf(*dummy));
503  }
EFbxType FbxTypeOf(const FbxRefPtr &)
Definition: fbxlayer.h:322
virtual void Release(void **pDataPtr, EFbxType pDataType)
Unlock the data buffer.

◆ GetStride()

virtual size_t GetStride ( ) const
virtual

Returns the Stride size which equals the size of the data type of the data buffer.

◆ GetCount()

int GetCount ( ) const

Returns the count of items in the data buffer.

◆ SetCount()

void SetCount ( int  pCount)

Sets the count of items in the data buffer.

Parameters
pCountThe count of items to be set.

◆ Clear()

void Clear ( )

Clears the data buffer.

◆ Resize()

void Resize ( int  pItemCount)

Resizes the data buffer.

Parameters
pItemCountThe new size of the data buffer.

◆ AddMultiple()

void AddMultiple ( int  pItemCount)

Appends space to the data buffer.

Parameters
pItemCountThe appended space size

◆ Add() [1/2]

int Add ( const void *  pItem,
EFbxType  pValueType 
)

Appends a new item to the end of the data buffer.

Parameters
pItemPointer of the new item to be added
pValueTypeData type of the new item
Returns
The index of the new item

◆ InsertAt() [1/2]

int InsertAt ( int  pIndex,
const void *  pItem,
EFbxType  pValueType 
)

Inserts a new item at the specified position of the data buffer.

Parameters
pIndexThe specified position
pItemPointer of the new item to be inserted
pValueTypeData type of the new item
Returns
The index of the inserted item
Remarks
The input index must be within valid range and no error will be thrown if it is invalid.

◆ SetAt() [1/2]

void SetAt ( int  pIndex,
const void *  pItem,
EFbxType  pValueType 
)

Sets the value for the specified item.

Parameters
pIndexThe index of the item to be updated.
pItemPointer of the item whose value is copied to pIndex'th item
pValueTypeData type of the item
Remarks
The input index must be within valid range and no error will be thrown if it is invalid.

◆ SetLast() [1/2]

void SetLast ( const void *  pItem,
EFbxType  pValueType 
)

Sets the value of the last item.

Parameters
pItemPointer of the item whose value is copied to the last item
pValueTypeData type of the item
Remarks
The array should contain at least one item and no error will be thrown if it is empty.

◆ RemoveAt() [1/2]

void RemoveAt ( int  pIndex,
void **  pItem,
EFbxType  pValueType 
)

Removes the specified item from the data buffer.

Parameters
pIndexThe index of the item to be removed
pItemPlace to hold the value of the removed item.
pValueTypeData type of the item
Remarks
The input index must be within valid range and no error will be thrown if it is invalid.

◆ RemoveLast() [1/2]

void RemoveLast ( void **  pItem,
EFbxType  pValueType 
)

Removes the last item from the data buffer.

Parameters
pItemPlace to hold the value of the removed item.
pValueTypeData type of the item
Remarks
The array should contain at least one item and no error will be thrown if it is empty.

◆ RemoveIt() [1/2]

bool RemoveIt ( void **  pItem,
EFbxType  pValueType 
)

Removes one item from the data buffer.

Parameters
pItemThe first item who equals pItem is to be removed
pValueTypeData type of the item
Returns
True if the item is removed successfully, false otherwise

◆ GetAt() [1/2]

bool GetAt ( int  pIndex,
void **  pItem,
EFbxType  pValueType 
) const

Returns the specified item's value.

Parameters
pIndexIndex of the item
pItemPlace to hold the item's value
pValueTypeData type of the item
Returns
True if the item's value is returned successfully, false otherwise
Remarks
If the index is invalid, pItem is set to zero.

◆ GetFirst() [1/2]

bool GetFirst ( void **  pItem,
EFbxType  pValueType 
) const

Returns the first item's value.

Parameters
pItemPlace to hold the item's value
pValueTypeData type of the item
Returns
True if the item's value is returned successfully, false otherwise

◆ GetLast() [1/2]

bool GetLast ( void **  pItem,
EFbxType  pValueType 
) const

Returns the last item's value.

Parameters
pItemPlace to hold the item's value
pValueTypeData type of the item
Returns
True if the item's value is returned successfully, false otherwise

◆ Find() [1/2]

int Find ( const void *  pItem,
EFbxType  pValueType 
) const

Searches for an item in the data buffer.

Parameters
pItemThe value of the item for which to search.
pValueTypeData type of the item
Returns
The index of the item found, -1 if not found.
Remarks
The index of the first item whose value equals pItem is returned.

◆ FindAfter() [1/2]

int FindAfter ( int  pAfterIndex,
const void *  pItem,
EFbxType  pValueType 
) const

Searches for an item after the specified index in the data buffer.

Parameters
pAfterIndexThe specified index after which the searching begins
pItemThe value of the item for which to search, the searching begins after pAfterIndex.
pValueTypeData type of the item
Returns
The index of the item found, -1 if not found.
Remarks
The index of the first item whose value equals pItem is returned.

◆ FindBefore() [1/2]

int FindBefore ( int  pBeforeIndex,
const void *  pItem,
EFbxType  pValueType 
) const

Searches for an item before the specified index in the data buffer.

Parameters
pBeforeIndexThe specified index before which the searching begins
pItemThe value of the item for which to search, the searching begins before pBeforeIndex.
pValueTypeThe item's data type.
Returns
The index of the item found, -1 if not found.
Remarks
The index of the first item whose value equals pItem is returned.

◆ IsEqual()

bool IsEqual ( const FbxLayerElementArray pArray) const

Equivalence operator.

Parameters
pArrayArray compared to this one
Returns
True if equal. false otherwise.

◆ Add() [2/2]

int Add ( T const &  pItem)
inline

Appends a new item to the end of the data buffer.

Parameters
pItemThe new item to be added
Returns
The index of the new item

Definition at line 647 of file fbxlayer.h.

647 { return Add((const void*)&pItem, FbxTypeOf(pItem)); }
EFbxType FbxTypeOf(const FbxRefPtr &)
Definition: fbxlayer.h:322
int Add(const void *pItem, EFbxType pValueType)
Appends a new item to the end of the data buffer.

◆ InsertAt() [2/2]

int InsertAt ( int  pIndex,
T const &  pItem 
)
inline

Inserts a new item at the specified position of the data buffer.

Parameters
pIndexThe specified position
pItemThe new item to be inserted
Returns
The index of the inserted item
Remarks
The input index must be within valid range and no error will be thrown if it is invalid.

Definition at line 655 of file fbxlayer.h.

655 { return InsertAt(pIndex, (const void*)&pItem, FbxTypeOf(pItem)); }
EFbxType FbxTypeOf(const FbxRefPtr &)
Definition: fbxlayer.h:322
int InsertAt(int pIndex, const void *pItem, EFbxType pValueType)
Inserts a new item at the specified position of the data buffer.

◆ SetAt() [2/2]

void SetAt ( int  pIndex,
T const &  pItem 
)
inline

Sets the value of the specified item.

Parameters
pIndexThe index of the item to be updated.
pItemThe item whose value is copied to pIndex'th item
Remarks
The input index must be within valid range and no error will be thrown if it is invalid.

Definition at line 662 of file fbxlayer.h.

662 { SetAt(pIndex, (const void*)&pItem, FbxTypeOf(pItem)); }
void SetAt(int pIndex, const void *pItem, EFbxType pValueType)
Sets the value for the specified item.
EFbxType FbxTypeOf(const FbxRefPtr &)
Definition: fbxlayer.h:322

◆ SetLast() [2/2]

void SetLast ( T const &  pItem)
inline

Sets the value of the last item.

Parameters
pItemThe item whose value is copied to the last item
Remarks
The array should contain at least one item and no error will be thrown if it is empty.

Definition at line 668 of file fbxlayer.h.

668 { SetLast((const void*)&pItem, FbxTypeOf(pItem)); }
void SetLast(const void *pItem, EFbxType pValueType)
Sets the value of the last item.
EFbxType FbxTypeOf(const FbxRefPtr &)
Definition: fbxlayer.h:322

◆ RemoveAt() [2/2]

void RemoveAt ( int  pIndex,
T *  pItem 
)
inline

Removes the specified item from the data buffer.

Parameters
pIndexThe index of the item to be removed
pItemPlace to hold the value of the removed item.
Remarks
The input index must be within valid range and no error will be thrown if it is invalid.

Definition at line 675 of file fbxlayer.h.

676  {
677  T** voidPtr = &pItem;
678  RemoveAt(pIndex, (void**)voidPtr, FbxTypeOf(*pItem));
679  }
EFbxType FbxTypeOf(const FbxRefPtr &)
Definition: fbxlayer.h:322
void RemoveAt(int pIndex, void **pItem, EFbxType pValueType)
Removes the specified item from the data buffer.

◆ RemoveLast() [2/2]

void RemoveLast ( T *  pItem)
inline

Removes the last item from the data buffer.

Parameters
pItemPlace to hold the value of the removed item.
Remarks
The array should contain at least one item and no error will be thrown if it is empty.

Definition at line 685 of file fbxlayer.h.

686  {
687  T** voidPtr = &pItem;
688  RemoveLast((void**)voidPtr, FbxTypeOf(*pItem));
689  }
void RemoveLast(void **pItem, EFbxType pValueType)
Removes the last item from the data buffer.
EFbxType FbxTypeOf(const FbxRefPtr &)
Definition: fbxlayer.h:322

◆ RemoveIt() [2/2]

bool RemoveIt ( T *  pItem)
inline

Removes one item from the data buffer.

Parameters
pItemThe first item who equals pItem is to be removed
Returns
True if the item is removed successfully, false otherwise

Definition at line 695 of file fbxlayer.h.

696  {
697  T** voidPtr = &pItem;
698  return RemoveIt((void**)voidPtr, FbxTypeOf(*pItem));
699  }
bool RemoveIt(void **pItem, EFbxType pValueType)
Removes one item from the data buffer.
EFbxType FbxTypeOf(const FbxRefPtr &)
Definition: fbxlayer.h:322

◆ GetAt() [2/2]

bool GetAt ( int  pIndex,
T *  pItem 
) const
inline

Returns the specified item's value.

Parameters
pIndexIndex of the item
pItemPlace to hold the item's value
Returns
True if the item's value is returned successfully, false otherwise
Remarks
If the index is invalid, pItem is set to zero.

Definition at line 707 of file fbxlayer.h.

708  {
709  T** voidPtr = &pItem;
710  return GetAt(pIndex, (void**)voidPtr, FbxTypeOf(*pItem));
711  }
EFbxType FbxTypeOf(const FbxRefPtr &)
Definition: fbxlayer.h:322
bool GetAt(int pIndex, void **pItem, EFbxType pValueType) const
Returns the specified item&#39;s value.

◆ GetFirst() [2/2]

bool GetFirst ( T *  pItem) const
inline

Returns the first item's value.

Parameters
pItemPlace to hold the item's value
Returns
True if the item's value is returned successfully, false otherwise

Definition at line 717 of file fbxlayer.h.

718  {
719  T** voidPtr = &pItem;
720  return GetFirst((void**)voidPtr, FbxTypeOf(*pItem));
721  }
EFbxType FbxTypeOf(const FbxRefPtr &)
Definition: fbxlayer.h:322
bool GetFirst(void **pItem, EFbxType pValueType) const
Returns the first item&#39;s value.

◆ GetLast() [2/2]

bool GetLast ( T *  pItem) const
inline

Returns the last item's value.

Parameters
pItemPlace to hold the item's value
Returns
True if the item's value is returned successfully, false otherwise

Definition at line 727 of file fbxlayer.h.

728  {
729  T** voidPtr = &pItem;
730  return GetLast((void**)voidPtr, FbxTypeOf(*pItem));
731  }
EFbxType FbxTypeOf(const FbxRefPtr &)
Definition: fbxlayer.h:322
bool GetLast(void **pItem, EFbxType pValueType) const
Returns the last item&#39;s value.

◆ Find() [2/2]

int Find ( T const &  pItem) const
inline

Searches for an item in the data buffer.

Parameters
pItemThe value of the item for which to search.
Returns
The index of the item found, -1 if not found.
Remarks
The index of the first item whose value equals pItem is returned.

Definition at line 738 of file fbxlayer.h.

738 { return Find((const void*)&pItem, FbxTypeOf(pItem)); }
EFbxType FbxTypeOf(const FbxRefPtr &)
Definition: fbxlayer.h:322
int Find(const void *pItem, EFbxType pValueType) const
Searches for an item in the data buffer.

◆ FindAfter() [2/2]

int FindAfter ( int  pAfterIndex,
T const &  pItem 
) const
inline

Searches for an item after the specified index in the data buffer.

Parameters
pAfterIndexThe specified index after which the searching begins
pItemThe value of the item for which to search, the searching begins after pAfterIndex.
Returns
The index of the item found, -1 if not found.
Remarks
The index of the first item whose value equals pItem is returned.

Definition at line 746 of file fbxlayer.h.

746 { return FindAfter(pAfterIndex, (const void*)&pItem, FbxTypeOf(pItem)); }
EFbxType FbxTypeOf(const FbxRefPtr &)
Definition: fbxlayer.h:322
int FindAfter(int pAfterIndex, const void *pItem, EFbxType pValueType) const
Searches for an item after the specified index in the data buffer.

◆ FindBefore() [2/2]

int FindBefore ( int  pBeforeIndex,
T const &  pItem 
) const
inline

Searches for one item before the specified index in the data buffer.

Parameters
pBeforeIndexThe specified index before which the searching begins
pItemThe value of the item for which to search, the searching begins before pBeforeIndex.
Returns
The index of the item found, -1 if not found.
Remarks
The index of the first item whose value equals pItem is returned.

Definition at line 754 of file fbxlayer.h.

754 { return FindBefore(pBeforeIndex, (const void*)&pItem, FbxTypeOf(pItem)); }
int FindBefore(int pBeforeIndex, const void *pItem, EFbxType pValueType) const
Searches for an item before the specified index in the data buffer.
EFbxType FbxTypeOf(const FbxRefPtr &)
Definition: fbxlayer.h:322

◆ CopyTo()

void CopyTo ( FbxArray< T > &  pDst)
inline

Copies the items in the data buffer to an array.

Parameters
pDstThe destination array where the items are to be copied.

Definition at line 760 of file fbxlayer.h.

761  {
762  T src;
763  T* srcPtr = &src;
764 
765  pDst.Clear();
766  if (mDataType != FbxTypeOf(src))
767  {
769  return;
770  }
771 
772  pDst.Resize(GetCount());
773  for (int i = 0; i < GetCount(); i++)
774  {
775  if (GetAt(i, (void**)&srcPtr, mDataType))
776  {
777  pDst.SetAt(i, src);
778  }
779  }
781  }
void SetStatus(LockAccessStatus::ELockAccessStatus pVal) const
Definition: fbxlayer.h:789
void Clear()
Reset the number of element to zero and free the memory allocated.
Definition: fbxarray.h:352
int GetCount() const
Returns the count of items in the data buffer.
void SetAt(const int pIndex, const T &pElement)
Set the element at given position in the array.
Definition: fbxarray.h:212
EFbxType FbxTypeOf(const FbxRefPtr &)
Definition: fbxlayer.h:322
EFbxType mDataType
Definition: fbxlayer.h:798
bool Resize(const int pSize)
Inserts or erases elements at the end such that Size() becomes pSize, increasing capacity if needed...
Definition: fbxarray.h:299
bool GetAt(int pIndex, void **pItem, EFbxType pValueType) const
Returns the specified item&#39;s value.

◆ GetDataPtr()

void* GetDataPtr ( )
protected

◆ GetReference()

void* GetReference ( int  pIndex,
EFbxType  pValueType 
)
protected

◆ GetReferenceTo()

void GetReferenceTo ( int  pIndex,
void **  pRef,
EFbxType  pValueType 
)
protected

◆ SetStatus()

void SetStatus ( LockAccessStatus::ELockAccessStatus  pVal) const
inlineprotected

Definition at line 789 of file fbxlayer.h.

790  {
791  const_cast<FbxLayerElementArray*>(this)->mStatus = pVal;
792  }
FbxLayerElementArray is the base class for FbxLayerElementArrayTemplate, it provides lock handling an...
Definition: fbxlayer.h:332

◆ SetImplementation()

void SetImplementation ( void *  pImplementation)
protected

◆ GetImplementation()

void* GetImplementation ( )
inlineprotected

Definition at line 795 of file fbxlayer.h.

795 { return mImplementation; }

◆ ConvertDataType()

virtual void ConvertDataType ( EFbxType  pDataType,
void **  pDataPtr,
size_t *  pStride 
)
protectedvirtual

Member Data Documentation

◆ mDataType

EFbxType mDataType
protected

Definition at line 798 of file fbxlayer.h.


The documentation for this class was generated from the following file: