sliceRange::indexer Class Reference

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

Inheritance diagram for sliceRange::indexer:
[legend]

Public Types

typedef label value_type
 
typedef label difference_type
 
typedef const label * pointer
 
typedef label reference
 

Public Member Functions

constexpr indexer () noexcept
 Default construct with zero value and stride = 1. More...
 
constexpr indexer (const label val, const label stride) noexcept
 Construct with specified value and stride. More...
 
constexpr label value () const noexcept
 The current value. More...
 
constexpr label stride () const noexcept
 The stride. More...
 
constexpr label value (const label n) const noexcept
 Value with offset. More...
 
void prev () noexcept
 Decrement value. More...
 
void prev (const label n) noexcept
 Decrease value. More...
 
void next () noexcept
 Increment value. More...
 
void next (const label n) noexcept
 Increase value. More...
 
constexpr label operator* () const noexcept
 Return the value. More...
 
label operator() () noexcept
 Apply a postfix increment and return the current value. More...
 

Detailed Description

A value indexer, for iteration or generation.

Definition at line 208 of file sliceRange.H.

Member Typedef Documentation

◆ value_type

typedef label value_type

Definition at line 219 of file sliceRange.H.

◆ difference_type

typedef label difference_type

Definition at line 220 of file sliceRange.H.

◆ pointer

typedef const label* pointer

Definition at line 221 of file sliceRange.H.

◆ reference

typedef label reference

Definition at line 222 of file sliceRange.H.

Constructor & Destructor Documentation

◆ indexer() [1/2]

constexpr indexer ( )
inlineconstexprnoexcept

Default construct with zero value and stride = 1.

Definition at line 55 of file sliceRangeI.H.

◆ indexer() [2/2]

constexpr indexer ( const label  val,
const label  stride 
)
inlineconstexprnoexcept

Construct with specified value and stride.

Definition at line 62 of file sliceRangeI.H.

Member Function Documentation

◆ value() [1/2]

constexpr label value ( ) const
inlineconstexprnoexcept

The current value.

Definition at line 241 of file sliceRange.H.

◆ stride()

constexpr label stride ( ) const
inlineconstexprnoexcept

The stride.

Definition at line 244 of file sliceRange.H.

◆ value() [2/2]

constexpr label value ( const label  n) const
inlineconstexprnoexcept

Value with offset.

Definition at line 247 of file sliceRange.H.

References n.

◆ prev() [1/2]

void prev ( )
inlinenoexcept

Decrement value.

Definition at line 253 of file sliceRange.H.

◆ prev() [2/2]

void prev ( const label  n)
inlinenoexcept

Decrease value.

Definition at line 256 of file sliceRange.H.

References n.

◆ next() [1/2]

void next ( )
inlinenoexcept

Increment value.

Definition at line 259 of file sliceRange.H.

◆ next() [2/2]

void next ( const label  n)
inlinenoexcept

Increase value.

Definition at line 262 of file sliceRange.H.

References n.

◆ operator*()

constexpr label operator* ( ) const
inlineconstexprnoexcept

Return the value.

Definition at line 268 of file sliceRange.H.

◆ operator()()

Foam::label operator() ( )
inlinenoexcept

Apply a postfix increment and return the current value.

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

Definition at line 74 of file sliceRangeI.H.


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