nCine 2025.06.r503-ff15d8d
A cross-platform 2D game engine
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Friends | List of all members
nctl::ArrayIterator< T, IsConst > Class Template Reference

An Array iterator. More...

#include <ArrayIterator.h>

Public Types

using Pointer = typename IteratorTraits< ArrayIterator >::Pointer
 Pointer type which respects iterator constness.
 
using Reference = typename IteratorTraits< ArrayIterator >::Reference
 Reference type which respects iterator constness.
 

Public Member Functions

 ArrayIterator (T *elementPtr)
 
 ArrayIterator (const ArrayIterator< T, false > &it)
 Copy constructor to implicitly convert a non constant iterator to a constant one.
 
Reference operator* () const
 Deferencing operator.
 
ArrayIteratoroperator++ ()
 Iterates to the next element (prefix)
 
ArrayIterator operator++ (int)
 Iterates to the next element (postfix)
 
ArrayIteratoroperator-- ()
 Iterates to the previous element (prefix)
 
ArrayIterator operator-- (int)
 Iterates to the previous element (postfix)
 
ArrayIteratoroperator+= (int n)
 Compound addition operator.
 
ArrayIteratoroperator-= (int n)
 Compound subtraction operator.
 
ArrayIterator operator+ (int n) const
 Addition operator.
 
ArrayIterator operator- (int n) const
 Subtraction operator.
 
Reference operator[] (int n) const
 Subscript operator.
 

Friends

class ArrayIterator< T, true >
 For non constant to constant iterator implicit conversion.
 
int operator- (const ArrayIterator &lhs, const ArrayIterator &rhs)
 Pointer subtraction operator.
 
bool operator== (const ArrayIterator &lhs, const ArrayIterator &rhs)
 Equality operator.
 
bool operator!= (const ArrayIterator &lhs, const ArrayIterator &rhs)
 Inequality operator.
 
bool operator> (const ArrayIterator &lhs, const ArrayIterator &rhs)
 Greater than operator.
 
bool operator< (const ArrayIterator &lhs, const ArrayIterator &rhs)
 Less than operator.
 
bool operator>= (const ArrayIterator &lhs, const ArrayIterator &rhs)
 Greater than or equal to operator.
 
bool operator<= (const ArrayIterator &lhs, const ArrayIterator &rhs)
 Less than or equal to operator.
 

Detailed Description

template<class T, bool IsConst>
class nctl::ArrayIterator< T, IsConst >

An Array iterator.


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