Loading...
Searching...
No Matches
meshkit::plan::ReadArray< T >::Iterator Struct Reference

Minimal iterator for range-based for loops: supports only *, prefix ++ and !=, and yields elements by value through operator[]. More...

#include <meshkit/detail/planmodel.hpp>

Collaboration diagram for meshkit::plan::ReadArray< T >::Iterator:

Public Member Functions

T operator* () const
 Current element, by value.
 
Iterator & operator++ ()
 Advance to the next index.
 
bool operator!= (const Iterator &b) const
 Compare positions only.
 

Public Attributes

const ReadArray * array
 Array being iterated; not owned.
 
std::size_t i
 Current element index.
 

Detailed Description

template<class T>
struct meshkit::plan::ReadArray< T >::Iterator

Minimal iterator for range-based for loops: supports only *, prefix ++ and !=, and yields elements by value through operator[].

Member Function Documentation

◆ operator!=()

template<class T>
bool meshkit::plan::ReadArray< T >::Iterator::operator!= ( const Iterator & b) const
inline

Compare positions only.

Parameters
[in]bIterator to compare with.
Returns
True when the indices differ; the arrays are not compared.

◆ operator*()

template<class T>
T meshkit::plan::ReadArray< T >::Iterator::operator* ( ) const
inline

Current element, by value.

◆ operator++()

template<class T>
Iterator & meshkit::plan::ReadArray< T >::Iterator::operator++ ( )
inline

Advance to the next index.

Returns
This iterator.

Member Data Documentation

◆ array

template<class T>
const ReadArray* meshkit::plan::ReadArray< T >::Iterator::array

Array being iterated; not owned.

◆ i

template<class T>
std::size_t meshkit::plan::ReadArray< T >::Iterator::i

Current element index.


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