|
Urho3D
|
Helper class used for StringHash reversing. More...
#include </home/runner/work/rurho3d.github.io/rurho3d.github.io/urho3d_repo/Source/Urho3D/Core/StringHashRegister.h>
Public Member Functions | |
| StringHashRegister (bool threadSafe) | |
| Construct. threadSafe controls whether the RegisterString and GetStringCopy are thread-safe. | |
| ~StringHashRegister () | |
| Destruct. | |
| StringHash | RegisterString (const StringHash &hash, const char *string) |
| Register string for hash reverse mapping. Could be used from StringHash ctor. | |
| StringHash | RegisterString (const char *string) |
| Register string for hash reverse mapping. | |
| String | GetStringCopy (const StringHash &hash) const |
| Return string for given StringHash. Return empty string if not found. | |
| bool | Contains (const StringHash &hash) const |
| Return whether the string in contained in the register. | |
| const String & | GetString (const StringHash &hash) const |
| Return String for given StringHash. Return value is unsafe to use if RegisterString is called from other threads. | |
| const StringMap & | GetInternalMap () const |
| Return map of hashes. Return value is unsafe to use if RegisterString is called from other threads. | |
Private Attributes | |
| StringMap | map_ |
| Hash to string map. | |
| std::unique_ptr< Mutex > | mutex_ |
| Mutex. | |
Helper class used for StringHash reversing.