sliceRange::indexer Class Reference

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

Inheritance diagram for sliceRange::indexer:

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 271 of file sliceRange.H.

Member Typedef Documentation

◆ value_type

typedef label value_type

Definition at line 286 of file sliceRange.H.

◆ difference_type

typedef label difference_type

Definition at line 287 of file sliceRange.H.

◆ pointer

typedef const label* pointer

Definition at line 288 of file sliceRange.H.

◆ reference

typedef label reference

Definition at line 289 of file sliceRange.H.

Constructor & Destructor Documentation

◆ indexer() [1/2]

constexpr indexer ( )
inlinenoexcept

Default construct with zero value and stride = 1.

Definition at line 46 of file sliceRangeI.H.

◆ indexer() [2/2]

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

Construct with specified value and stride.

Definition at line 54 of file sliceRangeI.H.

Member Function Documentation

◆ value() [1/2]

constexpr label value ( ) const
inlinenoexcept

The current value.

Definition at line 314 of file sliceRange.H.

◆ stride()

constexpr label stride ( ) const
inlinenoexcept

The stride.

Definition at line 319 of file sliceRange.H.

◆ value() [2/2]

constexpr label value ( const label  n) const
inlinenoexcept

Value with offset.

Definition at line 324 of file sliceRange.H.

References n.

◆ prev() [1/2]

void prev ( )
inlinenoexcept

Decrement value.

Definition at line 332 of file sliceRange.H.

◆ prev() [2/2]

void prev ( const label  n)
inlinenoexcept

Decrease value.

Definition at line 337 of file sliceRange.H.

References n.

◆ next() [1/2]

void next ( )
inlinenoexcept

Increment value.

Definition at line 342 of file sliceRange.H.

◆ next() [2/2]

void next ( const label  n)
inlinenoexcept

Increase value.

Definition at line 347 of file sliceRange.H.

References n.

◆ operator*()

constexpr label operator* ( ) const
inlinenoexcept

Return the value.

Definition at line 355 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 66 of file sliceRangeI.H.


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