ALib C++ Library
Library Version: 2412 R0
Documentation generated by doxygen
Loading...
Searching...
No Matches
EnumIterator< TEnum, TEnableIf > Struct Template Reference

Description:

template<typename TEnum, typename TEnableIf>
struct alib::enums::EnumIterator< TEnum, TEnableIf >

Implements a std::iterator_traits class for scoped and non-scoped enum types. The documentation is found with TMP struct T_EnumIsIterable, which needs to be specialized for template type TEnum. For other types, this class is not constructible.

Template Parameters
TEnumThe enum type to iterate over.
TEnableIfThis parameter has a default expressions and must not be provided with specializations of this struct. It is used internally to ensure that only if a specialization of T_EnumIsIterable<TEnum> exists, this class is available.

Definition at line 200 of file iterable.hpp.

#include <iterable.hpp>

Inner Type Index:

class  TRandomAccessIterator
 

Public Type Index:

using ConstIterator = TRandomAccessIterator<const TEnum*, const TEnum&>
 The constant iterator exposed by this class. A Mutable version is not available.
 

Public Method Index:

 EnumIterator ()=default
 Default constructor.
 
ConstIterator begin () const
 
ConstIterator end () const
 

Type Definition Details:

◆ ConstIterator

template<typename TEnum , typename TEnableIf >
using ConstIterator = TRandomAccessIterator<const TEnum*, const TEnum&>

The constant iterator exposed by this class. A Mutable version is not available.

Definition at line 432 of file iterable.hpp.

Method Details:

◆ begin()

template<typename TEnum , typename TEnableIf >
ConstIterator begin ( ) const
inline

Returns an iterator referring to the start of enumeration TEnum.

Returns
The start of the enumeration.

Definition at line 437 of file iterable.hpp.

Here is the call graph for this function:

◆ end()

template<typename TEnum , typename TEnableIf >
ConstIterator end ( ) const
inline

Returns an iterator referring the first illegal value of enumeration TEnum.

Returns
The end of the enumeration.

Definition at line 447 of file iterable.hpp.

Here is the call graph for this function:

The documentation for this struct was generated from the following file: