This is a pure static interface type usable with enumeration types that dispose of a specialization of the type trait RecordsTraits.
The type has two main purposes:
A third purpose, namely to retrieve the default (single) enumeration record for a specific enum element is not provided by this type, but instead offered with likewise templated namespace functions
The rationale for the above is twofold: It reduces header-file dependencies from the majority of code that just use enum records and not defne them. Secondly, it stresses the fact that the variouos Bootstrap methods must be used only while bootstrapping is done.
TEnum | The enumeration type that the static methods of this type are to use. |
Definition at line 270 of file records.inl.
Inner Type Index: | |
struct | ForwardIterator |
Public Type Index: | |
using | TIntegral = typename std::underlying_type<TEnum>::type |
The enum's underlying integer type. | |
using | TRecord = typename RecordsTraits<TEnum>::Type |
The enum's associated record type. | |
Public Static Method Index: | |
template<typename TRecord, typename TAssociated = typename RecordsTraits<TEnum>::Type> | |
static constexpr bool | AreOfType () |
static ForwardIterator | begin () |
static constexpr ForwardIterator | end () |
Public Method Index: | |
EnumRecords () noexcept=default | |
Defaulted constructor. | |
using alib::enumrecords::EnumRecords< TEnum >::TIntegral = typename std::underlying_type<TEnum>::type |
The enum's underlying integer type.
Definition at line 279 of file records.inl.
using alib::enumrecords::EnumRecords< TEnum >::TRecord = typename RecordsTraits<TEnum>::Type |
The enum's associated record type.
Definition at line 282 of file records.inl.
|
inlinestaticconstexpr |
Tests if TEnum has an associated record type that either is or is derived from type TRecord.
TRecord | The enum record base type required. |
TAssociated | Deduced by the compiler. Must not be specified. |
true
if the given record type is the same or a base class of the record type associated with the given enum. Otherwise, returns false
. Definition at line 291 of file records.inl.
|
inlinestatic |
Returns an iterator referring to the first enum record defined for type TEnum.
for(:)
loops.Definition at line 409 of file records.inl.
|
inlinestaticconstexpr |
Returns an iterator referring to the first element behind the list.
Definition at line 419 of file records.inl.