Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

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. More...
 
using key_type = typename ArrayType::key_type
 Index type of the associated array. More...
 
using value_type = typename std::conditional< isConst, const typename ArrayType::value_type, typename ArrayType::value_type >::type
 Value type of the associated array. More...
 

Public Member Functions

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

Private Attributes

array_pointer_type m_array
 The array. More...
 
key_type m_key
 Index in m_array. More...
 

Friends

class GraphArrayIteratorBase< ArrayType, true >
 

Detailed Description

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

Definition at line 112 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 130 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 125 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 128 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 133 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 136 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 140 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 145 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 157 of file graph_iterators.h.

◆ operator!=()

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

Inequality operator.

Definition at line 171 of file graph_iterators.h.

◆ operator*()

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

Value of m_array at index m_key.

Definition at line 163 of file graph_iterators.h.

◆ operator++() [1/2]

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

Increment operator (prefix).

Definition at line 176 of file graph_iterators.h.

◆ operator++() [2/2]

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

Increment operator (postfix).

Definition at line 183 of file graph_iterators.h.

◆ operator--() [1/2]

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

Decrement operator (prefix).

Definition at line 190 of file graph_iterators.h.

◆ operator--() [2/2]

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

Decrement operator (postfix).

Definition at line 197 of file graph_iterators.h.

◆ operator=()

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

Copy assignment operator.

Definition at line 149 of file graph_iterators.h.

◆ operator==()

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

Equality operator.

Definition at line 166 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 160 of file graph_iterators.h.

Friends And Related Function Documentation

◆ GraphArrayIteratorBase< ArrayType, true >

template<class ArrayType , bool isConst>
friend class GraphArrayIteratorBase< ArrayType, true >
friend

Definition at line 121 of file graph_iterators.h.

Member Data Documentation

◆ m_array

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

The array.

Definition at line 205 of file graph_iterators.h.

◆ m_key

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

Index in m_array.

Definition at line 204 of file graph_iterators.h.


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