目次

Wwise SDK 2018.1.11
AkArray.h
[詳解]
1 /*******************************************************************************
2 The content of this file includes portions of the AUDIOKINETIC Wwise Technology
3 released in source code form as part of the SDK installer package.
4 
5 Commercial License Usage
6 
7 Licensees holding valid commercial licenses to the AUDIOKINETIC Wwise Technology
8 may use this file in accordance with the end user license agreement provided
9 with the software or, alternatively, in accordance with the terms contained in a
10 written agreement between you and Audiokinetic Inc.
11 
12 Apache License Usage
13 
14 Alternatively, this file may be used under the Apache License, Version 2.0 (the
15 "Apache License"); you may not use this file except in compliance with the
16 Apache License. You may obtain a copy of the Apache License at
17 http://www.apache.org/licenses/LICENSE-2.0.
18 
19 Unless required by applicable law or agreed to in writing, software distributed
20 under the Apache License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES
21 OR CONDITIONS OF ANY KIND, either express or implied. See the Apache License for
22 the specific language governing permissions and limitations under the License.
23 
24  Version: <VERSION> Build: <BUILDNUMBER>
25  Copyright (c) <COPYRIGHTYEAR> Audiokinetic Inc.
26 *******************************************************************************/
27 
28 #ifndef _AKARRAY_H
29 #define _AKARRAY_H
30 
34 
35 #define AK_DEFINE_ARRAY_POOL( _name_, _poolID_ ) \
36 struct _name_ \
37 { \
38  static AkMemPoolId Get() \
39  { \
40  return _poolID_; \
41  } \
42 };
43 
44 AK_DEFINE_ARRAY_POOL( _ArrayPoolDefault, g_DefaultPoolId )
45 AK_DEFINE_ARRAY_POOL( _ArrayPoolLEngineDefault, g_LEngineDefaultPoolId )
46 
47 template <class U_POOL>
49 {
50  AkForceInline void * Alloc( size_t in_uSize )
51  {
52  return AK::MemoryMgr::Malloc( U_POOL::Get(), in_uSize );
53  }
54 
55  AkForceInline void Free( void * in_pAddress )
56  {
57  AK::MemoryMgr::Free( U_POOL::Get(), in_pAddress );
58  }
59 
60  AkForceInline void TransferMem(void ** io_pDest, AkArrayAllocatorNoAlign<U_POOL> in_srcAlloc, void * in_pSrc )
61  {
62  (*io_pDest) = in_pSrc;
63  }
64 };
65 
66 template <class U_POOL>
68 {
69  AkForceInline void * Alloc( size_t in_uSize )
70  {
71  return AK::MemoryMgr::Malign( U_POOL::Get(), in_uSize, AK_SIMD_ALIGNMENT );
72  }
73 
74  AkForceInline void Free( void * in_pAddress )
75  {
76  AK::MemoryMgr::Falign( U_POOL::Get(), in_pAddress );
77  }
78 
79  AkForceInline void TransferMem(void ** io_pDest, AkArrayAllocatorAlignedSimd<U_POOL> in_srcAlloc, void * in_pSrc )
80  {
81  (*io_pDest) = in_pSrc;
82  }
83 
84 };
85 
86 // AkHybridAllocator
87 // Attempts to allocate from a small buffer of size uBufferSizeBytes, which is contained within the array type. Useful if the array is expected to contain a small number of elements.
88 // If the array grows to a larger size than uBufferSizeBytes, the the memory is allocated from the default memory pool.
89 // NOTE: only use with types that are trivially copyable.
90 template< AkUInt32 uBufferSizeBytes, AkUInt8 uAlignmentSize = AK_OS_STRUCT_ALIGN>
92 {
93  static const AkUInt32 _uBufferSizeBytes = uBufferSizeBytes;
94 
95  AkForceInline void * Alloc(size_t in_uSize)
96  {
97  if (in_uSize <= uBufferSizeBytes)
98  return (void *)&m_buffer;
99  else
100  return AK::MemoryMgr::Malign(g_DefaultPoolId, in_uSize, uAlignmentSize);
101  }
102 
103  AkForceInline void Free(void * in_pAddress)
104  {
105  if (&m_buffer != in_pAddress)
107  }
108 
109  AkForceInline void TransferMem(void ** io_pDest, AkHybridAllocator<uBufferSizeBytes, uAlignmentSize>& in_srcAlloc, void * in_pSrc)
110  {
111  if (&in_srcAlloc.m_buffer == in_pSrc)
112  {
113  AKPLATFORM::AkMemCpy(m_buffer, in_srcAlloc.m_buffer, uBufferSizeBytes);
114  (*io_pDest) = m_buffer;
115  }
116  else
117  {
118  (*io_pDest) = in_pSrc;
119  }
120  }
121 
122  AK_ALIGN(char m_buffer[uBufferSizeBytes], uAlignmentSize);
123 };
124 
125 template <class T>
127 {
128  // By default the assignment operator is invoked to move elements of an array from slot to slot. If desired,
129  // a custom 'Move' operation can be passed into TMovePolicy to transfer ownership of resources from in_Src to in_Dest.
130  static AkForceInline void Move( T& in_Dest, T& in_Src )
131  {
132  in_Dest = in_Src;
133  }
134 };
135 
136 // Can be used as TMovePolicy to create arrays of arrays.
137 template <class T>
139 {
140  static AkForceInline void Move( T& in_Dest, T& in_Src )
141  {
142  in_Dest.Transfer(in_Src); //transfer ownership of resources.
143  }
144 };
145 
146 // Common allocators:
150 
151 /// Specific implementation of array
152 template <class T, class ARG_T, class TAlloc = ArrayPoolDefault, unsigned long TGrowBy = 1, class TMovePolicy = AkAssignmentMovePolicy<T> > class AkArray : public TAlloc
153 {
154 public:
155  /// Constructor
157  : m_pItems( 0 )
158  , m_uLength( 0 )
159  , m_ulReserved( 0 )
160  {
161  }
162 
163  /// Destructor
165  {
166  AKASSERT( m_pItems == 0 );
167  AKASSERT( m_uLength == 0 );
168  AKASSERT( m_ulReserved == 0 );
169  }
170 
171 // Workaround for SWIG to parse nested structure:
172 // Bypass this inner struct and use a proxy in a separate header.
173 #ifndef SWIG
174  /// Iterator
175  struct Iterator
176  {
177  T* pItem; ///< Pointer to the item in the array.
178 
179  /// + operator</span>
181  {
182  AKASSERT( pItem );
183  Iterator returnedIt;
184  returnedIt.pItem = pItem + inc;
185  return returnedIt;
186  }
187 
188  /// - operator</span>
189  AkUInt32 operator-(Iterator const& rhs) const
190  {
191  AKASSERT((pItem && rhs.pItem)||(!pItem && !rhs.pItem));
192  return (AkUInt32)(pItem - rhs.pItem);
193  }
194 
195  /// ++ operator</span>
197  {
198  AKASSERT( pItem );
199  ++pItem;
200  return *this;
201  }
202 
203  /// -- operator</span>
205  {
206  AKASSERT( pItem );
207  --pItem;
208  return *this;
209  }
210 
211  /// * operator</span>
213  {
214  AKASSERT( pItem );
215  return *pItem;
216  }
217 
218  /// == operator</span>
219  bool operator ==( const Iterator& in_rOp ) const
220  {
221  return ( pItem == in_rOp.pItem );
222  }
223 
224  /// != operator</span>
225  bool operator !=( const Iterator& in_rOp ) const
226  {
227  return ( pItem != in_rOp.pItem );
228  }
229  };
230 #endif // #ifndef SWIG
231 
232  /// Returns the iterator to the first item of the array, will be End() if the array is empty.
233  Iterator Begin() const
234  {
235  Iterator returnedIt;
236  returnedIt.pItem = m_pItems;
237  return returnedIt;
238  }
239 
240  /// Returns the iterator to the end of the array
241  Iterator End() const
242  {
243  Iterator returnedIt;
244  returnedIt.pItem = m_pItems + m_uLength;
245  return returnedIt;
246  }
247 
248  /// Returns the iterator th the specified item, will be End() if the item is not found
249  Iterator FindEx( ARG_T in_Item ) const
250  {
251  Iterator it = Begin();
252 
253  for ( Iterator itEnd = End(); it != itEnd; ++it )
254  {
255  if ( *it == in_Item )
256  break;
257  }
258 
259  return it;
260  }
261 
262  /// Returns the iterator th the specified item, will be End() if the item is not found
263  /// The array must be in ascending sorted order.
264  Iterator BinarySearch( ARG_T in_Item ) const
265  {
266  Iterator itResult = End();
267  if (m_pItems)
268  {
269  T * pTop = m_pItems, * pBottom = m_pItems + m_uLength;
270 
271  while ( pTop <= pBottom )
272  {
273  T* pThis = ( pBottom - pTop ) / 2 + pTop;
274  if( in_Item < *pThis )
275  pBottom = pThis - 1;
276  else if ( in_Item > *pThis )
277  pTop = pThis + 1;
278  else
279  {
280  itResult.pItem = pThis;
281  break;
282  }
283  }
284  }
285 
286  return itResult;
287  }
288 
289  /// Erase the specified iterator from the array
290  Iterator Erase( Iterator& in_rIter )
291  {
292  AKASSERT( m_pItems != 0 );
293 
294  // Move items by 1
295 
296  T * pItemLast = m_pItems + m_uLength - 1;
297 
298  for ( T * pItem = in_rIter.pItem; pItem < pItemLast; pItem++ )
299  TMovePolicy::Move( pItem[ 0 ], pItem[ 1 ] );
300 
301  // Destroy the last item
302 
303  pItemLast->~T();
304 
305  m_uLength--;
306 
307  return in_rIter;
308  }
309 
310  /// Erase the item at the specified index
311  void Erase( unsigned int in_uIndex )
312  {
313  AKASSERT( m_pItems != 0 );
314 
315  // Move items by 1
316 
317  T * pItemLast = m_pItems + m_uLength - 1;
318 
319  for ( T * pItem = m_pItems+in_uIndex; pItem < pItemLast; pItem++ )
320  TMovePolicy::Move( pItem[ 0 ], pItem[ 1 ] );
321 
322  // Destroy the last item
323 
324  pItemLast->~T();
325 
326  m_uLength--;
327  }
328 
329  /// Erase the specified iterator in the array. but it dos not guarantee the ordering in the array.
330  /// This version should be used only when the order in the array is not an issue.
331  Iterator EraseSwap( Iterator& in_rIter )
332  {
333  AKASSERT( m_pItems != 0 );
334 
335  if ( Length( ) > 1 )
336  {
337  // Swap last item with this one.
338  TMovePolicy::Move( *in_rIter.pItem, Last( ) );
339  }
340 
341  // Destroy.
342  AKASSERT( Length( ) > 0 );
343  Last( ).~T();
344 
345  m_uLength--;
346 
347  return in_rIter;
348  }
349 
350  /// Pre-Allocate a number of spaces in the array
351  AKRESULT Reserve( AkUInt32 in_ulReserve )
352  {
353  AKASSERT( m_pItems == 0 && m_uLength == 0 );
354  AKASSERT( in_ulReserve || TGrowBy );
355 
356  if ( in_ulReserve )
357  {
358  m_pItems = (T *) TAlloc::Alloc( sizeof( T ) * in_ulReserve );
359  if ( m_pItems == 0 )
360  return AK_InsufficientMemory;
361 
362  m_ulReserved = in_ulReserve;
363  }
364 
365  return AK_Success;
366  }
367 
368  AkUInt32 Reserved() const { return m_ulReserved; }
369 
370  /// Term the array. Must be called before destroying the object.
371  void Term()
372  {
373  if ( m_pItems )
374  {
375  RemoveAll();
377  m_pItems = 0;
378  m_ulReserved = 0;
379  }
380  }
381 
382  /// Returns the numbers of items in the array.
384  {
385  return m_uLength;
386  }
387 
388  /// Returns a pointer to the first item in the array.
389  AkForceInline T * Data() const
390  {
391  return m_pItems;
392  }
393 
394  /// Returns true if the number items in the array is 0, false otherwise.
395  AkForceInline bool IsEmpty() const
396  {
397  return m_uLength == 0;
398  }
399 
400  /// Returns a pointer to the specified item in the list if it exists, 0 if not found.
401  T* Exists(ARG_T in_Item) const
402  {
403  Iterator it = FindEx( in_Item );
404  return ( it != End() ) ? it.pItem : 0;
405  }
406 
407  /// Add an item in the array, without filling it.
408  /// Returns a pointer to the location to be filled.
409  T * AddLast()
410  {
411  size_t cItems = Length();
412 
413 #if defined(_MSC_VER)
414 #pragma warning( push )
415 #pragma warning( disable : 4127 )
416 #endif
417  if ( ( cItems >= m_ulReserved ) && TGrowBy > 0 )
418  {
419  if ( !GrowArray() )
420  return 0;
421  }
422 #if defined(_MSC_VER)
423 #pragma warning( pop )
424 #endif
425 
426  // have we got space for a new one ?
427  if( cItems < m_ulReserved )
428  {
429  T * pEnd = m_pItems + m_uLength++;
430  AkPlacementNew( pEnd ) T;
431  return pEnd;
432  }
433 
434  return 0;
435  }
436 
437  /// Add an item in the array, and fills it with the provided item.
438  T * AddLast(ARG_T in_rItem)
439  {
440  T * pItem = AddLast();
441  if ( pItem )
442  *pItem = in_rItem;
443  return pItem;
444  }
445 
446  /// Returns a reference to the last item in the array.
447  T& Last()
448  {
449  AKASSERT( m_uLength );
450 
451  return *( m_pItems + m_uLength - 1 );
452  }
453 
454  /// Removes the last item from the array.
455  void RemoveLast()
456  {
457  AKASSERT( m_uLength );
458  ( m_pItems + m_uLength - 1 )->~T();
459  m_uLength--;
460  }
461 
462  /// Removes the specified item if found in the array.
463  AKRESULT Remove(ARG_T in_rItem)
464  {
465  Iterator it = FindEx( in_rItem );
466  if ( it != End() )
467  {
468  Erase( it );
469  return AK_Success;
470  }
471 
472  return AK_Fail;
473  }
474 
475  /// Fast remove of the specified item in the array.
476  /// This method do not guarantee keeping ordering of the array.
477  AKRESULT RemoveSwap(ARG_T in_rItem)
478  {
479  Iterator it = FindEx( in_rItem );
480  if ( it != End() )
481  {
482  EraseSwap( it );
483  return AK_Success;
484  }
485 
486  return AK_Fail;
487  }
488 
489  /// Removes all items in the array
490  void RemoveAll()
491  {
492  for ( Iterator it = Begin(), itEnd = End(); it != itEnd; ++it )
493  (*it).~T();
494  m_uLength = 0;
495  }
496 
497  /// Operator [], return a reference to the specified index.
498  AkForceInline T& operator[](unsigned int uiIndex) const
499  {
500  AKASSERT( m_pItems );
501  AKASSERT( uiIndex < Length() );
502  return m_pItems[uiIndex];
503  }
504 
505  /// Insert an item at the specified position without filling it.
506  /// Returns the pointer to the item to be filled.
507  T * Insert(unsigned int in_uIndex)
508  {
509  AKASSERT( in_uIndex <= Length() );
510 
511  size_t cItems = Length();
512 
513 #if defined(_MSC_VER)
514 #pragma warning( push )
515 #pragma warning( disable : 4127 )
516 #endif
517  if ( ( cItems >= m_ulReserved ) && TGrowBy > 0 )
518  {
519  if ( !GrowArray() )
520  return 0;
521  }
522 #if defined(_MSC_VER)
523 #pragma warning( pop )
524 #endif
525 
526  // have we got space for a new one ?
527  if( cItems < m_ulReserved )
528  {
529  T * pItemLast = m_pItems + m_uLength++;
530  AkPlacementNew( pItemLast ) T;
531 
532  // Move items by 1
533 
534  for ( T * pItem = pItemLast; pItem > ( m_pItems + in_uIndex ); --pItem )
535  TMovePolicy::Move( pItem[ 0 ], pItem[ -1 ] );
536 
537  // Reinitialize item at index
538 
539  ( m_pItems + in_uIndex )->~T();
540  AkPlacementNew( m_pItems + in_uIndex ) T;
541 
542  return m_pItems + in_uIndex;
543  }
544 
545  return 0;
546  }
547 
548  /// Resize the array.
549  bool GrowArray( AkUInt32 in_uGrowBy = TGrowBy )
550  {
551  AKASSERT( in_uGrowBy );
552 
553  AkUInt32 ulNewReserve = m_ulReserved + in_uGrowBy;
554  T * pNewItems = (T *) TAlloc::Alloc( sizeof( T ) * ulNewReserve );
555  if ( !pNewItems )
556  return false;
557 
558  // Copy all elements in new array, destroy old ones
559 
560  size_t cItems = Length();
561 
562  if ( m_pItems && m_pItems != pNewItems /*AkHybridAllocator may serve up same memory*/ )
563  {
564  for ( size_t i = 0; i < cItems; ++i )
565  {
566  AkPlacementNew( pNewItems + i ) T;
567 
568  TMovePolicy::Move( pNewItems[ i ], m_pItems[ i ] );
569 
570  m_pItems[ i ].~T();
571  }
572 
574  }
575 
576  m_pItems = pNewItems;
577  m_ulReserved = ulNewReserve;
578 
579  return true;
580  }
581 
582  /// Resize the array to the specified size.
583  bool Resize(AkUInt32 in_uiSize)
584  {
585  AkUInt32 cItems = Length();
586  if (in_uiSize < cItems)
587  {
588  //Destroy superfluous elements
589  for(AkUInt32 i = in_uiSize - 1 ; i < cItems; i++)
590  {
591  m_pItems[ i ].~T();
592  }
593  m_uLength = in_uiSize;
594  return true;
595  }
596 
597  if ( in_uiSize > m_ulReserved )
598  {
599  if ( !GrowArray(in_uiSize - cItems) )
600  return false;
601  }
602 
603  //Create the missing items.
604  for(size_t i = cItems; i < in_uiSize; i++)
605  {
606  AkPlacementNew( m_pItems + i ) T;
607  }
608 
609  m_uLength = in_uiSize;
610  return true;
611  }
612 
614  {
615  Term();
616 
617  TAlloc::TransferMem( (void **)&m_pItems, in_rSource, (void*)in_rSource.m_pItems );
618  m_uLength = in_rSource.m_uLength;
619  m_ulReserved = in_rSource.m_ulReserved;
620 
621  in_rSource.m_pItems = NULL;
622  in_rSource.m_uLength = 0;
623  in_rSource.m_ulReserved = 0;
624  }
625 
627  {
628  Term();
629 
630  if (Resize(in_rSource.Length()))
631  {
632  for (AkUInt32 i = 0; i < in_rSource.Length(); ++i)
633  m_pItems[i] = in_rSource.m_pItems[i];
634  return AK_Success;
635  }
636  return AK_Fail;
637  }
638 
639 protected:
640 
641  T * m_pItems; ///< pointer to the beginning of the array.
642  AkUInt32 m_uLength; ///< number of items in the array.
643  AkUInt32 m_ulReserved; ///< how many we can have at most (currently allocated).
644 };
645 
646 
647 #endif
AkForceInline void * Alloc(size_t in_uSize)
Definition: AkArray.h:69
T * Exists(ARG_T in_Item) const
Returns a pointer to the specified item in the list if it exists, 0 if not found.
Definition: AkArray.h:401
Iterator EraseSwap(Iterator &in_rIter)
Definition: AkArray.h:331
AK_ALIGN(char m_buffer[uBufferSizeBytes], uAlignmentSize)
Iterator FindEx(ARG_T in_Item) const
Returns the iterator th the specified item, will be End() if the item is not found
Definition: AkArray.h:249
AKRESULT __cdecl Free(AkMemPoolId in_poolId, void *in_pMemAddress)
bool operator==(const Iterator &in_rOp) const
== operator</div>
Definition: AkArray.h:219
Iterator
Definition: AkArray.h:175
The operation was successful.
Definition: AkTypes.h:129
AKRESULT Copy(const AkArray< T, ARG_T, TAlloc, TGrowBy, TMovePolicy > &in_rSource)
Definition: AkArray.h:626
static const AkUInt32 _uBufferSizeBytes
Definition: AkArray.h:93
AkArrayAllocatorNoAlign< _ArrayPoolDefault > ArrayPoolDefault
Definition: AkArray.h:147
AkForceInline AkUInt32 Length() const
Returns the numbers of items in the array.
Definition: AkArray.h:383
AKRESULT
Standard function call result.
Definition: AkTypes.h:126
void Erase(unsigned int in_uIndex)
Erase the item at the specified index
Definition: AkArray.h:311
AKRESULT Remove(ARG_T in_rItem)
Removes the specified item if found in the array.
Definition: AkArray.h:463
Iterator & operator--()
– operator</div>
Definition: AkArray.h:204
#define AK_DEFINE_ARRAY_POOL(_name_, _poolID_)
Definition: AkArray.h:35
AkForceInline void AkMemCpy(void *pDest, const void *pSrc, AkUInt32 uSize)
Platform Independent Helper
Definition: AkPlatformFuncs.h:330
AkArrayAllocatorNoAlign< _ArrayPoolLEngineDefault > ArrayPoolLEngineDefault
Definition: AkArray.h:148
Specific implementation of array
Definition: AkArray.h:152
The operation failed.
Definition: AkTypes.h:130
#define AK_SIMD_ALIGNMENT
Platform-specific alignment requirement for SIMD data
Definition: AkTypes.h:66
AkForceInline void TransferMem(void **io_pDest, AkArrayAllocatorNoAlign< U_POOL > in_srcAlloc, void *in_pSrc)
Definition: AkArray.h:60
T * AddLast()
Definition: AkArray.h:409
#define AKASSERT(Condition)
Definition: AkAssert.h:69
AkForceInline void Free(void *in_pAddress)
Definition: AkArray.h:103
T & operator *()
Definition: AkArray.h:212
~AkArray()
Destructor
Definition: AkArray.h:164
AkArray()
Constructor
Definition: AkArray.h:156
T * m_pItems
pointer to the beginning of the array.
Definition: AkArray.h:641
bool GrowArray(AkUInt32 in_uGrowBy=TGrowBy)
Resize the array.
Definition: AkArray.h:549
AkForceInline void TransferMem(void **io_pDest, AkArrayAllocatorAlignedSimd< U_POOL > in_srcAlloc, void *in_pSrc)
Definition: AkArray.h:79
#define AkForceInline
Force inlining
Definition: AkTypes.h:63
T * pItem
Pointer to the item in the array.
Definition: AkArray.h:177
Iterator End() const
Returns the iterator to the end of the array
Definition: AkArray.h:241
AKRESULT Reserve(AkUInt32 in_ulReserve)
Pre-Allocate a number of spaces in the array
Definition: AkArray.h:351
AKRESULT __cdecl Falign(AkMemPoolId in_poolId, void *in_pMemAddress)
AkForceInline void TransferMem(void **io_pDest, AkHybridAllocator< uBufferSizeBytes, uAlignmentSize > &in_srcAlloc, void *in_pSrc)
Definition: AkArray.h:109
AkUInt32 m_uLength
number of items in the array.
Definition: AkArray.h:642
AKRESULT RemoveSwap(ARG_T in_rItem)
Definition: AkArray.h:477
AkUInt32 m_ulReserved
how many we can have at most (currently allocated).
Definition: AkArray.h:643
AkForceInline bool IsEmpty() const
Returns true if the number items in the array is 0, false otherwise.
Definition: AkArray.h:395
Iterator Begin() const
Returns the iterator to the first item of the array, will be End() if the array is empty.
Definition: AkArray.h:233
void Transfer(AkArray< T, ARG_T, TAlloc, TGrowBy, TMovePolicy > &in_rSource)
Definition: AkArray.h:613
void *__cdecl Malign(AkMemPoolId in_poolId, size_t in_uSize, AkUInt32 in_uAlignment)
Iterator operator+(AkUInt32 inc) const
Definition: AkArray.h:180
void *__cdecl Malloc(AkMemPoolId in_poolId, size_t in_uSize)
static AkForceInline void Move(T &in_Dest, T &in_Src)
Definition: AkArray.h:130
#define NULL
Definition: AkTypes.h:49
AkForceInline void * Alloc(size_t in_uSize)
Definition: AkArray.h:95
T * AddLast(ARG_T in_rItem)
Add an item in the array, and fills it with the provided item.
Definition: AkArray.h:438
Iterator BinarySearch(ARG_T in_Item) const
Definition: AkArray.h:264
#define AkPlacementNew(_memory)
Definition: AkObject.h:53
T & Last()
Returns a reference to the last item in the array.
Definition: AkArray.h:447
AkMemPoolId g_LEngineDefaultPoolId
Iterator Erase(Iterator &in_rIter)
Erase the specified iterator from the array
Definition: AkArray.h:290
Iterator & operator++()
++ operator</div>
Definition: AkArray.h:196
static AkForceInline void Move(T &in_Dest, T &in_Src)
Definition: AkArray.h:140
AkUInt32 operator-(Iterator const &rhs) const
Definition: AkArray.h:189
AkArrayAllocatorAlignedSimd< _ArrayPoolLEngineDefault > ArrayPoolLEngineDefaultAlignedSimd
Definition: AkArray.h:149
Memory error.
Definition: AkTypes.h:180
uint32_t AkUInt32
Unsigned 32-bit integer
Definition: AkTypes.h:79
bool operator !=(const Iterator &in_rOp) const
!= operator</div>
Definition: AkArray.h:225
AkUInt32 Reserved() const
Definition: AkArray.h:368
AkForceInline T & operator[](unsigned int uiIndex) const
Operator [], return a reference to the specified index.
Definition: AkArray.h:498
AkMemPoolId g_DefaultPoolId
AkForceInline void * Alloc(size_t in_uSize)
Definition: AkArray.h:50
void RemoveAll()
Removes all items in the array
Definition: AkArray.h:490
T * Insert(unsigned int in_uIndex)
Definition: AkArray.h:507
AkForceInline void Free(void *in_pAddress)
Definition: AkArray.h:55
bool Resize(AkUInt32 in_uiSize)
Resize the array to the specified size.
Definition: AkArray.h:583
void RemoveLast()
Removes the last item from the array.
Definition: AkArray.h:455
AkForceInline T * Data() const
Returns a pointer to the first item in the array.
Definition: AkArray.h:389
AkForceInline void Free(void *in_pAddress)
Definition: AkArray.h:74
void Term()
Term the array. Must be called before destroying the object.
Definition: AkArray.h:371