FBX C++ API Reference
All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
FbxArray< T > Class Template Reference

#include <fbxarray.h>

Class Description

template<class T>
class FbxArray< T >

Class for array of basic elements such as pointers and basic types.

This class will not call constructor and destructor for elements, thus it is not suitable for object references. Memory allocations are always done in a single contiguous memory region.

Examples:
ExportScene01/main.cxx, ExportScene03/main.cxx, SwitchBinding/main.cxx, ViewScene/main.cxx, ViewScene/SceneCache.h, ViewScene/SceneContext.cxx, ViewScene/SceneContext.h, ViewScene/SetCamera.cxx, and ViewScene/SetCamera.h.

Definition at line 23 of file fbxarray.h.

Public Types

typedef int(* CompareFunc) (const void *, const void *)
 Element compare function pointer definition. More...
 

Public Member Functions

 FbxArray ()
 Constructor. More...
 
 FbxArray (const int pCapacity)
 Reserve constructor. More...
 
 FbxArray (const FbxArray &pArray)
 Copy constructor. More...
 
 ~FbxArray ()
 Destructor. More...
 
int InsertAt (const int pIndex, const T &pElement, bool pCompact=false)
 Insert an element at the given position, growing the array if capacity is not sufficient. More...
 
int Add (const T &pElement)
 Append an element at the end of the array, doubling the array if capacity is not sufficient. More...
 
int AddUnique (const T &pElement)
 Append an element at the end of array, if not already present, doubling the array if capacity is not sufficient. More...
 
int AddCompact (const T &pElement)
 Append an element at the end of the array, growing the array by one element if capacity is not sufficient. More...
 
int Size () const
 Retrieve the number of element contained in the array. More...
 
int Capacity () const
 Retrieve the current allocated memory capacity of the array. More...
 
T & operator[] (const int pIndex) const
 Retrieve a reference of the element at given index position in the array. More...
 
GetAt (const int pIndex) const
 Retrieve a copy of the element at given index position in the array. More...
 
GetFirst () const
 Retrieve a copy of the first element. More...
 
GetLast () const
 Retrieve a copy of the last element. More...
 
int Find (const T &pElement, const int pStartIndex=0) const
 Find first matching element, from first to last. More...
 
int FindReverse (const T &pElement, const int pStartIndex=0x7fffffff) const
 Find first matching element, from last to first. More...
 
bool Reserve (const int pCapacity)
 Request for allocation of additional memory without inserting new elements. More...
 
void SetAt (const int pIndex, const T &pElement)
 Set the element at given position in the array. More...
 
void SetFirst (const T &pElement)
 Set the value of the first element. More...
 
void SetLast (const T &pElement)
 Set the value of the last element. More...
 
RemoveAt (const int pIndex)
 Remove an element at the given position in the array. More...
 
RemoveFirst ()
 Remove the first element in the array. More...
 
RemoveLast ()
 Remove the last element in the array. More...
 
bool RemoveIt (const T &pElement)
 Remove first matching element in the array. More...
 
void RemoveRange (const int pIndex, const int pCount)
 Remove a range of elements at the given position in the array. More...
 
bool Resize (const int pSize)
 Inserts or erases elements at the end such that Size() becomes pSize, increasing capacity if needed. More...
 
bool Grow (const int pSize)
 Increase size of array by the specified size. More...
 
bool Shrink (const int pSize)
 Reduce size of array by the specified size. More...
 
bool Compact ()
 Compact the array so that its capacity is the same as its size. More...
 
void Clear ()
 Reset the number of element to zero and free the memory allocated. More...
 
void Sort (CompareFunc pCompareFunc)
 Sort the array using the specified compare function pointer. More...
 
T * GetArray () const
 Get pointer to internal array of elements. More...
 
 operator T* ()
 Cast operator. More...
 
void AddArray (const FbxArray< T > &pOther)
 Append another array at the end of this array. More...
 
void AddArrayNoDuplicate (const FbxArray< T > &pOther)
 Append the elements of another array at the end of this array if they are not present. More...
 
void RemoveArray (const FbxArray< T > &pOther)
 Remove the elements of another array from this array is they are present. More...
 
FbxArray< T > & operator= (const FbxArray< T > &pOther)
 Operator to copy elements of an array. More...
 
bool operator== (const FbxArray< T > &pOther) const
 Operator to compare elements of an array. More...
 

