Gaia-ECS v0.9.3
A simple and powerful entity component system
Loading...
Searching...
No Matches
gaia::core::StringLookupKey< MaxLen > Struct Template Reference

Public Types

using LookupHash = core::direct_hash_key< uint32_t >
 

Public Member Functions

 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
 
uint32_t len () const
 
bool owned () const
 
uint32_t hash () const
 
bool operator== (const StringLookupKey &other) const
 
bool operator!= (const StringLookupKey &other) const
 

Static Public Attributes

static constexpr bool IsDirectHashKey = true
 

Constructor & Destructor Documentation

◆ StringLookupKey() [1/2]

template<uint32_t MaxLen>
gaia::core::StringLookupKey< MaxLen >::StringLookupKey ( const char *  pStr,
uint32_t  len,
uint32_t  owned 
)
inlineexplicit

Constructor calculating hash from the provided string pStr and len.

Parameters
pStrPointer to the string
lenNumber of characters
ownedTrue if the string is owned
Warning
String has to be null-terminated and up to MaxLen characters long. Undefined behavior otherwise.

◆ StringLookupKey() [2/2]

template<uint32_t MaxLen>
gaia::core::StringLookupKey< MaxLen >::StringLookupKey ( const char *  pStr,
uint32_t  len,
uint32_t  owned,
LookupHash  hash 
)
inlineexplicit

Constructor just for setting values.

Parameters
pStrPointer to the string
lenNumber of characters
ownedTrue if the string is owned
hashString hash

The documentation for this struct was generated from the following file: