libtgd 4.3
A library that makes working with multidimensional arrays in C++ easy
TGD::Array< T >::ElementIterator Class Reference

Iterator over all elements in the array. When dereferenced, this returns a pointer to the components of an element. This is a random access iterator. More...

#include <array.hpp>

Public Types

using iterator_category = std::random_access_iterator_tag
 
using value_type = T
 
using pointer = T*
 
using reference = T&
 
using difference_type = std::ptrdiff_t
 

Public Member Functions

 ElementIterator ()
 
 ElementIterator (T *rhs, size_t componentCount=1)
 
 ElementIterator (const ElementIterator &rhs)
 
ElementIteratoroperator+= (difference_type rhs)
 
ElementIteratoroperator-= (difference_type rhs)
 
T * operator* () const
 
T * operator-> () const
 
T * operator[] (difference_type rhs) const
 
ElementIteratoroperator++ ()
 
ElementIteratoroperator-- ()
 
ElementIterator operator++ (int)
 
ElementIterator operator-- (int)
 
difference_type operator- (const ElementIterator &rhs) const
 
ElementIterator operator+ (difference_type rhs) const
 
ElementIterator operator- (difference_type rhs) const
 
bool operator== (const ElementIterator &rhs) const
 
bool operator!= (const ElementIterator &rhs) const
 
bool operator> (const ElementIterator &rhs) const
 
bool operator< (const ElementIterator &rhs) const
 
bool operator>= (const ElementIterator &rhs) const
 
bool operator<= (const ElementIterator &rhs) const
 

Friends

ElementIterator operator+ (difference_type lhs, const ElementIterator &rhs)
 
ElementIterator operator- (difference_type lhs, const ElementIterator &rhs)
 

Detailed Description

template<typename T>
class TGD::Array< T >::ElementIterator

Iterator over all elements in the array. When dereferenced, this returns a pointer to the components of an element. This is a random access iterator.

Member Typedef Documentation

◆ difference_type

template<typename T >
using TGD::Array< T >::ElementIterator::difference_type = std::ptrdiff_t

◆ iterator_category

template<typename T >
using TGD::Array< T >::ElementIterator::iterator_category = std::random_access_iterator_tag

◆ pointer

template<typename T >
using TGD::Array< T >::ElementIterator::pointer = T*

◆ reference

template<typename T >
using TGD::Array< T >::ElementIterator::reference = T&

◆ value_type

template<typename T >
using TGD::Array< T >::ElementIterator::value_type = T

Constructor & Destructor Documentation

◆ ElementIterator() [1/3]

template<typename T >
TGD::Array< T >::ElementIterator::ElementIterator ( )
inline

◆ ElementIterator() [2/3]

template<typename T >
TGD::Array< T >::ElementIterator::ElementIterator ( T * rhs,
size_t componentCount = 1 )
inline

◆ ElementIterator() [3/3]

template<typename T >
TGD::Array< T >::ElementIterator::ElementIterator ( const ElementIterator & rhs)
inline

Member Function Documentation

◆ operator!=()

template<typename T >
bool TGD::Array< T >::ElementIterator::operator!= ( const ElementIterator & rhs) const
inline

◆ operator*()

template<typename T >
T * TGD::Array< T >::ElementIterator::operator* ( ) const
inline

◆ operator+()

template<typename T >
ElementIterator TGD::Array< T >::ElementIterator::operator+ ( difference_type rhs) const
inline

◆ operator++() [1/2]

template<typename T >
ElementIterator & TGD::Array< T >::ElementIterator::operator++ ( )
inline

◆ operator++() [2/2]

template<typename T >
ElementIterator TGD::Array< T >::ElementIterator::operator++ ( int )
inline

◆ operator+=()

template<typename T >
ElementIterator & TGD::Array< T >::ElementIterator::operator+= ( difference_type rhs)
inline

◆ operator-() [1/2]

template<typename T >
difference_type TGD::Array< T >::ElementIterator::operator- ( const ElementIterator & rhs) const
inline

◆ operator-() [2/2]

template<typename T >
ElementIterator TGD::Array< T >::ElementIterator::operator- ( difference_type rhs) const
inline

◆ operator--() [1/2]

template<typename T >
ElementIterator & TGD::Array< T >::ElementIterator::operator-- ( )
inline

◆ operator--() [2/2]

template<typename T >
ElementIterator TGD::Array< T >::ElementIterator::operator-- ( int )
inline

◆ operator-=()

template<typename T >
ElementIterator & TGD::Array< T >::ElementIterator::operator-= ( difference_type rhs)
inline

◆ operator->()

template<typename T >
T * TGD::Array< T >::ElementIterator::operator-> ( ) const
inline

◆ operator<()

template<typename T >
bool TGD::Array< T >::ElementIterator::operator< ( const ElementIterator & rhs) const
inline

◆ operator<=()

template<typename T >
bool TGD::Array< T >::ElementIterator::operator<= ( const ElementIterator & rhs) const
inline

◆ operator==()

template<typename T >
bool TGD::Array< T >::ElementIterator::operator== ( const ElementIterator & rhs) const
inline

◆ operator>()

template<typename T >
bool TGD::Array< T >::ElementIterator::operator> ( const ElementIterator & rhs) const
inline

◆ operator>=()

template<typename T >
bool TGD::Array< T >::ElementIterator::operator>= ( const ElementIterator & rhs) const
inline

◆ operator[]()

template<typename T >
T * TGD::Array< T >::ElementIterator::operator[] ( difference_type rhs) const
inline

Friends And Related Symbol Documentation

◆ operator+

template<typename T >
ElementIterator operator+ ( difference_type lhs,
const ElementIterator & rhs )
friend

◆ operator-

template<typename T >
ElementIterator operator- ( difference_type lhs,
const ElementIterator & rhs )
friend

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