8#ifndef HPP_ALIB_ENUMS_DETAIL_ENUMRECORDS
9#define HPP_ALIB_ENUMS_DETAIL_ENUMRECORDS 1
11#if !defined(HPP_ALIB_ENUMS_RECORDS)
12# error "ALib sources with ending '.inl' must not be included from outside."
16namespace alib {
namespace enums {
56template<
typename TEnum>
64 using TIntegral=
typename std::underlying_type<TEnum>::type;
88 template <
typename... TArgs>
89 Node( TEnum element, TArgs&&... args) noexcept
91 ,
record ( std::forward<TArgs>(args)... )
110 while( (*last) !=
nullptr )
111 last= &(*last)->
next;
ALIB_API void setEnumRecord(const std::type_info &rtti, integer integral, const void *record)
ALIB_API const void * getEnumRecord(const std::type_info &rtti, integer integral)
constexpr std::underlying_type< TEnum >::type UnderlyingIntegral(TEnum element) noexcept
lang::integer integer
Type alias in namespace alib.
A node of the forward list that contains the custom record data.
Node * next
Pointer to the next node.
TIntegral integral
The enum element's underlying integral value.
Node(TEnum element, TArgs &&... args) noexcept
TRecord record
The data record.
Node() noexcept=default
Default constructor.
typename std::underlying_type< TEnum >::type TIntegral
The enum's underlying integer type.
Node * first
The hook to the first record defined.
typename T_EnumRecords< TEnum >::Type TRecord
The enum's associated record type.
Node ** getPointerToLast()