template<typename ENUM_TYPE>
struct Stroika::Foundation::Common::DefaultNames< ENUM_TYPE >
Use DefaultNames<> to register the EnumNames<> mapping in a common place that can be used by other templates to automatically lookup enum names.
- Example Usage
enum class Priority {
a, b, c
};
template<>
{Priority::a, L"Debug"},
{Priority::b, L"Info"},
{Priority::eNotice, L"Notice"},
}}};
}
const wchar_t* aStr = DefaultNames<Priority>{}.PeekName (Priority::a);
Priority p = DefaultNames<Priority>{}.GetValue (L
"invalid", Execution::Exception<> (L
"OutOfRange"));
#define Stroika_Define_Enum_Bounds(FIRST_ITEM, LAST_ITEM)
Definition at line 288 of file Enumeration.h.