ALib C++ Library
Library Version: 2510 R0
Documentation generated by doxygen
Loading...
Searching...
No Matches
alib::enumrecords::EnumRecords< TEnum >::ForwardIterator Struct Reference

Description:

template<typename TEnum>
struct alib::enumrecords::EnumRecords< TEnum >::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 300 of file records.inl.

Public Method Index:

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

Private Type Index:

using difference_type = integer
 Implementation of std::iterator_traits.
 
using iterator_category = std::forward_iterator_tag
 Implementation of std::iterator_traits.
 
using Node = typename detail::EnumRecordHook<TEnum>::Node
 Shortcut to the record hook's inner node type (linked list).
 
using pointer = const TRecord*
 Implementation of std::iterator_traits.
 
using reference = const TRecord&
 Implementation of std::iterator_traits.
 
using value_type = const TRecord&
 Implementation of std::iterator_traits.
 

Private Field Index:

Nodenode
 The current node this iterator refers to.
 

Private Method Index:

 ForwardIterator (Node *start) noexcept
 

Type Definition Details:

◆ difference_type

template<typename TEnum>
using alib::enumrecords::EnumRecords< TEnum >::ForwardIterator::difference_type = integer
private

Implementation of std::iterator_traits.

Definition at line 322 of file records.inl.

◆ iterator_category

template<typename TEnum>
using alib::enumrecords::EnumRecords< TEnum >::ForwardIterator::iterator_category = std::forward_iterator_tag
private

Implementation of std::iterator_traits.

Definition at line 320 of file records.inl.

◆ Node

template<typename TEnum>
using alib::enumrecords::EnumRecords< TEnum >::ForwardIterator::Node = typename detail::EnumRecordHook<TEnum>::Node
private

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

Definition at line 309 of file records.inl.

◆ pointer

template<typename TEnum>
using alib::enumrecords::EnumRecords< TEnum >::ForwardIterator::pointer = const TRecord*
private

Implementation of std::iterator_traits.

Definition at line 323 of file records.inl.

◆ reference

template<typename TEnum>
using alib::enumrecords::EnumRecords< TEnum >::ForwardIterator::reference = const TRecord&
private

Implementation of std::iterator_traits.

Definition at line 324 of file records.inl.

◆ value_type

template<typename TEnum>
using alib::enumrecords::EnumRecords< TEnum >::ForwardIterator::value_type = const TRecord&
private

Implementation of std::iterator_traits.

Definition at line 321 of file records.inl.

Field Details:

◆ node

template<typename TEnum>
Node* alib::enumrecords::EnumRecords< TEnum >::ForwardIterator::node
private

The current node this iterator refers to.

Definition at line 312 of file records.inl.

Constructor(s) / Destructor Details:

◆ ForwardIterator()

template<typename TEnum>
alib::enumrecords::EnumRecords< TEnum >::ForwardIterator::ForwardIterator ( Node * start)
inlineprivatenoexcept

Constructor.

Parameters
startPointer to the initial element.

Definition at line 316 of file records.inl.

Method Details:

◆ Enum()

template<typename TEnum>
TEnum alib::enumrecords::EnumRecords< TEnum >::ForwardIterator::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 366 of file records.inl.

◆ Integral()

template<typename TEnum>
TIntegral alib::enumrecords::EnumRecords< TEnum >::ForwardIterator::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 375 of file records.inl.

◆ operator!=()

template<typename TEnum>
bool alib::enumrecords::EnumRecords< TEnum >::ForwardIterator::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 357 of file records.inl.

Here is the call graph for this function:

◆ operator*()

template<typename TEnum>
const TRecord & alib::enumrecords::EnumRecords< TEnum >::ForwardIterator::operator* ( ) const
inline

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

Returns
The current enum record.

Definition at line 382 of file records.inl.

◆ operator++() [1/2]

template<typename TEnum>
ForwardIterator & alib::enumrecords::EnumRecords< TEnum >::ForwardIterator::operator++ ( )
inline

Prefix increment operator.

Returns
A reference to this object.

Definition at line 332 of file records.inl.

Here is the call graph for this function:

◆ operator++() [2/2]

template<typename TEnum>
ForwardIterator alib::enumrecords::EnumRecords< TEnum >::ForwardIterator::operator++ ( int )
inline

Postfix increment operator.

Returns
An iterator value that is not increased, yet.

Definition at line 340 of file records.inl.

Here is the call graph for this function:

◆ operator->()

template<typename TEnum>
const TRecord * alib::enumrecords::EnumRecords< TEnum >::ForwardIterator::operator-> ( ) const
inline

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

Returns
The current enum record.

Definition at line 389 of file records.inl.

◆ operator==()

template<typename TEnum>
bool alib::enumrecords::EnumRecords< TEnum >::ForwardIterator::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 349 of file records.inl.

Here is the call graph for this function:

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