PointerArray< T, MINCHUNKSIZE, ALLOCATOR >::IteratorTemplate< CONSTITERATOR > Class Template Reference
#include <pointerarray.h>
The PointerArray iterator can be used to iterate over an array or parts of it. For more ease of use you may want to invoke this via the C++11 range based for loop.
You can use an iterator almost like a pointer, e.g.
it++; // go to the next element it--; // go to the previous element it += 5; // advance by 5 elements it -= 3; // go back 3 elements cnt = itB - itA; // number of elements from itA to itB it = array.Begin(); // iterator to the first element of the array *it = value; // assign value to the elements referenced by the iterator value = *value; // get value of the element referenced by the iterator
Public Types |
|
using | CollectionType = typename ConstIf < PointerArray , CONSTITERATOR >:: type |
using | 类型 = typename ConstIf < T, CONSTITERATOR >:: type |
公共成员函数 |
|
IteratorTemplate ( CollectionType &a, Int start=0) | |
IteratorTemplate ( 类型 *const *pos=nullptr) | |
IteratorTemplate (const IteratorTemplate & src ) | |
IteratorTemplate & | operator= (const IteratorTemplate & src ) |
operator ConstIterator & () | |
operator Bool () const | |
类型 * | GetPtr () const |
类型 & | operator* () const |
类型 * | operator-> () const |
Bool | operator== (const IteratorTemplate &b) const |
Bool | operator< (const IteratorTemplate &b) const |
MAXON_OPERATOR_COMPARISON ( IteratorTemplate ) | |
IteratorTemplate & | operator++ () |
const IteratorTemplate | operator++ (int) |
IteratorTemplate & | operator+= ( Int i) |
IteratorTemplate & | operator-- () |
const IteratorTemplate | operator-- (int) |
IteratorTemplate & | operator-= ( Int i) |
IteratorTemplate | operator+ ( Int i) const |
IteratorTemplate | operator- ( Int i) const |
Int | operator- (const IteratorTemplate &b) const |
静态公共属性 |
|
static const Bool | isLinearIterator |
Private Attributes |
|
类型 *const * | _data |
using CollectionType = typename ConstIf < PointerArray , CONSTITERATOR>:: type |
using 类型 = typename ConstIf <T, CONSTITERATOR>:: type |
|
explicit |
|
explicit |
IteratorTemplate | ( | const IteratorTemplate < CONSTITERATOR > & | src | ) |
IteratorTemplate & operator= | ( | const IteratorTemplate < CONSTITERATOR > & | src | ) |
operator ConstIterator & | ( | ) |
|
explicit |
类型 * GetPtr | ( | ) | const |
类型 & operator* | ( | ) | const |
类型 * operator-> | ( | ) | const |
Bool operator== | ( | const IteratorTemplate < CONSTITERATOR > & | b | ) | const |
Bool operator< | ( | const IteratorTemplate < CONSTITERATOR > & | b | ) | const |
MAXON_OPERATOR_COMPARISON | ( | IteratorTemplate < CONSTITERATOR > | ) |
IteratorTemplate & operator++ | ( | ) |
const IteratorTemplate operator++ | ( | int | ) |
IteratorTemplate & operator+= | ( | Int | i | ) |
IteratorTemplate & operator-- | ( | ) |
const IteratorTemplate operator-- | ( | int | ) |
IteratorTemplate & operator-= | ( | Int | i | ) |
IteratorTemplate operator+ | ( | Int | i | ) | const |
IteratorTemplate operator- | ( | Int | i | ) | const |
Int operator- | ( | const IteratorTemplate < CONSTITERATOR > & | b | ) | const |
|
|
private |