Warning: you were redirected to the latest documentation corresponding to your major release ( 2023.1.10.8659 ). 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.
31 template<
typename TAlloc,
typename T_CHAR>
60 template<
typename TAlloc,
typename T_CHAR>
64 template<
typename TAlloc,
typename T_CHAR>
74 template<
typename T_CHAR2>
75 AkString(
const T_CHAR2* in_pStr) { tImpl::Set(in_pStr); }
79 template<
typename TAlloc2,
typename T_CHAR2>
92 tData::pStr = (T_CHAR*)TAlloc::Alloc((uLen + 1) *
sizeof(T_CHAR));
112 TAlloc::TransferMem((
void*&)
tData::pStr, in_from, (
void*)in_from.tData::pStr);
113 in_from.tData::pStr =
nullptr;
116 in_from.tData::bOwner =
false;
126 tImpl::Set(in_rhs.
Get());
127 TAlloc::operator=(in_rhs);
131 template<
typename TAlloc2,
typename T_CHAR2>
134 tImpl::Set(in_rhs.
Get());
135 TAlloc::operator=(in_rhs);
139 template<
typename T_CHAR2>
147 #ifdef AK_SUPPORT_WCHAR
148 template<
typename TAlloc>
164 size_t uLen = strlen(in_pStr);
167 tData::pStr = (
wchar_t*)TAlloc::Alloc((uLen + 1) *
sizeof(wchar_t));
168 if (tData::pStr ==
NULL)
172 tData::bOwner =
true;
183 AKRESULT Set(
const wchar_t* in_pStr)
186 tData::pStr = in_pStr;
193 if (tData::pStr ==
nullptr)
196 return (
AkUInt32)wcslen(tData::pStr);
201 template<
typename TAlloc>
217 size_t uLen = wcslen(in_pStr);
220 tData::pStr = (
char*)TAlloc::Alloc((uLen + 1) *
sizeof(char));
221 if (tData::pStr ==
NULL)
225 tData::bOwner =
true;
239 tData::pStr = in_pStr;
246 if (tData::pStr ==
nullptr)
249 return (
AkUInt32)strlen(tData::pStr);
259 template<
typename TAlloc,
typename T_CHAR>
266 return hash.
Compute(in_str.
Get(), uLen *
sizeof(T_CHAR));
275 template<
typename TAlloc,
typename T_CHAR,
typename tLock = AkNonThreaded>
303 if (pInstance ==
NULL)
316 if (pInstance !=
NULL)
318 pInstance->~Instance();
319 pInstance->TAlloc::Free(pInstance);
329 static Instance* pInstance;
338 template<
typename TAlloc2,
typename T_CHAR2>
348 template<
typename TAlloc2,
typename T_CHAR2>
356 template<
typename T_CHAR2>
382 template<
typename TAlloc2,
typename T_CHAR2>
402 pEntry->
str = in_str;
407 pInstance->table.Unset(
m_uHash);
456 typename tStringTable::IteratorEx it = table.
FindEx(
m_uHash);
458 Entry& entry = (*it).item;
477 template<
typename TAlloc,
typename T_CHAR,
typename tLock>
@ AK_Fail
The operation failed.
AkString & operator=(const AkString< TAlloc, T_CHAR > &in_rhs)
tThis & operator=(const AkString< TAlloc2, T_CHAR2 > &in_rhs)
AKRESULT Set(const char *in_pStr)
const T_CHAR * Get() const
void Transfer(AkString< TAlloc, T_CHAR > &in_from)
AkStringData(const T_CHAR *in_pStr)
AKSOUNDENGINE_API void Free(AkMemPoolId in_poolId, void *in_pMemAddress)
AKRESULT
Standard function call result.
AkString(const T_CHAR2 *in_pStr)
AKRESULT Aquire(const AkString< TAlloc2, T_CHAR2 > &in_str)
AkString< TAlloc, T_CHAR > tString
AkHashList< AkUInt32, Entry, TAlloc > tStringTable
AkString & operator=(const T_CHAR2 *in_pStr)
IteratorEx Erase(const IteratorEx &in_rIter)
@ AK_Success
The operation was successful.
int32_t AkInt32
Signed 32-bit integer.
AKSOUNDENGINE_API void Term()
#define AkPlacementNew(_memory)
static AkForceInline AkUInt32 AkHash(const AkString< TAlloc, T_CHAR > &in_str)
#define AKASSERT(Condition)
AkForceInline void Unlock()
AkForceInline void AkMemCpy(void *pDest, const void *pSrc, AkUInt32 uSize)
Platform Independent Helper for memcpy/memmove/memset.
AkDbString< TAlloc, T_CHAR, tLock > tThis
const T_CHAR * Get() const
AkString(const AkString< TAlloc, T_CHAR > &in_other)
AkForceInline void Lock()
AKRESULT Aquire(AkUInt32 in_uHash)
AKRESULT Set(const wchar_t *in_pStr)
IteratorEx FindEx(T_KEY in_Key)
AkString & operator=(const AkString< TAlloc2, T_CHAR2 > &in_rhs)
AkForceInline AkInt32 AkCharToWideChar(const char *in_pszAnsiString, AkUInt32 in_uiOutBufferSize, void *io_pvUnicodeStringBuffer)
String conversion helper.
tThis & operator=(const tThis &in_rhs)
uint32_t AkUInt32
Unsigned 32-bit integer.
HashParams::HashType Compute(const void *in_pData, typename HashParams::SizeType in_dataSize)
@ AK_InsufficientMemory
Memory error.
AkForceInline AkInt32 AkWideCharToChar(const wchar_t *in_pszUnicodeString, AkUInt32 in_uiOutBufferSize, char *io_pszAnsiString)
String conversion helper.
AkDbString(const AkString< TAlloc2, T_CHAR2 > &in_fromStr)
AkDbString(const tThis &in_fromDbStr)
AkString(const AkString< TAlloc2, T_CHAR2 > &in_other)
tThis & operator=(const T_CHAR2 *in_rhs)
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