|
fsm
|
Zero overhead unique identifier. More...
#include <hashed_string.h>


Public Types | |
| using | value_type = typename base_type::value_type |
| Character type. | |
| using | size_type = typename base_type::size_type |
| Unsigned integer type. | |
| using | hash_type = typename base_type::hash_type |
| Unsigned integer type. | |
Public Member Functions | |
| constexpr | basic_hashed_string () noexcept |
| Constructs an empty hashed string. | |
| constexpr | basic_hashed_string (const value_type *str, const size_type len) noexcept |
| Constructs a hashed string from a string view. More... | |
| template<std::size_t N> | |
| constexpr | basic_hashed_string (const value_type(&str)[N]) noexcept |
| Constructs a hashed string from an array of const characters. More... | |
| constexpr | basic_hashed_string (const_wrapper wrapper) noexcept |
Explicit constructor on purpose to avoid constructing a hashed string directly from a const value_type *. More... | |
| constexpr size_type | size () const noexcept |
| Returns the size a hashed string. More... | |
| constexpr const value_type * | data () const noexcept |
| Returns the human-readable representation of a hashed string. More... | |
| constexpr hash_type | value () const noexcept |
| Returns the numeric representation of a hashed string. More... | |
| constexpr | operator const value_type * () const noexcept |
| Returns the human-readable representation of a hashed string. More... | |
| constexpr | operator hash_type () const noexcept |
| Returns the numeric representation of a hashed string. More... | |
Static Public Member Functions | |
| static constexpr hash_type | value (const value_type *str, const size_type len) noexcept |
| Returns directly the numeric representation of a string view. More... | |
| template<std::size_t N> | |
| static constexpr hash_type | value (const value_type(&str)[N]) noexcept |
| Returns directly the numeric representation of a string. More... | |
| static constexpr hash_type | value (const_wrapper wrapper) noexcept |
| Returns directly the numeric representation of a string. More... | |
Zero overhead unique identifier.
A hashed string is a compile-time tool that allows users to use human-readable identifiers in the codebase while using their numeric counterparts at runtime.
Because of that, a hashed string can also be used in constant expressions if required.
| Char | Character type. |
|
inlinenoexcept |
Constructs a hashed string from a string view.
| str | Human-readable identifier. |
| len | Length of the string to hash. |
|
inlinenoexcept |
Constructs a hashed string from an array of const characters.
| N | Number of characters of the identifier. |
| str | Human-readable identifier. |
|
inlineexplicitnoexcept |
Explicit constructor on purpose to avoid constructing a hashed string directly from a const value_type *.
| wrapper | Helps achieving the purpose by relying on overloading. |
|
inlinenoexcept |
Returns the human-readable representation of a hashed string.
|
inlinenoexcept |
Returns the human-readable representation of a hashed string.
|
inlinenoexcept |
Returns the numeric representation of a hashed string.
|
inlinenoexcept |
Returns the size a hashed string.
|
inlinestaticnoexcept |
Returns directly the numeric representation of a string view.
| str | Human-readable identifier. |
| len | Length of the string to hash. |
|
inlinestaticnoexcept |
Returns directly the numeric representation of a string.
| N | Number of characters of the identifier. |
| str | Human-readable identifier. |
|
inlinestaticnoexcept |
Returns directly the numeric representation of a string.
| wrapper | Helps achieving the purpose by relying on overloading. |
|
inlinenoexcept |
Returns the numeric representation of a hashed string.
1.8.13