Random-access reverse iterator based on a pointer to an array element. More...
#include <ogdf/basic/Array.h>
Public Member Functions | |
ArrayReverseIteratorBase () | |
Constructs an invalid iterator. | |
template<bool isArgConst, typename std::enable_if< isConst||!isArgConst, int >::type = 0> | |
ArrayReverseIteratorBase (const ArrayReverseIteratorBase< E, isArgConst > &it) | |
Constructs an iterator that is a copy of it . | |
ArrayReverseIteratorBase (const ArrayReverseIteratorBase< E, isConst > &it) | |
Copy constructor. clang10 does not see the above templated one match this case and requires it explicitly. | |
template<bool isConstSFINAE = isConst, typename std::enable_if< isConstSFINAE, int >::type = 0> | |
ArrayReverseIteratorBase (const E *pX) | |
Constructs an iterator that points to const E* pX . | |
ArrayReverseIteratorBase (E *pX) | |
Constructs an iterator that points to E* pX . | |
operator std::conditional< isConst, const E, E > * () const | |
Implicit cast to (const) E*. | |
bool | operator!= (const ArrayReverseIteratorBase< E, isConst > &it) const |
Inequality operator. | |
Elem & | operator* () const |
Returns the element this iterator points to. | |
ArrayReverseIteratorBase< E, isConst > | operator+ (const int &rhs) |
Addition operator with int on the right-hand side. | |
ArrayReverseIteratorBase< E, isConst > & | operator++ () |
Increment operator (prefix). | |
ArrayReverseIteratorBase< E, isConst > | operator++ (int) |
Increment operator (postfix). | |
ArrayReverseIteratorBase< E, isConst > & | operator+= (const int &rhs) |
Compound assignment operator (+). | |
template<bool isArgConst> | |
int | operator- (ArrayReverseIteratorBase< E, isArgConst > &rhs) |
Subtraction operator. | |
ArrayReverseIteratorBase< E, isConst > | operator- (const int &rhs) |
Subtraction operator with int on the right-hand side. | |
ArrayReverseIteratorBase< E, isConst > & | operator-- () |
Decrement operator (prefix). | |
ArrayReverseIteratorBase< E, isConst > | operator-- (int) |
Decrement operator (postfix). | |
ArrayReverseIteratorBase< E, isConst > & | operator-= (const int &rhs) |
Compound assignment operator (-). | |
bool | operator< (ArrayReverseIteratorBase< E, isConst > &it) const |
Less-than operator. | |
bool | operator<= (ArrayReverseIteratorBase< E, isConst > &it) const |
Less-than-or-equals operator. | |
ArrayReverseIteratorBase< E, isConst > & | operator= (const ArrayReverseIteratorBase< E, isConst > &it) |
Assignment operator. | |
bool | operator== (const ArrayReverseIteratorBase< E, isConst > &it) const |
Equality operator. | |
bool | operator> (ArrayReverseIteratorBase< E, isConst > &it) const |
Greater-than operator. | |
bool | operator>= (ArrayReverseIteratorBase< E, isConst > &it) const |
Greater-than-or-equals operator. | |
Elem & | operator[] (std::size_t idx) |
Member access operator. | |
const Elem & | operator[] (std::size_t idx) const |
Const member access operator. | |
Private Types | |
using | Elem = typename std::conditional< isConst, const E, E >::type |
The underlying element, depending on isConst. | |
Private Attributes | |
Elem * | m_pX |
The pointer to the array element. | |
Friends | |
class | ArrayReverseIteratorBase< E, !isConst > |
ArrayReverseIteratorBase< E, isConst > | operator+ (const int &lhs, ArrayReverseIteratorBase< E, isConst > rhs) |
Addition operator with int on the left-hand side. Returns the same result as addition with int on the right-hand side. | |
Random-access reverse iterator based on a pointer to an array element.
Swaps all operations involving an increment of the pointer by operations involving a decrement, and vice versa. Moreover, the relational operators are swapped as well. It is possible that an iterator encapsulates a null pointer.
E | The type of element. |
isConst | True iff this iterator allows only const-access to the element. |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
friend |
|
private |