Warning: you were redirected to the latest documentation corresponding to your major release ( 2023.1.7.8574 ). Should you wish to access your specific version's documentation, please download the offline documentation from the Audiokinetic Launcher and check the Offline Documentation option in Wwise Authoring.
Go to the documentation of this file.
32 #include <type_traits>
110 template<
typename ValueType>
114 return InitBase(io_pHashTable, in_pAllocator, in_uInitialReserveCount,
sizeof(ValueType),
alignof(ValueType));
118 template<
typename KeyType,
typename ValueType>
121 if (!std::is_trivially_destructible<ValueType>::value)
125 (io_pHashTable->
ValueAt(uSlot)).~ValueType();
135 template<
typename KeyType,
typename ValueType>
139 if (ValueType* pInsertedValue = (ValueType*)
AddKey(io_pHashTable, in_pAllocator, in_uKey))
143 return pInsertedValue;
152 template<
typename ValueType>
154 AkUInt64 in_uKey, ValueType* in_pNewValue)
156 if (ValueType* pInsertedValue = (ValueType*)
AddKey(io_pHashTable, in_pAllocator, in_uKey))
160 return pInsertedValue;
168 template<
typename KeyType,
typename ValueType>
171 io_pHashTable->
ValueAt(in_iSlotToRemove).~ValueType();
172 return RemoveSlot(io_pHashTable, in_iSlotToRemove);
180 template<
typename KeyType,
typename FuncType>
186 while (uSlotsToEvaluate > 0)
188 AKASSERT(uSlot < in_pHashTable->uNumReservedEntries);
189 if (pbSlotOccupied[uSlot])
208 template<
typename KeyType,
typename ValueType,
typename FuncType>
214 while (uSlotsToEvaluate > 0)
216 AKASSERT(uSlot < in_pHashTable->uNumReservedEntries);
217 if (pbSlotOccupied[uSlot])
232 #define AK_GET_PLUGIN_SERVICE_HASHTABLE(plugin_ctx) static_cast<AK::IAkPluginServiceHashTable*>(plugin_ctx->GetPluginService(AK::PluginServiceType_HashTable))
virtual ~IAkPluginServiceHashTable()
AkForceInline AkUInt64 GetObjectChannelHash(AkUInt64 in_uAudioObjectId, AkUInt32 in_uChannelIdx)
Common hash function for getting a unique hash for a channel on an audio object.
void ForEachSlot(const AkHashTableBase< KeyType > *in_pHashTable, FuncType in_func)
static AkInt32 GetNextSlotByKey(AkHashTableBase< AkUInt64 > *in_pHashTable, AkUInt64 in_uKey, AkInt32 in_iPreviousSlot)
static const AkUInt64 kObjectKeyNumBits
static const AkUInt64 kObjectKeyMask
virtual bool RemoveSlot(AkHashTableBase< AkUInt64 > *io_pHashTable, AkInt32 in_iSlot)=0
AKRESULT
Standard function call result.
AkInt32 GetNextSlotForKey(const AkHashTableBase< KeyType > *pHashTable, KeyType uKey, AkInt32 iPreviousSlot)
Common interface for plug-in services accessed through the global plug-in context.
AkForceInline void RemoveIfValue(AkHashTable< KeyType, ValueType > *in_pHashTable, FuncType in_func)
virtual AKRESULT InitBase(AK::AkHashTableBase< AkUInt64 > *io_pHashTable, AK::IAkPluginMemAlloc *in_pAllocator, AkUInt32 in_uInitialReserveCount, AkUInt32 in_uValueElementSize, AkUInt32 in_uValueElementAlign)=0
int32_t AkInt32
Signed 32-bit integer.
virtual void * AddKey(AkHashTableBase< AkUInt64 > *io_pHashTable, AK::IAkPluginMemAlloc *in_pAllocator, AkUInt64 in_uKey)=0
#define AkPlacementNew(_memory)
A common hashtable for mapping audioobjectIds to a combination of audio buffers and objects.
virtual void Term(AkHashTableBase< AkUInt64 > *io_pHashTable, AK::IAkPluginMemAlloc *in_pAllocator)=0
#define AKASSERT(Condition)
AkForceInline void AkMemCpy(void *pDest, const void *pSrc, AkUInt32 uSize)
Platform Independent Helper for memcpy/memmove/memset.
AK::AkHashTable< AkAudioObjectID, AkAudioObjectBuffer > AkAudioObjectBufferMap
AkAudioObject * pMetadata
AkForceInline void * AddKeyDefaultValue(AkHashTable< KeyType, ValueType > *io_pHashTable, AK::IAkPluginMemAlloc *in_pAllocator, KeyType in_uKey)
AkForceInline void TermValues(AkHashTable< KeyType, ValueType > *io_pHashTable, AK::IAkPluginMemAlloc *in_pAllocator)
AkForceInline void RemoveIf(AkHashTableBase< KeyType > *in_pHashTable, FuncType in_func)
ValueType & ValueAt(AkInt32 uSlot)
AkInt32 GetFirstSlotForKey(const AkHashTableBase< KeyType > *pHashTable, KeyType uKey)
virtual void Reset(AkHashTableBase< AkUInt64 > *io_pHashTable)=0
uint64_t AkUInt64
Unsigned 64-bit integer.
AkForceInline bool RemoveSlotValue(AkHashTable< KeyType, ValueType > *io_pHashTable, AkInt32 in_iSlotToRemove)
AkForceInline AKRESULT Init(AkHashTable< AkUInt64, ValueType > *io_pHashTable, AK::IAkPluginMemAlloc *in_pAllocator, AkUInt32 in_uInitialReserveCount)
AkUInt16 uValueElementSize
uint32_t AkUInt32
Unsigned 32-bit integer.
static AkInt32 GetFirstSlotByKey(AkHashTableBase< AkUInt64 > *in_pHashTable, AkUInt64 in_uKey)
virtual void RemoveKey(AkHashTableBase< AkUInt64 > *io_pHashTable, AkUInt64 in_uKey)=0
AkForceInline ValueType * AddKeyValue(AkHashTable< AkUInt64, ValueType > *io_pHashTable, AK::IAkPluginMemAlloc *in_pAllocator, AkUInt64 in_uKey, ValueType *in_pNewValue)
AkForceInline AkUInt64 AkHashMurMurMix64(AkUInt64 uValue)
Tell us about your project. We're here to help.
Register your project and we'll help you get started with no strings attached!
Get started with Wwise