Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

Loading...
Searching...
No Matches
ogdf::internal::GraphArrayIteratorBase< ArrayType, isConst > Class Template Reference

#include <ogdf/basic/internal/graph_iterators.h>

Public Types

using array_pointer_type = typename std::conditional< isConst, const ArrayType *, ArrayType * >::type
 Type of the array.
 
using key_type = typename ArrayType::key_type
 Index type of the associated array.
 
using value_type = typename std::conditional< isConst, const typename ArrayType::value_type, typename ArrayType::value_type >::type
 Value type of the associated array.
 

Public Member Functions

 GraphArrayIteratorBase ()
 Constructor.
 
template<bool isArgConst, typename std::enable_if< isConst||!isArgConst, int >::type = 0>
 GraphArrayIteratorBase (const GraphArrayIteratorBase< ArrayType, isArgConst > &iter)
 Constructor.
 
 GraphArrayIteratorBase (const GraphArrayIteratorBase< ArrayType, isConst > &iter)
 Copy constructor.
 
 GraphArrayIteratorBase (key_type key, array_pointer_type a)
 Constructor.
 
key_type key () const
 Index in m_array.
 
bool operator!= (const GraphArrayIteratorBase< ArrayType, isConst > &iter) const
 Inequality operator.
 
value_typeoperator* () const
 Value of m_array at index m_key.
 
GraphArrayIteratorBase< ArrayType, isConst > & operator++ ()
 Increment operator (prefix).
 
GraphArrayIteratorBase< ArrayType, isConstoperator++ (int)
 Increment operator (postfix).
 
GraphArrayIteratorBase< ArrayType, isConst > & operator-- ()
 Decrement operator (prefix).
 
GraphArrayIteratorBase< ArrayType, isConstoperator-- (int)
 Decrement operator (postfix).
 
GraphArrayIteratorBase< ArrayType, isConst > & operator= (const GraphArrayIteratorBase< ArrayType, isConst > &iter)
 Copy assignment operator.
 
bool operator== (const GraphArrayIteratorBase< ArrayType, isConst > &iter) const
 Equality operator.
 
value_typevalue () const
 Value of m_array at index m_key.
 

Private Attributes

array_pointer_type m_array
 The array.
 
key_type m_key
 Index in m_array.
 

Friends

class GraphArrayIteratorBase< ArrayType, true >
 

Detailed Description

template<class ArrayType, bool isConst>
class ogdf::internal::GraphArrayIteratorBase< ArrayType, isConst >

Definition at line 113 of file graph_iterators.h.

Member Typedef Documentation

◆ array_pointer_type

template<class ArrayType , bool isConst>
using ogdf::internal::GraphArrayIteratorBase< ArrayType, isConst >::array_pointer_type = typename std::conditional<isConst, const ArrayType*, ArrayType*>::type

Type of the array.

Definition at line 123 of file graph_iterators.h.

◆ key_type

template<class ArrayType , bool isConst>
using ogdf::internal::GraphArrayIteratorBase< ArrayType, isConst >::key_type = typename ArrayType::key_type

Index type of the associated array.

Definition at line 118 of file graph_iterators.h.

◆ value_type

template<class ArrayType , bool isConst>
using ogdf::internal::GraphArrayIteratorBase< ArrayType, isConst >::value_type = typename std::conditional<isConst, const typename ArrayType::value_type, typename ArrayType::value_type>::type

Value type of the associated array.

Definition at line 120 of file graph_iterators.h.

Constructor & Destructor Documentation

◆ GraphArrayIteratorBase() [1/4]

template<class ArrayType , bool isConst>
ogdf::internal::GraphArrayIteratorBase< ArrayType, isConst >::GraphArrayIteratorBase ( )
inline

Constructor.

Definition at line 126 of file graph_iterators.h.

◆ GraphArrayIteratorBase() [2/4]

template<class ArrayType , bool isConst>
ogdf::internal::GraphArrayIteratorBase< ArrayType, isConst >::GraphArrayIteratorBase ( key_type  key,
array_pointer_type  a 
)
inline

Constructor.

Definition at line 129 of file graph_iterators.h.

◆ GraphArrayIteratorBase() [3/4]

template<class ArrayType , bool isConst>
template<bool isArgConst, typename std::enable_if< isConst||!isArgConst, int >::type = 0>
ogdf::internal::GraphArrayIteratorBase< ArrayType, isConst >::GraphArrayIteratorBase ( const GraphArrayIteratorBase< ArrayType, isArgConst > &  iter)
inline

Constructor.

Definition at line 133 of file graph_iterators.h.

◆ GraphArrayIteratorBase() [4/4]

template<class ArrayType , bool isConst>
ogdf::internal::GraphArrayIteratorBase< ArrayType, isConst >::GraphArrayIteratorBase ( const GraphArrayIteratorBase< ArrayType, isConst > &  iter)
inline

Copy constructor.

Definition at line 138 of file graph_iterators.h.

Member Function Documentation

◆ key()

template<class ArrayType , bool isConst>
key_type ogdf::internal::GraphArrayIteratorBase< ArrayType, isConst >::key ( ) const
inline

Index in m_array.

Definition at line 150 of file graph_iterators.h.

◆ operator!=()

Inequality operator.

Definition at line 164 of file graph_iterators.h.

◆ operator*()

Value of m_array at index m_key.

Definition at line 156 of file graph_iterators.h.

◆ operator++() [1/2]

Increment operator (prefix).

Definition at line 169 of file graph_iterators.h.

◆ operator++() [2/2]

Increment operator (postfix).

Definition at line 176 of file graph_iterators.h.

◆ operator--() [1/2]

Decrement operator (prefix).

Definition at line 183 of file graph_iterators.h.

◆ operator--() [2/2]

Decrement operator (postfix).

Definition at line 190 of file graph_iterators.h.

◆ operator=()

Copy assignment operator.

Definition at line 142 of file graph_iterators.h.

◆ operator==()

Equality operator.

Definition at line 159 of file graph_iterators.h.

◆ value()

template<class ArrayType , bool isConst>
value_type & ogdf::internal::GraphArrayIteratorBase< ArrayType, isConst >::value ( ) const
inline

Value of m_array at index m_key.

Definition at line 153 of file graph_iterators.h.

Friends And Related Symbol Documentation

◆ GraphArrayIteratorBase< ArrayType, true >

Definition at line 97 of file graph_iterators.h.

Member Data Documentation

◆ m_array

The array.

Definition at line 198 of file graph_iterators.h.

◆ m_key

Index in m_array.

Definition at line 197 of file graph_iterators.h.


The documentation for this class was generated from the following file: