![]() |
XII Release 0.1.0
|
A class to use together with xiiHashedString for quick comparisons with temporary strings that need not be stored further. More...
#include <HashedString.h>
Public Member Functions | |
template<size_t N> | |
xiiTempHashedString (const char(&string)[N]) | |
Creates a xiiTempHashedString object from the given string constant. The hash can be computed at compile time. | |
template<size_t N> | |
xiiTempHashedString (char(&string)[N])=delete | |
xiiTempHashedString (xiiStringView sString) | |
Creates a xiiTempHashedString object from the given string. Computes the hash of the given string during runtime, which might be slow. | |
xiiTempHashedString (const xiiTempHashedString &rhs) | |
Copies the hash from rhs. | |
xiiTempHashedString (const xiiHashedString &rhs) | |
Copies the hash from the xiiHashedString. | |
xiiTempHashedString (xiiUInt32 uiHash)=delete | |
xiiTempHashedString (xiiUInt64 uiHash) | |
Copies the hash from the 64 bit integer. | |
template<size_t N> | |
void | operator= (const char(&string)[N]) |
The hash of the given string can be computed at compile time. | |
void | operator= (xiiStringView sString) |
Computes and stores the hash of the given string during runtime, which might be slow. | |
void | operator= (const xiiTempHashedString &rhs) |
Copies the hash from rhs. | |
void | operator= (const xiiHashedString &rhs) |
Copies the hash from the xiiHashedString. | |
bool | operator== (const xiiTempHashedString &rhs) const |
Compares the two objects by their hash value. Might report incorrect equality, if two strings have the same hash value. | |
bool | operator< (const xiiTempHashedString &rhs) const |
This operator allows soring objects by hash value, not by alphabetical order. | |
bool | IsEmpty () const |
Checks whether the xiiTempHashedString represents the empty string. | |
void | Clear () |
Resets the string to the empty string. | |
xiiUInt64 | GetHash () const |
Returns the hash of the stored string. | |
template<size_t N> | |
XII_ALWAYS_INLINE | xiiTempHashedString (const char(&string)[N]) |
template<size_t N> | |
XII_ALWAYS_INLINE void | operator= (const char(&string)[N]) |
Friends | |
class | xiiHashedString |
A class to use together with xiiHashedString for quick comparisons with temporary strings that need not be stored further.
Whenever you have objects that use xiiHashedString members and you need to compare against them with some temporary string, prefer to use xiiTempHashedString instead of xiiHashedString, as the latter requires thread synchronization to actually set up the object.