Berserk
|
Cached shared utf-8 string id. More...
#include <StringName.hpp>
Public Member Functions | |
BRK_API | StringName (const String &str=String()) |
StringName (const StringName &other) | |
StringName (StringName &&other) noexcept | |
BRK_API | ~StringName () |
BRK_API StringName & | operator= (const StringName &other) |
BRK_API StringName & | operator= (StringName &&other) noexcept |
BRK_API bool | operator== (const StringName &other) const |
BRK_API bool | operator!= (const StringName &other) const |
BRK_API const String & | GetStr () const |
BRK_API size_t | GetHash () const |
Cached shared utf-8 string id.
Immutable reference counted shared utf-8 encoded string object. Must be used for string named objects, handlers and ids.
This string object must be used in case, when you need lots of references to the single immutable string identifier.
Supports fast O(1)
string equality/inequality checks.
|
explicit |
Construct string id from utf-8 string
StringName::StringName | ( | const StringName & | other | ) |
Copy
|
noexcept |
Move
StringName::~StringName | ( | ) |
Safe release id. If it is last id reference, erase it from the cache.
size_t StringName::GetHash | ( | ) | const |
bool StringName::operator!= | ( | const StringName & | other | ) | const |
StringName & StringName::operator= | ( | const StringName & | other | ) |
Copy
|
noexcept |
Move
bool StringName::operator== | ( | const StringName & | other | ) | const |