mirror of
https://github.com/alliedmodders/hl2sdk.git
synced 2025-12-09 19:48:23 +00:00
Update CCountedStringPool
This commit is contained in:
parent
739c88fa85
commit
82cc7563cd
@ -56,7 +56,7 @@ protected:
|
|||||||
//
|
//
|
||||||
// At some point this should replace CStringPool
|
// At some point this should replace CStringPool
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
class CCountedStringPool
|
class CCountedStringPool_CI
|
||||||
{
|
{
|
||||||
public: // HACK, hash_item_t structure should not be public.
|
public: // HACK, hash_item_t structure should not be public.
|
||||||
|
|
||||||
@ -81,23 +81,23 @@ public: // HACK, hash_item_t structure should not be public.
|
|||||||
StringPoolCase_t m_caseSensitivity;
|
StringPoolCase_t m_caseSensitivity;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
DLL_CLASS_IMPORT CCountedStringPool( StringPoolCase_t caseSensitivity = StringPoolCaseInsensitive );
|
DLL_CLASS_IMPORT CCountedStringPool_CI();
|
||||||
DLL_CLASS_IMPORT virtual ~CCountedStringPool();
|
DLL_CLASS_IMPORT virtual ~CCountedStringPool_CI();
|
||||||
|
|
||||||
DLL_CLASS_IMPORT void FreeAll();
|
DLL_CLASS_IMPORT void FreeAll();
|
||||||
|
|
||||||
DLL_CLASS_IMPORT char *FindString( const char* pIntrinsic );
|
DLL_CLASS_IMPORT const char *FindString( const char* pIntrinsic ) const;
|
||||||
DLL_CLASS_IMPORT char *ReferenceString( const char* pIntrinsic );
|
DLL_CLASS_IMPORT const char *ReferenceString( const char* pIntrinsic );
|
||||||
DLL_CLASS_IMPORT void DereferenceString( const char* pIntrinsic );
|
DLL_CLASS_IMPORT void DereferenceString( const char* pIntrinsic );
|
||||||
|
|
||||||
// These are only reliable if there are less than 64k strings in your string pool
|
// These are only reliable if there are less than 64k strings in your string pool
|
||||||
DLL_CLASS_IMPORT unsigned short FindStringHandle( const char* pIntrinsic );
|
DLL_CLASS_IMPORT unsigned short FindStringHandle( const char* pIntrinsic ) const;
|
||||||
DLL_CLASS_IMPORT unsigned short ReferenceStringHandle( const char* pIntrinsic );
|
DLL_CLASS_IMPORT unsigned short ReferenceStringHandle( const char* pIntrinsic );
|
||||||
DLL_CLASS_IMPORT char *HandleToString( unsigned short handle );
|
DLL_CLASS_IMPORT const char *HandleToString( unsigned short handle ) const;
|
||||||
DLL_CLASS_IMPORT void SpewStrings();
|
DLL_CLASS_IMPORT void SpewStrings() const;
|
||||||
DLL_CLASS_IMPORT unsigned Hash( const char *pszKey );
|
DLL_CLASS_IMPORT unsigned int Hash( const char *pszKey ) const;
|
||||||
|
|
||||||
DLL_CLASS_IMPORT bool SaveToBuffer( CUtlBuffer &buffer );
|
DLL_CLASS_IMPORT bool SaveToBuffer( CUtlBuffer &buffer ) const;
|
||||||
DLL_CLASS_IMPORT bool RestoreFromBuffer( CUtlBuffer &buffer );
|
DLL_CLASS_IMPORT bool RestoreFromBuffer( CUtlBuffer &buffer );
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -251,7 +251,7 @@ public:
|
|||||||
bool RestoreFromBuffer( CUtlBuffer &buffer );
|
bool RestoreFromBuffer( CUtlBuffer &buffer );
|
||||||
|
|
||||||
private:
|
private:
|
||||||
CCountedStringPool m_StringPool;
|
CCountedStringPool_CI m_StringPool;
|
||||||
mutable CThreadSpinRWLock m_lock;
|
mutable CThreadSpinRWLock m_lock;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user