Wwise SDK
_ak_array_8h_source
版本
menu_open
警告:系统已根据您所用大版本 (2023.1.4.8496) 自动跳转至最新文档。若想访问特定版本的文档,请从 Audiokinetic Launcher 下载离线文档,并在 Wwise 设计程序中勾选 Offline Documentation 选项。
link
AkArray.h
浏览该文件的文档.
44 static AkForceInline void * ReAlloc( void * in_pCurrent, size_t in_uOldSize, size_t in_uNewSize )
54 static AkForceInline void TransferMem(void *& io_pDest, AkArrayAllocatorNoAlign<T_MEMID> in_srcAlloc, void * in_pSrc )
78 AkForceInline void TransferMem(void *& io_pDest, AkArrayAllocatorAlignedSimd<T_MEMID> in_srcAlloc, void * in_pSrc )
85 // 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.
86 // If the array grows to a larger size than uBufferSizeBytes, the the memory is allocated with the specified AkMemID.
87 // NOTE: The use of this allocator is not allowed when AkArray::TMovePolicy::IsTrivial() == false,
89 template< AkUInt32 uBufferSizeBytes, AkUInt8 uAlignmentSize = 1, AkMemID T_MEMID = AkMemID_Object>
123 AkForceInline void TransferMem(void *& io_pDest, AkHybridAllocator<uBufferSizeBytes, uAlignmentSize, T_MEMID>& in_srcAlloc, void * in_pSrc)
140 // NOTE: The use of this allocator is not allowed when AkArray::TMovePolicy::IsTrivial() == false,
148 // By default the assignment operator is invoked to move elements of an array from slot to slot. If desired,
149 // a custom 'Move' operation can be passed into TMovePolicy to transfer ownership of resources from in_Src to in_Dest.
225 // The hybrid GrowBy policy will try to grow to exactly uCount before growing farther to prevent unneccesary allocations.
226 // The goal is to avoid expanding past uBufferSizeBytes until you have to, then behave like AkGrowByPolicy_Proportional
257 template <class T, class ARG_T, class TAlloc = ArrayPoolDefault, class TGrowBy = AkGrowByPolicy_DEFAULT, class TMovePolicy = AkAssignmentMovePolicy<T> > class AkArray : public TAlloc
479 /// Erase the specified iterator in the array. but it does not guarantee the ordering in the array.
536 AKASSERT(!"AkArray calling Reserve() with AkGrowByPolicy_NoGrow is only allowed when reserved size is zero");
static AkForceInline void TransferMem(void *&io_pDest, AkArrayAllocatorNoAlign< T_MEMID > in_srcAlloc, void *in_pSrc)
Definition: AkArray.h:54
AkForceInline void TransferMem(void *&io_pDest, AkHybridAllocator< uBufferSizeBytes, uAlignmentSize, T_MEMID > &in_srcAlloc, void *in_pSrc)
Definition: AkArray.h:123
AkForceInline void * Alloc(size_t in_uSize)
Definition: AkArray.h:63
Iterator & operator++()
++ operator</div>
Definition: AkArray.h:301
Definition: AkArray.h:62
AkForceInline void AkMemMove(void *pDest, const void *pSrc, AkUInt32 uSize)
Definition: AkPlatformFuncs.h:125
Definition: AkArray.h:243
AkForceInline void * ReAlloc(void *in_pCurrent, size_t in_uOldSize, size_t in_uNewSize)
Definition: AkArray.h:101
AKRESULT Copy(const AkArray< T, ARG_T, TAlloc, TGrowBy, TMovePolicy > &in_rSource)
Definition: AkArray.h:865
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:360
Definition: AkArray.h:181
AKSOUNDENGINE_API void Free(AkMemPoolId in_poolId, void *in_pMemAddress)
AK_ALIGN(char m_buffer[uBufferSizeBytes], uAlignmentSize)
Definition: AkArray.h:197
AkForceInline void * ReAlloc(void *in_pCurrent, size_t in_uOldSize, size_t in_uNewSize)
Definition: AkArray.h:68
AkArrayAllocatorAlignedSimd< AkMemID_Processing > ArrayPoolLEngineDefaultAlignedSimd
Definition: AkArray.h:213
static AkUInt32 GrowBy(AkUInt32 in_CurrentArraySize)
Definition: AkArray.h:231
AkForceInline 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:584
AkArrayAllocatorNoAlign< AkMemID_Profiler > ArrayPoolProfiler
Definition: AkArray.h:212
AkArrayAllocatorNoAlign< AkMemID_Processing > ArrayPoolLEngineDefault
Definition: AkArray.h:211
AkForceInline void TransferMem(void *&io_pDest, AkArrayAllocatorAlignedSimd< T_MEMID > in_srcAlloc, void *in_pSrc)
Definition: AkArray.h:78
bool operator==(const Iterator &in_rOp) const
== operator</div>
Definition: AkArray.h:330
@ AK_InvalidParameter
Something is not within bounds, check the documentation of the function returning this code.
Definition: AkTypes.h:149
static AkForceInline void * Alloc(size_t in_uSize)
Definition: AkArray.h:39
AkForceInline T * AddLast(ARG_T in_rItem)
Add an item in the array, and fills it with the provided item.
Definition: AkArray.h:621
static AkForceInline void * ReAlloc(void *in_pCurrent, size_t in_uOldSize, size_t in_uNewSize)
Definition: AkArray.h:44
AkForceInline void AkMemCpy(void *pDest, const void *pSrc, AkUInt32 uSize)
Platform Independent Helper for memcpy/memmove/memset
Definition: AkPlatformFuncs.h:120
Definition: AkArray.h:166
Definition: AkArray.h:147
#define AK_SIMD_ALIGNMENT
Platform-specific alignment requirement for SIMD data
Definition: AkTypes.h:52
void Transfer(AkArray< T, ARG_T, TAlloc, TGrowBy, TMovePolicy > &in_rSource)
Definition: AkArray.h:852
Iterator Erase(Iterator &in_rIter)
Erase the specified iterator from the array
Definition: AkArray.h:403
static AkForceInline void Move(T &in_Dest, T &in_Src)
Definition: AkArray.h:198
Iterator Begin() const
Returns the iterator to the first item of the array, will be End() if the array is empty.
Definition: AkArray.h:344
AkForceInline AkUInt32 Length() const
Returns the numbers of items in the array.
Definition: AkArray.h:566
AKRESULT Remove(ARG_T in_rItem)
Removes the specified item if found in the array.
Definition: AkArray.h:646
Definition: AkArray.h:230
bool operator!=(const Iterator &in_rOp) const
!= operator</div>
Definition: AkArray.h:336
Definition: AkArray.h:216
static AkForceInline void Free(void *in_pAddress)
Definition: AkArray.h:49
Definition: AkArray.h:91
static AkUInt32 GrowBy(AkUInt32 in_CurrentArraySize)
Definition: AkArray.h:244
AkForceInline bool IsEmpty() const
Returns true if the number items in the array is 0, false otherwise.
Definition: AkArray.h:578
static AkForceInline void Move(T &in_Dest, T &in_Src)
Definition: AkArray.h:150
Definition: AkArray.h:221
AkForceInline T * Data() const
Returns a pointer to the first item in the array.
Definition: AkArray.h:572
Definition: AkArray.h:38
Iterator & operator--()
– operator</div>
Definition: AkArray.h:309
AkForceInline T & operator[](unsigned int uiIndex) const
Operator [], return a reference to the specified index.
Definition: AkArray.h:681
static AkForceInline void Move(T &&io_Dest, T &&io_Src)
Definition: AkArray.h:168
static AkForceInline void Move(T &&io_Dest, T &&io_Src)
Definition: AkArray.h:183