8#ifndef MALENA_ENUMKEY_H
9#define MALENA_ENUMKEY_H
66 template<
typename EnumType>
67 static std::string
get(EnumType value)
69 static_assert(std::is_enum_v<EnumType>,
70 "[Malena] EnumKey::get — template parameter must be an enum type.");
72 return std::string(
typeid(EnumType).name())
74 + std::to_string(
static_cast<int>(value));
86 template<
typename EnumType>
89 static_assert(std::is_enum_v<EnumType>,
90 "[Malena] EnumKey::typeKey — template parameter must be an enum type.");
92 return std::string(
typeid(EnumType).name());
Utility for generating unique, stable string keys from enum values.
static std::string typeKey()
Generate a unique string key for an enum type alone.
static std::string get(EnumType value)
Generate a unique string key for an enum value.