FBX C++ API Reference
FbxLayerElementArrayReadLock< T > Struct Template Reference

#include <fbxlayer.h>

Public Member Functions

 FbxLayerElementArrayReadLock (FbxLayerElementArray &pArray)
 
 ~FbxLayerElementArrayReadLock ()
 
const T * GetData () const
 

Detailed Description

template<typename T>
struct FbxLayerElementArrayReadLock< T >

This class provides simple RAII-style read locking of a FbxLayerElementArray object.

Definition at line 828 of file fbxlayer.h.

Constructor & Destructor Documentation

On construction, this class requires the read lock.

Definition at line 833 of file fbxlayer.h.

833  : mArray(pArray)
834  {
835  mLockedData = mArray.GetLocked((T*)NULL, FbxLayerElementArray::eReadLock);
836  }
#define NULL
Definition: fbxarch.h:213
virtual void * GetLocked(ELockMode pLockMode, EFbxType pDataType)
Grants a locked access to the data buffer.

On destruction, this class releases the read lock.

Definition at line 841 of file fbxlayer.h.

842  {
843  if( mLockedData )
844  {
845  mArray.Release((void **) &mLockedData);
846  }
847  }
virtual void Release(void **pDataPtr, EFbxType pDataType)
Unlock the data buffer.

Member Function Documentation

const T* GetData ( ) const
inline

Retrieve the locked array data.

Definition at line 852 of file fbxlayer.h.

853  {
854  return mLockedData;
855  }

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