Implementation of std::iterator_traits for class TString and its descendents. Base class String exposes const_iterator 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 1819 of file string.inl.
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 |
| 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. | |
| using alib::strings::TString< TChar >::TRandomAccessIterator< TCharConstOrMutable >::difference_type = integer |
Implementation of std::iterator_traits.
Definition at line 1824 of file string.inl.
| using alib::strings::TString< TChar >::TRandomAccessIterator< TCharConstOrMutable >::iterator_category = std::random_access_iterator_tag |
Implementation of std::iterator_traits.
Definition at line 1822 of file string.inl.
| using alib::strings::TString< TChar >::TRandomAccessIterator< TCharConstOrMutable >::pointer = TCharConstOrMutable* |
Implementation of std::iterator_traits.
Definition at line 1825 of file string.inl.
| using alib::strings::TString< TChar >::TRandomAccessIterator< TCharConstOrMutable >::reference = TCharConstOrMutable& |
Implementation of std::iterator_traits.
Definition at line 1826 of file string.inl.
| using alib::strings::TString< TChar >::TRandomAccessIterator< TCharConstOrMutable >::value_type = TCharConstOrMutable |
Implementation of std::iterator_traits.
Definition at line 1823 of file string.inl.
|
protected |
The pointer into the buffer is all we store.
Definition at line 1830 of file string.inl.
|
inlineexplicit |
Constructor.
| start | Pointer to the initial character. |
Definition at line 1834 of file string.inl.
|
inline |
Comparison operator.
| other | The iterator to compare ourselves to. |
true if this and given iterator are not equal, false otherwise. Definition at line 1855 of file string.inl.
|
inline |
Retrieves the character that this iterator references.
Definition at line 1863 of file string.inl.
|
inline |
Retrieves the character that this iterator references.
Definition at line 1859 of file string.inl.
|
inline |
Addition.
| n | The value to subtract. |
Definition at line 1893 of file string.inl.
|
inline |
Prefix increment operator.
Definition at line 1840 of file string.inl.
|
inline |
Postfix increment operator.
Definition at line 1844 of file string.inl.
|
inline |
Addition assignment.
| n | The value to subtract. |
Definition at line 1883 of file string.inl.
|
inline |
Subtraction.
| n | The value to subtract. |
Definition at line 1898 of file string.inl.
|
inline |
Difference (distance) from this iterator to the given one.
| other | The iterator to subtract |
Definition at line 1903 of file string.inl.
|
inline |
Prefix decrement operator.
Definition at line 1870 of file string.inl.
|
inline |
Postfix decrement operator.
Definition at line 1875 of file string.inl.
|
inline |
Subtraction assignment.
| n | The value to subtract. |
Definition at line 1888 of file string.inl.
|
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 1917 of file string.inl.
|
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 1923 of file string.inl.
|
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 1850 of file string.inl.
|
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 1929 of file string.inl.
|
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 1935 of file string.inl.
|
inline |
Subscript operator.
| n | The distance to add. |
Definition at line 1909 of file string.inl.