Lumiera  0.pre.03
»edit your freedom«
LinkedElements< N, ALO >::IterationState Struct Reference

Description

template<class N, class ALO = linked_elements::OwningHeapAllocated<N>>
struct lib::LinkedElements< N, ALO >::IterationState

Iteration is just following the single linked list.

We encapsulate this simple pointer into a dedicated marker type to ease the handling and mixing of iterators and const iterators. (Explanation: IterationState depends on our type parameters...)

Definition at line 354 of file linked-elements.hpp.

Public Member Functions

 IterationState (N *p=nullptr)
 
bool checkPoint () const
 Iteration-logic: detect iteration end. More...
 
void iterNext ()
 Iteration-logic: switch to next position. More...
 
N & yield () const
 

Public Attributes

N * node
 

Friends

bool operator== (IterationState const &il, IterationState const &ir)
 

Member Function Documentation

◆ iterNext()

void iterNext ( )
inline

Iteration-logic: switch to next position.

Warning
assuming the given node pointer belongs to this collection. actually this is never checked; also the given node might have been deallocated in the meantime.

Definition at line 370 of file linked-elements.hpp.

◆ checkPoint()

bool checkPoint ( ) const
inline

Iteration-logic: detect iteration end.

Definition at line 377 of file linked-elements.hpp.

+ Collaboration diagram for LinkedElements< N, ALO >::IterationState:

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