Member Typedef Documentation

◆ CompareFunc

typedef int(* CompareFunc) (const void *, const void *)

Element compare function pointer definition.

Definition at line 27 of file fbxarray.h.

Constructor & Destructor Documentation

◆ FbxArray() [1/3]

FbxArray ( )
inline

Constructor.

Definition at line 30 of file fbxarray.h.

30 : mSize(0), mCapacity(0), mArray(NULL){}
#define NULL
Definition: fbxarch.h:210

◆ FbxArray() [2/3]

FbxArray ( const int  pCapacity)
inline

Reserve constructor.

Definition at line 33 of file fbxarray.h.

33 : mSize(0), mCapacity(0), mArray(NULL){ if( pCapacity > 0 ) Reserve(pCapacity); }
#define NULL
Definition: fbxarch.h:210
bool Reserve(const int pCapacity)
Request for allocation of additional memory without inserting new elements.
Definition: fbxarray.h:191

◆ FbxArray() [3/3]

FbxArray ( const FbxArray< T > &  pArray)
inline

Copy constructor.

Definition at line 36 of file fbxarray.h.

36 : mSize(0), mCapacity(0), mArray(NULL){ *this = pArray; }
#define NULL
Definition: fbxarch.h:210

◆ ~FbxArray()

~FbxArray ( )
inline

Destructor.

Remarks
The destructor for each element will not be called.

Definition at line 40 of file fbxarray.h.

40 { Clear(); }
void Clear()
Reset the number of element to zero and free the memory allocated.
Definition: fbxarray.h:352

Member Function Documentation

◆ InsertAt()

int InsertAt ( const int  pIndex,
const T &  pElement,
bool  pCompact = false 
)
inline

Insert an element at the given position, growing the array if capacity is not sufficient.

Parameters
pIndexPosition where to insert the element. Must be a positive value.
pElementElement to insert in the array.
pCompactIf true and capacity is exceeded, grow capacity by one, otherwise double capacity (default).
Returns
-1 if insert failed, otherwise the position of the inserted element in the array.
Remarks
If the given index is greater than Size(), the element is appended at the end. Use compact mode only if you need to save memory.

Definition at line 48 of file fbxarray.h.

49  {
50  FBX_ASSERT_RETURN_VALUE(pIndex >= 0, -1);
51  int lIndex = FbxMin(pIndex, mSize);
52  if( mSize >= mCapacity )
53  {
54  T lElement = pElement; //Copy element because we might move memory
55  int lNewCapacity = FbxMax(pCompact ? mCapacity + 1 : mCapacity * 2, 1); //We always double capacity when not compacting
56  T* lArray = Allocate(lNewCapacity);
57  FBX_ASSERT_RETURN_VALUE(lArray, -1);
58  mArray = lArray;
59  mCapacity = lNewCapacity;
60  return InsertAt(pIndex, lElement); //Insert copied element because reference might be moved
61  }
62 
63  if( lIndex < mSize ) //Move elements to leave a space open to insert the new element
64  {
65  //If pElement is inside memmove range, copy element and insert copy instead
66  if( (&pElement >= &mArray[lIndex]) && (&pElement < &mArray[mSize]) )
67  {
68  T lElement = pElement;
69  return InsertAt(pIndex, lElement);
70  }
71  memmove(&mArray[lIndex + 1], &mArray[lIndex], (mSize - lIndex) * sizeof(T));
72  }
73 
74  memcpy(&mArray[lIndex], &pElement, sizeof(T));
75  mSize++;
76 
77  return lIndex;
78  }
const FbxChar FbxMin(const FbxChar)
Definition: fbxtypes.h:162
const FbxChar FbxMax(const FbxChar)
Definition: fbxtypes.h:173
int InsertAt(const int pIndex, const T &pElement, bool pCompact=false)
Insert an element at the given position, growing the array if capacity is not sufficient.
Definition: fbxarray.h:48

◆ Add()

int Add ( const T &  pElement)
inline

Append an element at the end of the array, doubling the array if capacity is not sufficient.

Parameters
pElementElement to append to the array.
Returns
-1 if add failed, otherwise the position of the added element in the array.

Definition at line 83 of file fbxarray.h.

84  {
85  return InsertAt(mSize, pElement);
86  }
int InsertAt(const int pIndex, const T &pElement, bool pCompact=false)
Insert an element at the given position, growing the array if capacity is not sufficient.
Definition: fbxarray.h:48

