CONZEPT 16 C++ API
C16::Array< Element >::IteratorConst Class Reference

const-Iterator for elements of an array. More...

#include "C16/Array.hpp"

Inheritance diagram for C16::Array< Element >::IteratorConst:
C16::ArrayGeneric::IteratorGeneric C16::Array< Element >::Iterator

Detailed Description

template<typename Element>
class C16::Array< Element >::IteratorConst

const-Iterator for elements of an array.

Public Types

using value_type = const Element
 Type of the elements of the iterator. More...
 
using reference = const Element &
 Type of a reference to an element of the iterator. More...
 
using pointer = const Element *
 Type of a pointer to an element of the iterator. More...
 
- Public Types inherited from C16::ArrayGeneric::IteratorGeneric
using difference_type = std::ptrdiff_t
 Type of the difference of iterators. More...
 

Public Member Functions

 IteratorConst ()
 Constructs an invalid iterator. More...
 
 IteratorConst (const IteratorConst &other)
 Constructs an iterator by copying another iterator. More...
 
IteratorConstoperator= (const IteratorConst &other)
 Assigns the iterator from another iterator. More...
 
reference operator* () const
 Gets the element of the iterator. More...
 
pointer operator-> () const
 Gets the element of the iterator. More...
 
IteratorConstoperator++ ()
 Increments the iterator. More...
 
IteratorConstoperator-- ()
 Decrements the iterator. More...
 
IteratorConstoperator+= (difference_type offset)
 Increments the iterator. More...
 
IteratorConstoperator-= (difference_type offset)
 Decrements the iterator. More...
 
IteratorConst operator++ (int)
 Gets an incremented iterator. More...
 
IteratorConst operator-- (int)
 Gets a decremented iterator. More...
 
IteratorConst operator+ (difference_type offset) const
 Gets an incremented iterator. More...
 
IteratorConst operator- (difference_type offset) const
 Gets a decremented iterator. More...
 
- Public Member Functions inherited from C16::ArrayGeneric::IteratorGeneric
bool operator== (const IteratorGeneric &other) const
 Gets if the iterator is equal to another iterator. More...
 
bool operator!= (const IteratorGeneric &other) const
 Gets if the iterator is unequal to another iterator. More...
 
bool operator<= (const IteratorGeneric &other) const
 Gets if the iterator is lower than or equal to another iterator. More...
 
bool operator>= (const IteratorGeneric &other) const
 Gets if the iterator is greater than or equal to another iterator. More...
 
bool operator< (const IteratorGeneric &other) const
 Gets if the iterator is lower than another iterator. More...
 
bool operator> (const IteratorGeneric &other) const
 Gets if the iterator is greater than another iterator. More...
 
difference_type operator- (const IteratorGeneric &other) const
 Gets the difference to another iterator. More...
 

Member Typedef Documentation

◆ value_type

template<typename Element >
using C16::Array< Element >::IteratorConst::value_type = const Element

Type of the elements of the iterator.

◆ reference

template<typename Element >
using C16::Array< Element >::IteratorConst::reference = const Element&

Type of a reference to an element of the iterator.

◆ pointer

template<typename Element >
using C16::Array< Element >::IteratorConst::pointer = const Element*

Type of a pointer to an element of the iterator.

Constructor & Destructor Documentation

◆ IteratorConst() [1/2]

template<typename Element >
C16::Array< Element >::IteratorConst::IteratorConst ( )

Constructs an invalid iterator.

◆ IteratorConst() [2/2]

template<typename Element >
C16::Array< Element >::IteratorConst::IteratorConst ( const IteratorConst other)

Constructs an iterator by copying another iterator.

Parameters
otherAnother iterator

Member Function Documentation

◆ operator=()

template<typename Element >
IteratorConst& C16::Array< Element >::IteratorConst::operator= ( const IteratorConst other)

Assigns the iterator from another iterator.

Parameters
otherAnother iterator
Returns
This iterator

◆ operator*()

template<typename Element >
reference C16::Array< Element >::IteratorConst::operator* ( ) const

Gets the element of the iterator.

◆ operator->()

template<typename Element >
pointer C16::Array< Element >::IteratorConst::operator-> ( ) const

Gets the element of the iterator.

◆ operator++() [1/2]

template<typename Element >
IteratorConst& C16::Array< Element >::IteratorConst::operator++ ( )

Increments the iterator.

Returns
This iterator

◆ operator--() [1/2]

template<typename Element >
IteratorConst& C16::Array< Element >::IteratorConst::operator-- ( )

Decrements the iterator.

Returns
This iterator

◆ operator+=()

template<typename Element >
IteratorConst& C16::Array< Element >::IteratorConst::operator+= ( difference_type  offset)

Increments the iterator.

Parameters
offsetOffset to increment the iterator by
Returns
This iterator

◆ operator-=()

template<typename Element >
IteratorConst& C16::Array< Element >::IteratorConst::operator-= ( difference_type  offset)

Decrements the iterator.

Parameters
offsetOffset to decrement the iterator by
Returns
This iterator

◆ operator++() [2/2]

template<typename Element >
IteratorConst C16::Array< Element >::IteratorConst::operator++ ( int  )

Gets an incremented iterator.

◆ operator--() [2/2]

template<typename Element >
IteratorConst C16::Array< Element >::IteratorConst::operator-- ( int  )

Gets a decremented iterator.

◆ operator+()

template<typename Element >
IteratorConst C16::Array< Element >::IteratorConst::operator+ ( difference_type  offset) const

Gets an incremented iterator.

Parameters
offsetOffset to increment the iterator by

◆ operator-()

template<typename Element >
IteratorConst C16::Array< Element >::IteratorConst::operator- ( difference_type  offset) const

Gets a decremented iterator.

Parameters
offsetOffset to decrement the iterator by