ALib C++ Library
Library Version: 2312 R0
Documentation generated by doxygen
Public Types | Inner Classes | Public Methods | List of all members
EnumIterator< TEnum, TEnableIf > Struct Template Reference

#include <iterable.hpp>

Class Description

template<typename TEnum, typename TEnableIf>
struct aworx::lib::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 220 of file iterable.hpp.

Public Types

using ConstIterator = TRandomAccessIterator< const TEnum *, const TEnum & >
 

Inner Classes

class  TRandomAccessIterator
 

Public Methods

 EnumIterator ()=default
 
ConstIterator begin () const
 
ConstIterator end () const
 

Member Typedef Documentation

◆ ConstIterator

using ConstIterator = TRandomAccessIterator<const TEnum*, const TEnum&>

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

Definition at line 455 of file iterable.hpp.

Constructor & Destructor Documentation

◆ EnumIterator()

EnumIterator ( )
default

Default constructor.

Member Function Documentation

◆ begin()

ConstIterator begin ( ) const
inline

Returns an iterator referring to the start of enumeration TEnum.

Returns
The start of the enumeration.

Definition at line 462 of file iterable.hpp.

Here is the call graph for this function:

◆ end()

ConstIterator end ( ) const
inline

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

Returns
The end of the enumeration.

Definition at line 474 of file iterable.hpp.

Here is the call graph for this function:

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