Loading...
Searching...
No Matches
Vdf_CountingIterator< T > Class Template Reference

Random access counting iterator that simply operates on an underlying integer index. More...

#include <countingIterator.h>

Public Types

using iterator_category = std::random_access_iterator_tag
 
using value_type = const T
 
using reference = const T
 
using pointer = const T *
 
using difference_type = std::make_signed_t< value_type >
 

Public Member Functions

 Vdf_CountingIterator (T i)
 
reference operator* () const
 
pointer operator-> () const
 
value_type operator[] (const difference_type n) const
 
Vdf_CountingIteratoroperator++ ()
 
Vdf_CountingIterator operator++ (int)
 
Vdf_CountingIterator operator+ (const difference_type n) const
 
Vdf_CountingIteratoroperator+= (const difference_type n)
 
Vdf_CountingIteratoroperator-- ()
 
Vdf_CountingIterator operator-- (int)
 
Vdf_CountingIterator operator- (const difference_type n) const
 
Vdf_CountingIteratoroperator-= (const difference_type n)
 
difference_type operator- (const Vdf_CountingIterator &rhs) const
 
bool operator== (const Vdf_CountingIterator &rhs) const
 
bool operator!= (const Vdf_CountingIterator &rhs) const
 
bool operator< (const Vdf_CountingIterator &rhs) const
 
bool operator<= (const Vdf_CountingIterator &rhs) const
 
bool operator> (const Vdf_CountingIterator &rhs) const
 
bool operator>= (const Vdf_CountingIterator &rhs) const
 

Detailed Description

template<typename T>
class Vdf_CountingIterator< T >

Random access counting iterator that simply operates on an underlying integer index.

Definition at line 21 of file countingIterator.h.

Member Typedef Documentation

◆ difference_type

using difference_type = std::make_signed_t<value_type>

Definition at line 27 of file countingIterator.h.

◆ iterator_category

using iterator_category = std::random_access_iterator_tag

Definition at line 23 of file countingIterator.h.

◆ pointer

using pointer = const T *

Definition at line 26 of file countingIterator.h.

◆ reference

using reference = const T

Definition at line 25 of file countingIterator.h.

◆ value_type

using value_type = const T

Definition at line 24 of file countingIterator.h.

Constructor & Destructor Documentation

◆ Vdf_CountingIterator() [1/2]

Definition at line 29 of file countingIterator.h.

◆ Vdf_CountingIterator() [2/2]

Vdf_CountingIterator ( i)
inlineexplicit

Definition at line 30 of file countingIterator.h.

Member Function Documentation

◆ operator!=()

bool operator!= ( const Vdf_CountingIterator< T > &  rhs) const
inline

Definition at line 90 of file countingIterator.h.

◆ operator*()

reference operator* ( ) const
inline

Definition at line 32 of file countingIterator.h.

◆ operator+()

Vdf_CountingIterator operator+ ( const difference_type  n) const
inline

Definition at line 49 of file countingIterator.h.

◆ operator++() [1/2]

Vdf_CountingIterator & operator++ ( )
inline

Definition at line 38 of file countingIterator.h.

◆ operator++() [2/2]

Vdf_CountingIterator operator++ ( int  )
inline

Definition at line 43 of file countingIterator.h.

◆ operator+=()

Vdf_CountingIterator & operator+= ( const difference_type  n)
inline

Definition at line 55 of file countingIterator.h.

◆ operator-() [1/2]

Vdf_CountingIterator operator- ( const difference_type  n) const
inline

Definition at line 71 of file countingIterator.h.

◆ operator-() [2/2]

difference_type operator- ( const Vdf_CountingIterator< T > &  rhs) const
inline

Definition at line 82 of file countingIterator.h.

◆ operator--() [1/2]

Vdf_CountingIterator & operator-- ( )
inline

Definition at line 60 of file countingIterator.h.

◆ operator--() [2/2]

Vdf_CountingIterator operator-- ( int  )
inline

Definition at line 65 of file countingIterator.h.

◆ operator-=()

Vdf_CountingIterator & operator-= ( const difference_type  n)
inline

Definition at line 77 of file countingIterator.h.

◆ operator->()

pointer operator-> ( ) const
inline

Definition at line 33 of file countingIterator.h.

◆ operator<()

bool operator< ( const Vdf_CountingIterator< T > &  rhs) const
inline

Definition at line 94 of file countingIterator.h.

◆ operator<=()

bool operator<= ( const Vdf_CountingIterator< T > &  rhs) const
inline

Definition at line 98 of file countingIterator.h.

◆ operator==()

bool operator== ( const Vdf_CountingIterator< T > &  rhs) const
inline

Definition at line 86 of file countingIterator.h.

◆ operator>()

bool operator> ( const Vdf_CountingIterator< T > &  rhs) const
inline

Definition at line 102 of file countingIterator.h.

◆ operator>=()

bool operator>= ( const Vdf_CountingIterator< T > &  rhs) const
inline

Definition at line 106 of file countingIterator.h.

◆ operator[]()

value_type operator[] ( const difference_type  n) const
inline

Definition at line 34 of file countingIterator.h.


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