Loading...
Searching...
No Matches
IndexIterator< IntType > Class Template Reference

A random-access, integer-like, input iterator for integral values. More...

#include <IndexIterator.H>

Public Types

typedef std::random_access_iterator_tag iterator_category
typedef IntType value_type
typedef IntType difference_type
typedef const IntType * pointer
typedef IntType reference

Public Member Functions

constexpr IndexIterator () noexcept
 Default construct as zero.
constexpr IndexIterator (value_type val) noexcept
 Construct with specified value.
constexpr value_type operator* () const noexcept
 Return the value.
constexpr value_type operator[] (value_type n) const noexcept
 Offset dereference operator.
IndexIteratoroperator++ () noexcept
 Prefix increment.
IndexIterator operator++ (int) noexcept
 Postfix increment.
IndexIteratoroperator-- () noexcept
 Prefix decrement.
IndexIterator operator-- (int) noexcept
 Postfix decrement.
IndexIteratoroperator+= (value_type n) noexcept
 Arbitrary increment.
IndexIteratoroperator-= (value_type n) noexcept
 Arbitrary decrement.
constexpr IndexIterator operator+ (value_type n) const noexcept
 Return iterator with offset.
IndexIterator operator- (value_type n) const noexcept
 Return iterator with offset.
constexpr value_type operator- (const IndexIterator &iter) const noexcept
 Difference operator.
constexpr bool operator== (const IndexIterator &iter) const noexcept
 Test for equality of values.
constexpr bool operator< (const IndexIterator &iter) const noexcept
 Compare less-than.
constexpr bool operator!= (const IndexIterator &iter) const noexcept
constexpr bool operator<= (const IndexIterator &iter) const noexcept
constexpr bool operator> (const IndexIterator &iter) const noexcept
constexpr bool operator>= (const IndexIterator &iter) const noexcept

Detailed Description

template<class IntType>
class Foam::IndexIterator< IntType >

A random-access, integer-like, input iterator for integral values.

Note
No operator+(value_type, iterator) is defined since this provokes misleading resolution errors

Definition at line 58 of file IndexIterator.H.

Member Typedef Documentation

◆ iterator_category

template<class IntType>
typedef std::random_access_iterator_tag iterator_category

Definition at line 72 of file IndexIterator.H.

◆ value_type

template<class IntType>
typedef IntType value_type

Definition at line 73 of file IndexIterator.H.

◆ difference_type

template<class IntType>
typedef IntType difference_type

Definition at line 74 of file IndexIterator.H.

◆ pointer

template<class IntType>
typedef const IntType* pointer

Definition at line 75 of file IndexIterator.H.

◆ reference

template<class IntType>
typedef IntType reference

Definition at line 76 of file IndexIterator.H.

Constructor & Destructor Documentation

◆ IndexIterator() [1/2]

template<class IntType>
IndexIterator ( )
inlineconstexprnoexcept

Default construct as zero.

Definition at line 84 of file IndexIterator.H.

References Foam::noexcept.

Referenced by operator!=(), operator++(), operator++(), operator+=(), operator-(), operator--(), operator--(), operator-=(), operator<(), operator<=(), operator==(), operator>(), and operator>=().

Here is the caller graph for this function:

◆ IndexIterator() [2/2]

template<class IntType>
IndexIterator ( value_type val)
inlineconstexprnoexcept

Construct with specified value.

Definition at line 89 of file IndexIterator.H.

References Foam::noexcept.

Member Function Documentation

◆ operator*()

template<class IntType>
value_type operator* ( ) const
inlineconstexprnoexcept

Return the value.

Definition at line 97 of file IndexIterator.H.

References Foam::noexcept.

◆ operator[]()

template<class IntType>
value_type operator[] ( value_type n) const
inlineconstexprnoexcept

Offset dereference operator.

Definition at line 102 of file IndexIterator.H.

References n.

◆ operator++() [1/2]

template<class IntType>
IndexIterator & operator++ ( )
inlinenoexcept

Prefix increment.

Definition at line 110 of file IndexIterator.H.

References IndexIterator(), and Foam::noexcept.

Here is the call graph for this function:

◆ operator++() [2/2]

template<class IntType>
IndexIterator operator++ ( int )
inlinenoexcept

Postfix increment.

Definition at line 119 of file IndexIterator.H.

References IndexIterator().

Here is the call graph for this function:

◆ operator--() [1/2]

template<class IntType>
IndexIterator & operator-- ( )
inlinenoexcept

Prefix decrement.

Definition at line 129 of file IndexIterator.H.

References IndexIterator(), and Foam::noexcept.

Here is the call graph for this function:

◆ operator--() [2/2]

template<class IntType>
IndexIterator operator-- ( int )
inlinenoexcept

Postfix decrement.

Definition at line 138 of file IndexIterator.H.

References IndexIterator().

Here is the call graph for this function:

◆ operator+=()

template<class IntType>
IndexIterator & operator+= ( value_type n)
inlinenoexcept

Arbitrary increment.

Definition at line 148 of file IndexIterator.H.

References IndexIterator(), and n.

Here is the call graph for this function:

◆ operator-=()

template<class IntType>
IndexIterator & operator-= ( value_type n)
inlinenoexcept

Arbitrary decrement.

Definition at line 157 of file IndexIterator.H.

References IndexIterator(), and n.

Here is the call graph for this function:

◆ operator+()

template<class IntType>
IndexIterator operator+ ( value_type n) const
inlineconstexprnoexcept

Return iterator with offset.

Definition at line 167 of file IndexIterator.H.

References n.

◆ operator-() [1/2]

template<class IntType>
IndexIterator operator- ( value_type n) const
inlinenoexcept

Return iterator with offset.

Definition at line 173 of file IndexIterator.H.

References n.

◆ operator-() [2/2]

template<class IntType>
value_type operator- ( const IndexIterator< IntType > & iter) const
inlineconstexprnoexcept

Difference operator.

Definition at line 179 of file IndexIterator.H.

References IndexIterator().

Here is the call graph for this function:

◆ operator==()

template<class IntType>
bool operator== ( const IndexIterator< IntType > & iter) const
inlineconstexprnoexcept

Test for equality of values.

Definition at line 191 of file IndexIterator.H.

References IndexIterator().

Here is the call graph for this function:

◆ operator<()

template<class IntType>
bool operator< ( const IndexIterator< IntType > & iter) const
inlineconstexprnoexcept

Compare less-than.

Definition at line 199 of file IndexIterator.H.

References IndexIterator().

Here is the call graph for this function:

◆ operator!=()

template<class IntType>
bool operator!= ( const IndexIterator< IntType > & iter) const
inlineconstexprnoexcept

Definition at line 209 of file IndexIterator.H.

References IndexIterator().

Here is the call graph for this function:

◆ operator<=()

template<class IntType>
bool operator<= ( const IndexIterator< IntType > & iter) const
inlineconstexprnoexcept

Definition at line 214 of file IndexIterator.H.

References IndexIterator().

Here is the call graph for this function:

◆ operator>()

template<class IntType>
bool operator> ( const IndexIterator< IntType > & iter) const
inlineconstexprnoexcept

Definition at line 221 of file IndexIterator.H.

References IndexIterator().

Here is the call graph for this function:

◆ operator>=()

template<class IntType>
bool operator>= ( const IndexIterator< IntType > & iter) const
inlineconstexprnoexcept

Definition at line 227 of file IndexIterator.H.

References IndexIterator().

Here is the call graph for this function:

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