◆ AddUnique()

int AddUnique ( const T &  pElement)
inline

Append an element at the end of array, if not already present, doubling the array if capacity is not sufficient.

Parameters
pElementElement to append to the array.
Returns
-1 if add failed, otherwise the position of the added element in the array.

Definition at line 91 of file fbxarray.h.

92  {
93  int lIndex = Find(pElement);
94  return ( lIndex == -1 ) ? Add(pElement) : lIndex;
95  }
int Find(const T &pElement, const int pStartIndex=0) const
Find first matching element, from first to last.
Definition: fbxarray.h:164
int Add(const T &pElement)
Append an element at the end of the array, doubling the array if capacity is not sufficient.
Definition: fbxarray.h:83

◆ AddCompact()

int AddCompact ( const T &  pElement)
inline

Append an element at the end of the array, growing the array by one element if capacity is not sufficient.

Parameters
pElementElement to append to the array.
Returns
-1 if add failed, otherwise the position of the added element in the array.

Definition at line 100 of file fbxarray.h.

101  {
102  return InsertAt(mSize, pElement, true);
103  }
int InsertAt(const int pIndex, const T &pElement, bool pCompact=false)
Insert an element at the given position, growing the array if capacity is not sufficient.
Definition: fbxarray.h:48

◆ Size()

int Size ( ) const
inline

Retrieve the number of element contained in the array.

To increase the capacity without increasing the size, please use Reserve().

Returns
The number of element in the array.
Remarks
The size of the array cannot exceed its capacity.

Definition at line 108 of file fbxarray.h.

108 { return mSize; }

◆ Capacity()

int Capacity ( ) const
inline

Retrieve the current allocated memory capacity of the array.

Returns
The capacity of the array in number of element.
Remarks
The capacity will always be greater or equal to its size.

Definition at line 113 of file fbxarray.h.

113 { return mCapacity; }

◆ operator[]()

T& operator[] ( const int  pIndex) const
inline

Retrieve a reference of the element at given index position in the array.

Parameters
pIndexPosition of element in the array.
Returns
A reference to the element at the specified position in the array.
Remarks
No error will be thrown if the index is out of bounds.

Definition at line 119 of file fbxarray.h.

120  {
121  #ifdef _DEBUG
122  FBX_ASSERT_MSG(pIndex >= 0, "Index is out of range!");
123  if( pIndex >= mSize )
124  {
125  if( pIndex < mCapacity )
126  {
127  FBX_ASSERT_NOW("Index is out of range, but not outside of capacity! Call SetAt() to use reserved memory.");
128  }
129  else FBX_ASSERT_NOW("Index is out of range!");
130  }
131  #endif
132  return (T&)mArray[pIndex];
133  }

◆ GetAt()

T GetAt ( const int  pIndex) const
inline

Retrieve a copy of the element at given index position in the array.

Parameters
pIndexPosition of element in the array.
Returns
The value of the element at the specified position in the array.
Remarks
No error will be thrown if the index is out of bounds.

Definition at line 139 of file fbxarray.h.

140  {
141  return operator[](pIndex);
142  }
T & operator[](const int pIndex) const
Retrieve a reference of the element at given index position in the array.
Definition: fbxarray.h:119

◆ GetFirst()

T GetFirst ( ) const
inline

Retrieve a copy of the first element.

Returns
Copy of the first element.
Remarks
The array should have at least one element and no error will be thrown if the array is empty.

Definition at line 147 of file fbxarray.h.

148  {
149  return GetAt(0);
150  }
T GetAt(const int pIndex) const
Retrieve a copy of the element at given index position in the array.
Definition: fbxarray.h:139

◆ GetLast()

T GetLast ( ) const
inline

Retrieve a copy of the last element.

Returns
Copy of the last element.
Remarks
The array should have at least one element and no error will be thrown if the array is empty.

Definition at line 155 of file fbxarray.h.

156  {
157  return GetAt(mSize-1);
158  }
T GetAt(const int pIndex) const
Retrieve a copy of the element at given index position in the array.
Definition: fbxarray.h:139

◆ Find()

int Find ( const T &  pElement,
const int  pStartIndex = 0 
) const
inline

Find first matching element, from first to last.

Parameters
pElementThe element to be compared to each of the elements.
pStartIndexThe position to start searching from.
Returns
Position of first matching element or -1 if there is no matching element.

