46 template<
class GraphObjectPtr,
bool isReverse>
56 template<
bool isArgReverse>
60 return m_ptr == other.
m_ptr;
64 return m_ptr != other.
m_ptr;
74 m_ptr = isReverse ? m_ptr->pred() : m_ptr->succ();
81 GraphObjectPtr ptr =
m_ptr;
82 m_ptr = isReverse ? m_ptr->pred() : m_ptr->succ();
89 m_ptr = isReverse ? m_ptr->succ() : m_ptr->pred();
96 GraphObjectPtr ptr =
m_ptr;
97 m_ptr = isReverse ? m_ptr->succ() : m_ptr->pred();
119 : m_key(nullptr), m_array(nullptr) {}
123 : m_key(key), m_array(a) { }
164 m_key = ArrayType::findSuccKey(m_key);
171 m_key = ArrayType::findSuccKey(m_key);
178 m_key = ArrayType::findPredKey(m_key);
185 m_key = ArrayType::findPredKey(m_key);
key_type key() const
Index in m_array.
key_type m_key
Index in m_array.
GraphArrayIteratorBase< ArrayType, isConst > & operator++()
Increment operator (prefix).
GraphIteratorBase(GraphIteratorBase< GraphObjectPtr, isArgReverse > &it)
bool operator!=(const GraphIteratorBase< GraphObjectPtr, isReverse > &other) const
GraphArrayIteratorBase< ArrayType, isConst > operator++(int)
Increment operator (postfix).
GraphIteratorBase< GraphObjectPtr, isReverse > operator--(int)
Decrement operator (postfix).
value_type & value() const
Value of m_array at index m_key.
array_pointer_type m_array
The array.
Implementation of the Reverse class for the reverse iteration of containers.
bool operator!=(const GraphArrayIteratorBase< ArrayType, isConst > &iter) const
Inequality operator.
typename std::conditional< isConst, const ArrayType *, ArrayType * >::type array_pointer_type
Type of the array.
GraphIteratorBase< GraphObjectPtr, isReverse > & operator--()
Decrement operator (prefix).
GraphArrayIteratorBase(key_type key, array_pointer_type a)
Constructor.
value_type & operator*() const
Value of m_array at index m_key.
typename ArrayType::key_type key_type
Index type of the associated array.
GraphArrayIteratorBase< ArrayType, isConst > & operator--()
Decrement operator (prefix).
bool operator==(const GraphIteratorBase< GraphObjectPtr, isReverse > &other) const
GraphIteratorBase< GraphObjectPtr, isReverse > operator++(int)
Increment operator (postfix).
GraphArrayIteratorBase(const GraphArrayIteratorBase< ArrayType, isArgConst > &iter)
Constructor.
Basic declarations, included by all source files.
GraphIteratorBase(GraphObjectPtr ptr)
GraphObjectPtr operator*()
typename std::conditional< isConst, const typename ArrayType::value_type, typename ArrayType::value_type >::type value_type
Value type of the associated array.
bool operator==(const GraphArrayIteratorBase< ArrayType, isConst > &iter) const
Equality operator.
GraphArrayIteratorBase< ArrayType, isConst > operator--(int)
Decrement operator (postfix).
The namespace for all OGDF objects.
GraphArrayIteratorBase()
Constructor.
GraphArrayIteratorBase< ArrayType, isConst > & operator=(const GraphArrayIteratorBase< ArrayType, isConst > &iter)
Copy assignment operator.
GraphArrayIteratorBase(const GraphArrayIteratorBase< ArrayType, isConst > &iter)
Copy constructor.
#define OGDF_ASSERT(expr)
Assert condition expr. See doc/build.md for more information.
GraphIteratorBase< GraphObjectPtr, isReverse > & operator++()
Increment operator (prefix).