sliceRange::indexer Class Reference

A value indexer, for iteration or generation. More...

Inheritance diagram for sliceRange::indexer:
[legend]

Public Member Functions

 indexer (const sliceRange *range, const label i=0)
 Construct from range at given local index. More...
 
void next () noexcept
 Forward increment, no checking. More...
 
void next (const label n) noexcept
 Forward increment, no checking. More...
 
bool equals (const indexer &other) const noexcept
 Test for equality of values, not stride. More...
 
label operator* () const noexcept
 Return the value. More...
 
label operator() ()
 Apply a postfix increment and return the current value. More...
 

Detailed Description

A value indexer, for iteration or generation.

Definition at line 169 of file sliceRange.H.

Constructor & Destructor Documentation

◆ indexer()

indexer ( const sliceRange range,
const label  i = 0 
)
inline

Construct from range at given local index.

An out-of-range index (eg, negative) creates an 'end' iterator

Definition at line 56 of file sliceRangeI.H.

Member Function Documentation

◆ next() [1/2]

void next ( )
inlinenoexcept

Forward increment, no checking.

Definition at line 70 of file sliceRangeI.H.

◆ next() [2/2]

void next ( const label  n)
inlinenoexcept

Forward increment, no checking.

Definition at line 76 of file sliceRangeI.H.

References n.

◆ equals()

bool equals ( const indexer other) const
inlinenoexcept

Test for equality of values, not stride.

Definition at line 83 of file sliceRangeI.H.

◆ operator*()

Foam::label operator* ( ) const
inlinenoexcept

Return the value.

Definition at line 91 of file sliceRangeI.H.

◆ operator()()

Foam::label operator() ( )
inline

Apply a postfix increment and return the current value.

This operator definition is required for a generator - see std::generate()

Definition at line 97 of file sliceRangeI.H.


The documentation for this class was generated from the following files: