nCine  2025.04.r498-9d36345
A cross-platform 2D game engine
Public Types | Public Member Functions | Friends | List of all members
nctl::StringIterator< IsConst > Class Template Reference

A String iterator. More...

#include <StringIterator.h>

Public Types

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

Public Member Functions

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

Friends

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

Detailed Description

template<bool IsConst>
class nctl::StringIterator< IsConst >

A String iterator.


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