Definition at line 164 of file fbxarray.h.

165  {
166  FBX_ASSERT_RETURN_VALUE(pStartIndex >= 0, -1);
167  for( int i = pStartIndex; i < mSize; ++i )
168  {
169  if( operator[](i) == pElement ) return i;
170  }
171  return -1;
172  }

◆ FindReverse()

int FindReverse ( const T &  pElement,
const int  pStartIndex = 0x7fffffff 
) const
inline

Find first matching element, from last to first.

Parameters
pElementThe element to be compared to each of the elements.
pStartIndexThe position to start searching from.
Returns
Position of first matching element or -1 if there is no matching element.

Definition at line 178 of file fbxarray.h.

179  {
180  for( int i = FbxMin(pStartIndex, mSize-1); i >= 0; --i )
181  {
182  if( operator[](i) == pElement ) return i;
183  }
184  return -1;
185  }
const FbxChar FbxMin(const FbxChar)
Definition: fbxtypes.h:162

◆ Reserve()

bool Reserve ( const int  pCapacity)
inline

Request for allocation of additional memory without inserting new elements.

After the memory has been reserved, please use SetAt() to initialize elements.

Parameters
pCapacityThe number of additional element memory allocation requested.
Returns
true if the memory allocation succeeded or if the capacity is unchanged, false otherwise.
Remarks
If the requested capacity is less than or equal to the current capacity, this call has no effect. In either case, Size() is unchanged.

Definition at line 191 of file fbxarray.h.

192  {
193  FBX_ASSERT_RETURN_VALUE(pCapacity > 0, false);
194  if( pCapacity > mCapacity )
195  {
196  T* lArray = Allocate(pCapacity);
197  FBX_ASSERT_RETURN_VALUE(lArray, false);
198  mArray = lArray;
199  mCapacity = pCapacity;
200 
201  //Initialize new memory to zero
202  memset(&mArray[mSize], 0, (mCapacity - mSize) * sizeof(T));
203  }
204  return true;
205  }

◆ SetAt()

void SetAt ( const int  pIndex,
const T &  pElement 
)
inline

Set the element at given position in the array.

Parameters
pIndexPosition of element in the array.
pElementThe new element.
Remarks
If the index is outside range, and outside capacity, this call has no effect. However, if index is within capacity range, element count is increased such that Size() will become pIndex + 1.

Definition at line 212 of file fbxarray.h.

213  {
214  FBX_ASSERT_RETURN(pIndex >= 0 && pIndex < mCapacity);
215  if( pIndex >= mSize ) mSize = pIndex + 1;
216  if( mArray ) memcpy(&mArray[pIndex], &pElement, sizeof(T));
217  }

◆ SetFirst()

void SetFirst ( const T &  pElement)
inline

Set the value of the first element.

Parameters
pElementThe new value of the last element.
Remarks
The array should have at least one element and no error will be thrown if the array is empty.

Definition at line 222 of file fbxarray.h.

223  {
224  SetAt(0, pElement);
225  }
void SetAt(const int pIndex, const T &pElement)
Set the element at given position in the array.
Definition: fbxarray.h:212

◆ SetLast()

void SetLast ( const T &  pElement)
inline

Set the value of the last element.

Parameters
pElementThe new value of the last element.
Remarks
The array should have at least one element and no error will be thrown if the array is empty.

Definition at line 230 of file fbxarray.h.

231  {
232  SetAt(mSize-1, pElement);
233  }
void SetAt(const int pIndex, const T &pElement)
Set the element at given position in the array.
Definition: fbxarray.h:212

◆ RemoveAt()

T RemoveAt ( const int  pIndex)
inline

Remove an element at the given position in the array.

Parameters
pIndexPosition of the element to remove.
Returns
Removed element.
Remarks
No error will be thrown if the index is out of bounds.

Definition at line 239 of file fbxarray.h.

240  {
241  T lElement = GetAt(pIndex);
242  if( pIndex + 1 < mSize )
243  {
244  memmove(&mArray[pIndex], &mArray[pIndex + 1], (mSize - pIndex - 1) * sizeof(T));
245  }
246  mSize--;
247  return lElement;
248  }
T GetAt(const int pIndex) const
Retrieve a copy of the element at given index position in the array.
Definition: fbxarray.h:139

◆ RemoveFirst()

T RemoveFirst ( )
inline

Remove the first element in the array.

