Implementation of std::iterator_traits
for class TString and its descendents. Base class String exposes ConstIterator which uses const TChar*
and const TChar&
for template types TPointer and TReference. Descendant classes may expose a mutable version (e.g., AString).
As the name of the class indicates, this iterator satisfies the C++ standard library concept RandomAccessIterator .
Definition at line 2109 of file string.hpp.
#include <string.hpp>
Public Type Index: | |
using | difference_type = integer |
Implementation of std::iterator_traits . | |
using | iterator_category = std::random_access_iterator_tag |
Implementation of std::iterator_traits . | |
using | pointer = TCharConstOrMutable* |
Implementation of std::iterator_traits . | |
using | reference = TCharConstOrMutable& |
Implementation of std::iterator_traits . | |
using | value_type = TCharConstOrMutable |
Implementation of std::iterator_traits . | |
Public Method Index: | |
TRandomAccessIterator (TCharConstOrMutable *start=nullptr) | |
bool | operator!= (TRandomAccessIterator other) const |
TCharConstOrMutable & | operator* () |
TCharConstOrMutable & | operator* () const |
TRandomAccessIterator | operator+ (integer n) const |
ALIB_WARNINGS_ALLOW_UNSAFE_BUFFER_USAGE TRandomAccessIterator & | operator++ () |
TRandomAccessIterator | operator++ (int) |
TRandomAccessIterator & | operator+= (integer n) |
TRandomAccessIterator | operator- (integer n) const |
integer | operator- (TRandomAccessIterator other) const |
TRandomAccessIterator & | operator-- () |
TRandomAccessIterator | operator-- (int) |
TRandomAccessIterator & | operator-= (integer n) |
bool | operator< (TRandomAccessIterator other) const |
bool | operator<= (TRandomAccessIterator other) const |
bool | operator== (TRandomAccessIterator other) const |
bool | operator> (TRandomAccessIterator other) const |
bool | operator>= (TRandomAccessIterator other) const |
TCharConstOrMutable & | operator[] (integer n) const |
Protected Field Index: | |
TCharConstOrMutable * | p |
The pointer into the buffer is all we store. | |
Implementation of std::iterator_traits
.
Definition at line 2114 of file string.hpp.
using iterator_category = std::random_access_iterator_tag |
Implementation of std::iterator_traits
.
Definition at line 2112 of file string.hpp.
using pointer = TCharConstOrMutable* |
Implementation of std::iterator_traits
.
Definition at line 2115 of file string.hpp.
using reference = TCharConstOrMutable& |
Implementation of std::iterator_traits
.
Definition at line 2116 of file string.hpp.
using value_type = TCharConstOrMutable |
Implementation of std::iterator_traits
.
Definition at line 2113 of file string.hpp.
|
protected |
The pointer into the buffer is all we store.
Definition at line 2121 of file string.hpp.
|
inlineexplicit |
Constructor.
start | Pointer to the initial character. |
Definition at line 2125 of file string.hpp.
|
inline |
Comparison operator.
other | The iterator to compare ourselves to. |
true
if this and given iterator are not equal, false
otherwise. Definition at line 2158 of file string.hpp.
|
inline |
Retrieves the character that this iterator references.
Definition at line 2172 of file string.hpp.
|
inline |
Retrieves the character that this iterator references.
Definition at line 2165 of file string.hpp.
|
inline |
Addition.
n | The value to subtract. |
Definition at line 2220 of file string.hpp.
|
inline |
Prefix increment operator.
Definition at line 2133 of file string.hpp.
|
inline |
Postfix increment operator.
Definition at line 2141 of file string.hpp.
|
inline |
Addition assignment.
n | The value to subtract. |
Definition at line 2202 of file string.hpp.
|
inline |
Subtraction.
n | The value to subtract. |
Definition at line 2228 of file string.hpp.
|
inline |
Difference (distance) from this iterator to the given one.
other | The iterator to subtract |
Definition at line 2236 of file string.hpp.
|
inline |
Prefix decrement operator.
Definition at line 2182 of file string.hpp.
|
inline |
Postfix decrement operator.
Definition at line 2191 of file string.hpp.
|
inline |
Subtraction assignment.
n | The value to subtract. |
Definition at line 2211 of file string.hpp.
|
inline |
Compares this iterator with the given one.
other | The iterator to compare |
true
if this iterator is smaller than other, false
otherwise. Definition at line 2256 of file string.hpp.
|
inline |
Compares this iterator with the given one.
other | The iterator to compare |
true
if this iterator is smaller than or equal to other, false
otherwise. Definition at line 2265 of file string.hpp.
|
inline |
Comparison operator.
other | The iterator to compare ourselves to. |
true
if this and the given iterator are pointing to the same character in the same array, false
otherwise. Definition at line 2150 of file string.hpp.
|
inline |
Compares this iterator with the given one.
other | The iterator to compare |
true
if this iterator is greater than other, false
otherwise. Definition at line 2274 of file string.hpp.
|
inline |
Compares this iterator with the given one.
other | The iterator to compare |
true
if this iterator is greater than or equal to other, false
otherwise. Definition at line 2283 of file string.hpp.
|
inline |
Subscript operator.
n | The distance to add. |
Definition at line 2245 of file string.hpp.