40 template<
class GraphObjectPtr>
49 return m_ptr == other.
m_ptr;
53 return m_ptr != other.
m_ptr;
63 m_ptr = m_ptr->succ();
70 GraphObjectPtr ptr =
m_ptr;
71 m_ptr = m_ptr->succ();
78 m_ptr = m_ptr->pred();
85 GraphObjectPtr ptr =
m_ptr;
86 m_ptr = m_ptr->pred();
108 : m_key(nullptr), m_array(nullptr) {}
112 : m_key(key), m_array(a) { }
148 m_key = ArrayType::findSuccKey(m_key);
155 m_key = ArrayType::findSuccKey(m_key);
162 m_key = ArrayType::findPredKey(m_key);
169 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).
GraphObjectPtr operator*()
GraphArrayIteratorBase< ArrayType, isConst > operator++(int)
Increment operator (postfix).
GraphIterator(GraphObjectPtr ptr)
GraphIterator< GraphObjectPtr > & operator--()
Decrement operator (prefix).
value_type & value() const
Value of m_array at index m_key.
array_pointer_type m_array
The array.
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.
bool operator!=(const GraphIterator< GraphObjectPtr > &other) const
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).
GraphIterator< GraphObjectPtr > operator++(int)
Increment operator (postfix).
GraphArrayIteratorBase(const GraphArrayIteratorBase< ArrayType, isArgConst > &iter)
Constructor.
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).
bool operator==(const GraphIterator< GraphObjectPtr > &other) const
The namespace for all OGDF objects.
GraphIterator< GraphObjectPtr > & operator++()
Increment operator (prefix).
GraphArrayIteratorBase()
Constructor.
GraphArrayIteratorBase< ArrayType, isConst > & operator=(const GraphArrayIteratorBase< ArrayType, isConst > &iter)
Copy assignment operator.
GraphIterator< GraphObjectPtr > operator--(int)
Decrement operator (postfix).
#define OGDF_ASSERT(expr)
Assert condition expr. See doc/build.md for more information.