Returns
Removed element.
Remarks
The array should have at least one element and no error will be thrown if the array is empty.

Definition at line 253 of file fbxarray.h.

254  {
255  return RemoveAt(0);
256  }
T RemoveAt(const int pIndex)
Remove an element at the given position in the array.
Definition: fbxarray.h:239

◆ RemoveLast()

T RemoveLast ( )
inline

Remove the last element in the array.

Returns
Removed element.
Remarks
The array should have at least one element and no error will be thrown if the array is empty.

Definition at line 261 of file fbxarray.h.

262  {
263  return RemoveAt(mSize-1);
264  }
T RemoveAt(const int pIndex)
Remove an element at the given position in the array.
Definition: fbxarray.h:239

◆ RemoveIt()

bool RemoveIt ( const T &  pElement)
inline

Remove first matching element in the array.

Parameters
pElementElement to be removed.
Returns
true if a matching element is found and removed, false otherwise.

Definition at line 269 of file fbxarray.h.

270  {
271  int Index = Find(pElement);
272  if( Index >= 0 )
273  {
274  RemoveAt(Index);
275  return true;
276  }
277  return false;
278  }
int Find(const T &pElement, const int pStartIndex=0) const
Find first matching element, from first to last.
Definition: fbxarray.h:164
T RemoveAt(const int pIndex)
Remove an element at the given position in the array.
Definition: fbxarray.h:239

◆ RemoveRange()

void RemoveRange ( const int  pIndex,
const int  pCount 
)
inline

Remove a range of elements at the given position in the array.

Parameters
pIndexBegin position of the elements to remove.
pCountThe count of elements to remove.
Returns
true if successful, otherwise false.

Definition at line 284 of file fbxarray.h.

285  {
286  FBX_ASSERT_RETURN(pIndex >= 0);
287  FBX_ASSERT_RETURN(pCount >= 0);
288  if( pIndex + pCount < mSize )
289  {
290  memmove(&mArray[pIndex], &mArray[pIndex + pCount], (mSize - pIndex - pCount) * sizeof(T));
291  }
292  mSize -= pCount;
293  }

◆ Resize()

bool Resize ( const int  pSize)
inline

Inserts or erases elements at the end such that Size() becomes pSize, increasing capacity if needed.

Please use SetAt() to initialize any new elements.

Parameters
pSizeThe new count of elements to set the array to. Must be greater or equal to zero.
Returns
true if the memory (re)allocation succeeded, false otherwise.
Remarks
If the requested element count is less than or equal to the current count, elements are freed from memory. Otherwise, the array grows and elements are unchanged.

Definition at line 299 of file fbxarray.h.

300  {
301  if( pSize == mSize && mSize == mCapacity ) return true;
302 
303  if( pSize == 0 )
304  {
305  Clear();
306  return true;
307  }
308 
309  FBX_ASSERT_RETURN_VALUE(pSize > 0, false);
310  if( pSize != mCapacity )
311  {
312  T* lArray = Allocate(pSize);
313  FBX_ASSERT_RETURN_VALUE(lArray, false);
314  mArray = lArray;
315  }
316 
317  if( pSize > mCapacity ) //Initialize new memory to zero
318  {
319  memset(&mArray[mSize], 0, (pSize - mSize) * sizeof(T));
320  }
321 
322  mSize = pSize;
323  mCapacity = pSize;
324  return true;
325  }
void Clear()
Reset the number of element to zero and free the memory allocated.
Definition: fbxarray.h:352

◆ Grow()

bool Grow ( const int  pSize)
inline

Increase size of array by the specified size.

Parameters
pSizeThe size to add to the array size.
Returns
true if operation succeeded, false otherwise.

Definition at line 330 of file fbxarray.h.

331  {
332  return Resize(mSize + pSize);
333  }
bool Resize(const int pSize)
Inserts or erases elements at the end such that Size() becomes pSize, increasing capacity if needed...
Definition: fbxarray.h:299

◆ Shrink()

bool Shrink ( const int  pSize)
inline

Reduce size of array by the specified size.

Parameters
pSizeThe size to remove from the array size.
Returns
true if operation succeeded, false otherwise.

Definition at line 338 of file fbxarray.h.

339  {
340  return Resize(mSize - pSize);
341  }
bool Resize(const int pSize)
Inserts or erases elements at the end such that Size() becomes pSize, increasing capacity if needed...
Definition: fbxarray.h:299

