KFbxLayerElementArray
#include<kfbxlayer.h>

Inherited by KFbxLayerElementArrayTemplate, and KFbxLayerElementArrayTemplate<KFbxSurfaceMaterial *>.

List of all members.

Detailed Description

FBX SDK layer element array class.

Definition at line330of filekfbxlayer.h.


Constructor and Destructor

 KFbxLayerElementArray(EFbxType pDataType)
 Constructor.
virtual ~KFbxLayerElementArray()
 Destructor.

Status handling

void ClearStatus()
 Clear access state and set it to success.
LockAccessStatus::ELockAccessStatus GetStatus() const
 Retrieve access state.

Locks handling

bool IsWriteLocked() const
 Get whether write is locked.
int GetReadLockCount() const
 Retrieve the read lock count.

Data array manipulation

int GetCount() const
void SetCount(int pCount)
void Clear()
void Resize(int pItemCount)
void AddMultiple(int pItemCount)
int Add(void const *pItem, EFbxType pValueType)
int InsertAt(int pIndex, void const *pItem, EFbxType pValueType)
void SetAt(int pIndex, void const *pItem, EFbxType pValueType)
void SetLast(void const *pItem, EFbxType pValueType)
void RemoveAt(int pIndex, void **pItem, EFbxType pValueType)
void RemoveLast(void **pItem, EFbxType pValueType)
bool RemoveIt(void **pItem, EFbxType pValueType)
bool GetAt(int pIndex, void **pItem, EFbxType pValueType) const
bool GetFirst(void **pItem, EFbxType pValueType) const
bool GetLast(void **pItem, EFbxType pValueType) const
int Find(void const *pItem, EFbxType pValueType) const
int FindAfter(int pAfterIndex, void const *pItem, EFbxType pValueType) const
int FindBefore(int pBeforeIndex, void const *pItem, EFbxType pValueType) const
bool IsEqual(constKFbxLayerElementArray&pArray)
template<class T>
int Add(T const&pItem)
template<class T>
int InsertAt(int pIndex, T const&pItem)
template<class T>
void SetAt(int pIndex, T const&pItem)
template<class T>
void SetLast(T const&pItem)
template<class T>
void RemoveAt(int pIndex, T *pItem)
template<class T>
void RemoveLast(T *pItem)
template<class T>
bool RemoveIt(T *pItem)
template<class T>
bool GetAt(int pIndex, T *pItem) const
template<class T>
bool GetFirst(T *pItem) const
template<class T>
bool GetLast(T *pItem) const
template<class T>
int Find(T const&pItem) const
template<class T>
int FindAfter(int pAfterIndex, T const&pItem) const
template<class T>
int FindBefore(int pBeforeIndex, T const&pItem) const
template<typename T>
void CopyTo(KArrayTemplate<T>&pDst)

Public Member Functions

bool IsInUse() const
 Returnstrueif this Array is accessed in any way.
int ReadLock() const
 Increments the number of locks on this array.
int ReadUnlock() const
 Release a read lock on this array.
bool WriteLock() const
 Locks this array for writing.
void WriteUnlock() const
 Release the write lock on this array.
bool ReadWriteLock() const
 Locks this array for writing.
void ReadWriteUnlock() const
 Release the write lock on this array.
virtual void * GetLocked(ELockMode pLockMode, EFbxType pDataType)
 Grants a locked access to the data buffer.
virtual void Release(void **pDataPtr, EFbxType pDataType)
 Release the lock on the data buffer.
virtual size_t GetStride() const
 Return the Stride size.

Constructor&Destructor Documentation

KFbxLayerElementArray(EFbxType pDataType ) 

Constructor.

virtual ~KFbxLayerElementArray( ) [virtual]

Destructor.

Member Function Documentation

void ClearStatus( ) [inline]

Clear access state and set it to success.

Definition at line349of filekfbxlayer.h.

LockAccessStatus::ELockAccessStatusGetStatus( ) const[inline]

Retrieve access state.

Definition at line352of filekfbxlayer.h.

bool IsWriteLocked( ) const[inline]

Get whether write is locked.

Returns:
trueif write is locked,falseotherwise.

Definition at line363of filekfbxlayer.h.

int GetReadLockCount( ) const[inline]

Retrieve the read lock count.

Returns:
the read lock count.

Definition at line368of filekfbxlayer.h.

bool IsInUse( ) const

Returnstrueif this Array is accessed in any way.

int ReadLock( ) const

Increments the number of locks on this array.

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

int ReadUnlock( ) const

Release a read lock on this array.

Returns:
the remaining locks or -1 if a write lock is active.

bool WriteLock( ) const

Locks this array for writing.

The data in the array is wiped out.

Returns:
true if a write lock has been successully granted or false if one or more read locks are active.

void WriteUnlock( ) const

Release the write lock on this array.

bool ReadWriteLock( ) const

Locks this array for writing.

The data already existing in the array is kept and is valid.

Returns:
true if a write lock has been successully granted or false if one or more read locks are active.

void ReadWriteUnlock( ) const

Release the write lock on this array.

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

Grants a locked access to the data buffer.

Parameters:
pLockMode Access mode to the data buffer.
pDataType If defined, try to return the data as this type.
Returns:
A pointer to the data buffer or NULL if a failure occurred.
Remarks:
In case of a failure, the Status is updated accordingly with the reason of the failure. Also, when a conversion of types occurs, a second buffer of the new type is allocated. In this case, the LockMode does not apply on the returned buffer since it is a copy but it does apply on the internal data of this object. The returned buffer still remains property of this object and will be deleted when the pointer is released or this object is destroyed. At that moment, the values in this buffer are copied back into this object.

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

Release the lock on the data buffer.

Parameters:
pDataPtr The buffer we want to release.
pDataType data type
Remarks:
The passed pointer mjust be the one obtained by the call toGetLocked(). Any other pointer will cause this method to fail and the Status is updated with the reason of the failure. In case the passed pointer is referencing a converted data buffer (see comment of the GetLocked), this method will copy GetCount() items of the received buffer back into this object. Any other items that may have been added using a realloc call will be ignored.

virtual size_t GetStride( ) const[virtual]

Return the Stride size.