ALib C++ Library
Library Version: 2402 R1
Documentation generated by doxygen
Loading...
Searching...
No Matches
EnumRecords< TEnum, TEnableIf >::ForwardIterator Struct Reference

Description:

template<typename TEnum, typename TEnableIf>
struct alib::enums::EnumRecords< TEnum, TEnableIf >::ForwardIterator

Implementation of std::iterator_traits for enum records. Begin- and end-iterators can be received with static methods EnumRecords::begin and EnumRecords::end . In ranged base for(:) loops, a local instance of type EnumRecords has to be created.

As the name of the class indicates, this iterator satisfies the C++ standard library concept ForwardIterator .

Definition at line 312 of file records.hpp.

#include <records.hpp>

Public Method Index:

TEnum Enum () const
 
TIntegral Integral () const
 
bool operator!= (ForwardIterator other) const
 
const TRecordoperator* () const
 
ForwardIteratoroperator++ ()
 
ForwardIterator operator++ (int)
 
TRecord const * operator-> () const
 
bool operator== (ForwardIterator other) const
 

Type Definition Details:

◆ difference_type

template<typename TEnum , typename TEnableIf >
using difference_type = integer
private

Implementation of std::iterator_traits.

Definition at line 334 of file records.hpp.

◆ iterator_category

template<typename TEnum , typename TEnableIf >
using iterator_category = std::forward_iterator_tag
private

Implementation of std::iterator_traits.

Definition at line 332 of file records.hpp.

◆ Node

template<typename TEnum , typename TEnableIf >
using Node = typename detail::EnumRecordHook<TEnum>::Node
private

Shortcut to the record hook's inner node type (linked list).

Definition at line 321 of file records.hpp.

◆ pointer

template<typename TEnum , typename TEnableIf >
using pointer = TRecord const*
private

Implementation of std::iterator_traits.

Definition at line 335 of file records.hpp.

◆ reference

template<typename TEnum , typename TEnableIf >
using reference = const TRecord&
private

Implementation of std::iterator_traits.

Definition at line 336 of file records.hpp.

◆ value_type

template<typename TEnum , typename TEnableIf >
using value_type = const TRecord&
private

Implementation of std::iterator_traits.

Definition at line 333 of file records.hpp.

Field Details:

◆ node

template<typename TEnum , typename TEnableIf >
Node* node
private

The current node this iterator refers to.

Definition at line 324 of file records.hpp.

Constructor(s) / Destructor Details::

◆ ForwardIterator()

template<typename TEnum , typename TEnableIf >
ForwardIterator ( Node * start)
inlineprivatenoexcept

Constructor.

Parameters
startPointer to the initial element.

Definition at line 328 of file records.hpp.

Method Details:

◆ Enum()

template<typename TEnum , typename TEnableIf >
TEnum Enum ( ) const
inline

Returns the enum element of the enum record that this iterator refers to.

Returns
The enum element the current record is associated to.

Definition at line 378 of file records.hpp.

◆ Integral()

template<typename TEnum , typename TEnableIf >
TIntegral Integral ( ) const
inline

Returns the underlying integral value of the enum element of the enum record that this iterator refers to.

Returns
The integral value of the enum element the current record is associated to.

Definition at line 387 of file records.hpp.

◆ operator!=()

template<typename TEnum , typename TEnableIf >
bool operator!= ( ForwardIterator other) const
inline

Comparison operator.

Parameters
otherThe iterator to compare ourselves to.
Returns
true if this and given iterator are not equal, false otherwise.

Definition at line 369 of file records.hpp.

◆ operator*()

template<typename TEnum , typename TEnableIf >
const TRecord & operator* ( ) const
inline

Returns a constant reference to the enum record this iterator refers to.

Returns
The current enum record.

Definition at line 394 of file records.hpp.

◆ operator++() [1/2]

template<typename TEnum , typename TEnableIf >
ForwardIterator & operator++ ( )
inline

Prefix increment operator.

Returns
A reference to this object.

Definition at line 344 of file records.hpp.

◆ operator++() [2/2]

template<typename TEnum , typename TEnableIf >
ForwardIterator operator++ ( int )
inline

Postfix increment operator.

Returns
An iterator value that is not increased, yet.

Definition at line 352 of file records.hpp.

Here is the call graph for this function:

◆ operator->()

template<typename TEnum , typename TEnableIf >
TRecord const * operator-> ( ) const
inline

Returns a constant pointer to the enum record this iterator refers to.

Returns
The current enum record.

Definition at line 401 of file records.hpp.

◆ operator==()

template<typename TEnum , typename TEnableIf >
bool operator== ( ForwardIterator other) const
inline

Comparison operator.

Parameters
otherThe iterator to compare ourselves to.
Returns
true if this and the given iterator are pointing to the same element, false otherwise.

Definition at line 361 of file records.hpp.


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