32 template<
typename TAlloc,
typename T_CHAR>
55 template<
typename TAlloc,
typename T_CHAR>
59 template<
typename TAlloc,
typename T_CHAR>
69 template<
typename T_CHAR2>
70 AkString(
const T_CHAR2* in_pStr) { tImpl::Set(in_pStr); }
74 template<
typename TAlloc2,
typename T_CHAR2>
87 tData::pStr = (T_CHAR*)TAlloc::Alloc((uLen + 1) *
sizeof(T_CHAR));
110 in_from.tData::pStr =
NULL;
111 in_from.tData::bOwner =
false;
121 tImpl::Set(in_rhs.
Get());
125 template<
typename TAlloc2,
typename T_CHAR2>
128 tImpl::Set(in_rhs.
Get());
132 template<
typename T_CHAR2>
140 #ifdef AK_SUPPORT_WCHAR
141 template<
typename TAlloc>
157 size_t uLen = strlen(in_pStr);
160 tData::pStr = (
wchar_t*)TAlloc::Alloc((uLen + 1) *
sizeof(wchar_t));
161 if (tData::pStr ==
NULL)
165 tData::bOwner =
true;
176 AKRESULT Set(
const wchar_t* in_pStr)
179 tData::pStr = in_pStr;
186 return (
AkUInt32)wcslen(tData::pStr);
191 template<
typename TAlloc>
207 size_t uLen = wcslen(in_pStr);
210 tData::pStr = (
char*)TAlloc::Alloc((uLen + 1) *
sizeof(char));
211 if (tData::pStr ==
NULL)
215 tData::bOwner =
true;
229 tData::pStr = in_pStr;
236 return (
AkUInt32)strlen(tData::pStr);
246 template<
typename TAlloc,
typename T_CHAR>
253 return hash.
Compute(in_str.
Get(), uLen *
sizeof(T_CHAR));
262 template<
typename TAlloc,
typename T_CHAR,
typename tLock = AkNonThreaded>
290 if (pInstance ==
NULL)
303 if (pInstance !=
NULL)
305 pInstance->~Instance();
306 pInstance->TAlloc::Free(pInstance);
316 static Instance* pInstance;
325 template<
typename TAlloc2,
typename T_CHAR2>
335 template<
typename TAlloc2,
typename T_CHAR2>
343 template<
typename T_CHAR2>
369 template<
typename TAlloc2,
typename T_CHAR2>
389 pEntry->
str = in_str;
394 pInstance->table.Unset(
m_uHash);
443 typename tStringTable::IteratorEx it = table.
FindEx(
m_uHash);
445 Entry& entry = (*it).item;
449 if (entry.refCount == 0)
464 template<
typename TAlloc,
typename T_CHAR,
typename tLock>
AkString & operator=(const AkString< TAlloc2, T_CHAR2 > &in_rhs)
AkDbString(const tThis &in_fromDbStr)
AKRESULT __cdecl Free(AkMemPoolId in_poolId, void *in_pMemAddress)
void Transfer(AkString< TAlloc, T_CHAR > &in_from)
AkString(const T_CHAR2 *in_pStr)
HashParams::HashType Compute(const void *in_pData, unsigned int in_dataSize)
const T_CHAR * Get() const
AKRESULT Aquire(const AkString< TAlloc2, T_CHAR2 > &in_str)
AkStringData(const T_CHAR *in_pStr)
AKRESULT Set(const char *in_pStr)
AkString(const AkString< TAlloc, T_CHAR > &in_other)
The operation was successful.
tThis & operator=(const T_CHAR2 *in_rhs)
IteratorEx Erase(const IteratorEx &in_rIter)
AKRESULT
Standard function call result.
AkForceInline void Unlock()
AkForceInline void AkMemCpy(void *pDest, const void *pSrc, AkUInt32 uSize)
Platform Independent Helper.
tThis & operator=(const AkString< TAlloc2, T_CHAR2 > &in_rhs)
AkString & operator=(const T_CHAR2 *in_pStr)
#define AKASSERT(Condition)
const T_CHAR * Get() const
AkString< TAlloc, T_CHAR > tString
AkDbString< TAlloc, T_CHAR, tLock > tThis
AkHashList< AkUInt32, Entry, TAlloc > tStringTable
AkForceInline AkInt32 AkWideCharToChar(const wchar_t *in_pszUnicodeString, AkUInt32 in_uiOutBufferSize, char *io_pszAnsiString)
String conversion helper.
AkForceInline void Lock()
tThis & operator=(const tThis &in_rhs)
#define AkPlacementNew(_memory)
AkDbString(const AkString< TAlloc2, T_CHAR2 > &in_fromStr)
AKRESULT Set(const wchar_t *in_pStr)
AkForceInline AkInt32 AkCharToWideChar(const char *in_pszAnsiString, AkUInt32 in_uiOutBufferSize, void *io_pvUnicodeStringBuffer)
String conversion helper.
AkString & operator=(const AkString< TAlloc, T_CHAR > &in_rhs)
IteratorEx FindEx(T_KEY in_Key)
static AkForceInline AkUInt32 AkHash(const AkString< TAlloc, T_CHAR > &in_str)
AKRESULT Aquire(AkUInt32 in_uHash)
AkString(const AkString< TAlloc2, T_CHAR2 > &in_other)