FBX C++ API Reference
All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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 818 of file fbxlayer.h.

Public Member Functions

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

Constructor & Destructor Documentation

◆ FbxLayerElementArrayReadLock()

On construction, this class requires the read lock.

Definition at line 823 of file fbxlayer.h.

823  : mArray(pArray)
824  {
825  mLockedData = mArray.GetLocked((T*)NULL, FbxLayerElementArray::eReadLock);
826  }
#define NULL
Definition: fbxarch.h:210
virtual void * GetLocked(ELockMode pLockMode, EFbxType pDataType)
Grants a locked access to the data buffer.

◆ ~FbxLayerElementArrayReadLock()

On destruction, this class releases the read lock.

Definition at line 831 of file fbxlayer.h.

832  {
833  if( mLockedData )
834  {
835  mArray.Release((void **) &mLockedData);
836  }
837  }
virtual void Release(void **pDataPtr, EFbxType pDataType)
Unlock the data buffer.

Member Function Documentation

◆ GetData()

const T* GetData ( ) const
inline

Retrieve the locked array data.

Definition at line 842 of file fbxlayer.h.

843  {
844  return mLockedData;
845  }

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