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

Description

template<class N, class ALO = linked_elements::OwningHeapAllocated>
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 425 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 441 of file linked-elements.hpp.

◆ checkPoint()

bool checkPoint ( ) const
inline

Iteration-logic: detect iteration end.

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

References lib::operator==().

+ Here is the call graph for this function:
+ Collaboration diagram for LinkedElements< N, ALO >::IterationState:

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