◆ Compact()

bool Compact ( )
inline

Compact the array so that its capacity is the same as its size.

Returns
true if operation succeeded, false otherwise.

Definition at line 345 of file fbxarray.h.

346  {
347  return Resize(mSize);
348  }
bool Resize(const int pSize)
Inserts or erases elements at the end such that Size() becomes pSize, increasing capacity if needed...
Definition: fbxarray.h:299

◆ Clear()

void Clear ( )
inline

Reset the number of element to zero and free the memory allocated.

Remarks
This only free the memory allocated by the array, and doesn't call the destructor of each element.

Definition at line 352 of file fbxarray.h.

353  {
354  if( mArray != NULL )
355  {
356  mSize = 0;
357  mCapacity = 0;
358  FbxFree(mArray);
359  mArray = NULL;
360  }
361  }
#define NULL
Definition: fbxarch.h:210

◆ Sort()

void Sort ( CompareFunc  pCompareFunc)
inline

Sort the array using the specified compare function pointer.

Parameters
pCompareFuncThe compare function to use to sort elements.

Definition at line 365 of file fbxarray.h.

366  {
367  qsort(mArray, mSize, sizeof(T), pCompareFunc);
368  }

◆ GetArray()

T* GetArray ( ) const
inline

Get pointer to internal array of elements.

Definition at line 371 of file fbxarray.h.

371 { return mArray ? (T*)mArray : NULL; }
#define NULL
Definition: fbxarch.h:210

◆ operator T*()

operator T* ( )
inline

Cast operator.

Definition at line 374 of file fbxarray.h.

374 { return mArray ? (T*)mArray : NULL; }
#define NULL
Definition: fbxarch.h:210

◆ AddArray()

void AddArray ( const FbxArray< T > &  pOther)
inline

Append another array at the end of this array.

Parameters
pOtherThe other array to append to this array.

Definition at line 378 of file fbxarray.h.

379  {
380  if( Grow(pOther.mSize) )
381  {
382  memcpy(&mArray[mSize - pOther.mSize], pOther.mArray, pOther.mSize * sizeof(T));
383  }
384  }
bool Grow(const int pSize)
Increase size of array by the specified size.
Definition: fbxarray.h:330

◆ AddArrayNoDuplicate()

void AddArrayNoDuplicate ( const FbxArray< T > &  pOther)
inline

Append the elements of another array at the end of this array if they are not present.

Parameters
pOtherAnother array.

Definition at line 388 of file fbxarray.h.

389  {
390  for( int i = 0, c = pOther.mSize; i < c; ++i )
391  {
392  AddUnique(pOther[i]);
393  }
394  }
int AddUnique(const T &pElement)
Append an element at the end of array, if not already present, doubling the array if capacity is not ...
Definition: fbxarray.h:91

◆ RemoveArray()

void RemoveArray ( const FbxArray< T > &  pOther)
inline

Remove the elements of another array from this array is they are present.

Parameters
pOtherAnother array.

Definition at line 398 of file fbxarray.h.

399  {
400  for( int i = 0, c = pOther.mSize; i < c; ++i )
401  {
402  RemoveIt(pOther[i]);
403  }
404  }
bool RemoveIt(const T &pElement)
Remove first matching element in the array.
Definition: fbxarray.h:269

◆ operator=()

FbxArray<T>& operator= ( const FbxArray< T > &  pOther)
inline

Operator to copy elements of an array.

Returns
this array containing a copy of pOther elements.

Definition at line 408 of file fbxarray.h.

409  {
410  if( this != &pOther )
411  {
412  if( Resize(pOther.mSize) )
413  {
414  memcpy(mArray, pOther.mArray, pOther.mSize * sizeof(T));
415  }
416  }
417  return *this;
418  }
bool Resize(const int pSize)
Inserts or erases elements at the end such that Size() becomes pSize, increasing capacity if needed...
Definition: fbxarray.h:299

◆ operator==()

bool operator== ( const FbxArray< T > &  pOther) const
inline

Operator to compare elements of an array.

Returns
true if the two arrays are equal, otherwise false.

Definition at line 422 of file fbxarray.h.

423  {
424  if( this == &pOther ) return true;
425  if( mSize != pOther.mSize ) return false;
426  return memcmp(mArray, pOther.mArray, sizeof(T) * mSize) == 0;
427  }

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