FbxLayerElementArrayReadLock< T > Struct Template Reference

FbxLayerElementArrayReadLock< T > Struct Template Reference

#include <fbxlayer.h>

Class Description

template<typename T>
struct FbxLayerElementArrayReadLock< T >

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

Definition at line 811 of file fbxlayer.h.

Public Member Functions

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

Constructor & Destructor Documentation

On construction, this class requires the read lock.

Definition at line 816 of file fbxlayer.h.

816  : mArray(pArray)
817  {
818  mLockedData = mArray.GetLocked((T*)NULL, FbxLayerElementArray::eReadLock);
819  }
#define NULL
Definition: fbxarch.h:210
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 824 of file fbxlayer.h.

825  {
826  if( mLockedData )
827  {
828  mArray.Release((void **) &mLockedData);
829  }
830  }
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 835 of file fbxlayer.h.

836  {
837  return mLockedData;
838  }

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