fbxsdk/core/base/fbxarray.h File Reference

fbxarray.h File Reference

Classes

class  FbxArray< T >
 Class for array of basic elements such as pointers and basic types. More...
 

Functions

template<class T >
void FbxArrayFree (FbxArray< T > &pArray)
 Call FbxFree on each element of the array, and then clear it. More...
 
template<class T >
void FbxArrayDelete (FbxArray< T > &pArray)
 Call FbxDelete on each element of the array, and then clear it. More...
 
template<class T >
void FbxArrayDestroy (FbxArray< T > &pArray)
 Call Destroy on each element of the array, and then clear it. More...
 
template<class T >
 FBXSDK_INCOMPATIBLE_WITH_ARRAY_TEMPLATE (FbxArray< T >)
 Make sure to break build if someone try to make FbxArray<FbxArray<T>>, which is not supported. More...
 

Function Documentation

void FbxArrayFree ( FbxArray< T > &  pArray)
inline

Call FbxFree on each element of the array, and then clear it.

Definition at line 453 of file fbxarray.h.

454 {
455  for( int i = 0, c = pArray.Size(); i < c; ++i )
456  {
457  FbxFree(pArray[i]);
458  }
459  pArray.Clear();
460 }
int Size() const
Retrieve the number of element contained in the array.
Definition: fbxarray.h:108
void Clear()
Reset the number of element to zero and free the memory allocated.
Definition: fbxarray.h:350
void FbxArrayDelete ( FbxArray< T > &  pArray)
inline

Call FbxDelete on each element of the array, and then clear it.

+ Examples:

Definition at line 463 of file fbxarray.h.

464 {
465  for( int i = 0, c = pArray.Size(); i < c; ++i )
466  {
467  FbxDelete(pArray[i]);
468  }
469  pArray.Clear();
470 }
int Size() const
Retrieve the number of element contained in the array.
Definition: fbxarray.h:108
void FbxDelete(T *p)
Deletion policy for pointer template classes that uses the FbxDelete() function.
Definition: fbxnew.h:341
void Clear()
Reset the number of element to zero and free the memory allocated.
Definition: fbxarray.h:350
void FbxArrayDestroy ( FbxArray< T > &  pArray)
inline

Call Destroy on each element of the array, and then clear it.

Definition at line 473 of file fbxarray.h.

474 {
475  for( int i = 0, c = pArray.Size(); i < c; ++i )
476  {
477  (pArray[i])->Destroy();
478  }
479  pArray.Clear();
480 }
int Size() const
Retrieve the number of element contained in the array.
Definition: fbxarray.h:108
void Clear()
Reset the number of element to zero and free the memory allocated.
Definition: fbxarray.h:350
FBXSDK_INCOMPATIBLE_WITH_ARRAY_TEMPLATE ( FbxArray< T >  )

Make sure to break build if someone try to make FbxArray<FbxArray<T>>, which is not supported.

Go to the source code of this file.