class THashedString

template<typename CharType, typename HashType = u64>

References a compile time string and calculates its hash at compile time.

Public

Constructors

THashedString<CharType, HashType>

constexpr THashedString<CharType, HashType>() noexcept

THashedString<CharType, HashType>

constexpr THashedString<CharType, HashType>(const CharType *string, u64 length)

THashedString<CharType, HashType>

constexpr explicit THashedString<CharType, HashType>(ConstWrapper wrapper) noexcept

Methods

GetLength

constexpr u64 GetLength() const

Returns the length of the string.

GetCharacters

constexpr const CharType *GetCharacters() const

Returns the characters of the compile time string.

GetHash

constexpr HashType GetHash() const

Returns the calculated hash.

staticCalculateHash

static constexpr HashType CalculateHash(std::basic_string_view<CharType> view)

Calculates compile time hash of a compile time string.

staticCalculateHash

static constexpr HashType CalculateHash(const CharType *string, const u64 length)

Calculates compile time hash of a compile time string.

Operators

operator const type-parameter-0-0 *

constexpr operator const CharType *() const

operator type-parameter-0-1

constexpr operator HashType() const

Private

Fields

mCharacters

const CharType * mCharacters

mLength

u64 mLength

mHash

HashType mHash