![]() |
Gaia-ECS v1.0.0
A simple and powerful entity component system
|
Fixed-limit string lookup key carrying a precomputed 32-bit hash. More...
#include <hashing_string.h>
Public Types | |
| using | LookupHash = core::direct_hash_key< uint32_t > |
| Direct hash wrapper used by lookup containers. | |
Public Member Functions | |
| StringLookupKey () | |
| Constructs an empty lookup key. | |
| StringLookupKey (const char *pStr, uint32_t len, uint32_t owned) | |
| Constructor calculating hash from the provided string pStr and len. | |
| StringLookupKey (const char *pStr, uint32_t len, uint32_t owned, LookupHash hash) | |
| Constructor just for setting values. | |
| const char * | str () const |
| Returns the referenced string. | |
| uint32_t | len () const |
| Returns the string length. | |
| bool | owned () const |
| Reports whether Gaia-ECS manages the string lifetime. | |
| uint32_t | hash () const |
| Returns the precomputed string hash. | |
| bool | operator== (const StringLookupKey &other) const |
| Compares keys by hash, length, and string contents. | |
| bool | operator!= (const StringLookupKey &other) const |
| Compares keys for inequality. | |
Static Public Attributes | |
| static constexpr bool | IsDirectHashKey = true |
| Marker indicating that this key provides its hash directly. | |
Fixed-limit string lookup key carrying a precomputed 32-bit hash.
| MaxLen | Maximum supported string length used by bounded comparisons. |
|
inlineexplicit |
Constructor calculating hash from the provided string pStr and len.
| pStr | Pointer to the string |
| len | Number of characters |
| owned | True if the string is owned |
|
inlineexplicit |
Constructor just for setting values.
| pStr | Pointer to the string |
| len | Number of characters |
| owned | True if the string is owned |
| hash | String hash |
|
inline |
Returns the precomputed string hash.
|
inline |
Returns the string length.
|
inline |
Compares keys for inequality.
| other | Key to compare with. |
|
inline |
Compares keys by hash, length, and string contents.
| other | Key to compare with. |
|
inline |
Reports whether Gaia-ECS manages the string lifetime.
|
inline |
Returns the referenced string.