Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

Loading...
Searching...
No Matches
ogdf::SortedSequenceIteratorBase< KEY, INFO, CMP, isConst, isReverse > Class Template Reference

Iterators for sorted sequences. More...

#include <ogdf/basic/SortedSequence.h>

Public Member Functions

 SortedSequenceIteratorBase ()
 Creates an invalid (null-) iterator.
 
template<bool isArgConst, typename std::enable_if< isConst||!isArgConst, int >::type = 0, bool isArgReverse>
 SortedSequenceIteratorBase (const SortedSequenceIteratorBase< KEY, INFO, CMP, isArgConst, isArgReverse > &it)
 Copy constructor.
 
 SortedSequenceIteratorBase (const SortedSequenceIteratorBase< KEY, INFO, CMP, isConst, isReverse > &it)
 Copy constructor.
 
std::conditional< isConst, constINFO, INFO >::type & info () const
 Returns the info of the sequence element pointed to.
 
const KEYkey () const
 Returns the key of the sequence element pointed to.
 
bool operator!= (const SortedSequenceIteratorBase< KEY, INFO, CMP, isConst, isReverse > &it) const
 Inequality operator.
 
SortedSequenceIteratorBase< KEY, INFO, CMP, isConst, isReverse > & operator++ ()
 Move the iterator one item forward (prefix notation)
 
SortedSequenceIteratorBase< KEY, INFO, CMP, isConst, isReverseoperator++ (int)
 Moves the iterator one item forward (postfix notation)
 
SortedSequenceIteratorBase< KEY, INFO, CMP, isConst, isReverse > & operator-- ()
 Moves the iterator one item backward (prefix notation)
 
SortedSequenceIteratorBase< KEY, INFO, CMP, isConst, isReverseoperator-- (int)
 Moves the iterator one item backward (postfix notation)
 
SortedSequenceIteratorBase< KEY, INFO, CMP, isConst, isReverse > & operator= (const SortedSequenceIteratorBase< KEY, INFO, CMP, isConst, isReverse > &it)
 Assignment operator.
 
bool operator== (const SortedSequenceIteratorBase< KEY, INFO, CMP, isConst, isReverse > &it) const
 Equality operator.
 
SortedSequenceIteratorBase< KEY, INFO, CMP, isConst, isReversepred () const
 Returns an iterator pointing to the previous element in the sequence.
 
SortedSequenceIteratorBase< KEY, INFO, CMP, isConst, isReversesucc () const
 Returns an iterator pointing to the next element in the sequence.
 
bool valid () const
 Returns true if the iterator points to an element.
 

Private Types

using Element = typename std::conditional< isConst, const typename SortedSequence< KEY, INFO, CMP >::Element, typename SortedSequence< KEY, INFO, CMP >::Element >::type
 

Private Member Functions

 SortedSequenceIteratorBase (Element *pElement)
 Creates an iterator pointing to pElement.
 
SortedSequence< KEY, INFO, CMP >::ElementpredElement () const
 
SortedSequence< KEY, INFO, CMP >::ElementsuccElement () const
 

Private Attributes

Elementm_pElement
 

Friends

class SortedSequenceIteratorBase< KEY, INFO, CMP, !isConst, !isReverse >
 
class SortedSequenceIteratorBase< KEY, INFO, CMP, !isConst, isReverse >
 
class SortedSequenceIteratorBase< KEY, INFO, CMP, isConst, !isReverse >
 
class SortedSequence< KEY, INFO, CMP >
 

Detailed Description

template<class KEY, class INFO, class CMP, bool isConst, bool isReverse>
class ogdf::SortedSequenceIteratorBase< KEY, INFO, CMP, isConst, isReverse >

Iterators for sorted sequences.

Definition at line 379 of file SortedSequence.h.

Member Typedef Documentation

◆ Element

template<class KEY , class INFO , class CMP , bool isConst, bool isReverse>
using ogdf::SortedSequenceIteratorBase< KEY, INFO, CMP, isConst, isReverse >::Element = typename std::conditional<isConst, const typename SortedSequence<KEY, INFO, CMP>::Element, typename SortedSequence<KEY, INFO, CMP>::Element>::type
private

Definition at line 385 of file SortedSequence.h.

Constructor & Destructor Documentation

◆ SortedSequenceIteratorBase() [1/4]

template<class KEY , class INFO , class CMP , bool isConst, bool isReverse>
ogdf::SortedSequenceIteratorBase< KEY, INFO, CMP, isConst, isReverse >::SortedSequenceIteratorBase ( Element pElement)
inlineprivate

Creates an iterator pointing to pElement.

Definition at line 391 of file SortedSequence.h.

◆ SortedSequenceIteratorBase() [2/4]

template<class KEY , class INFO , class CMP , bool isConst, bool isReverse>
ogdf::SortedSequenceIteratorBase< KEY, INFO, CMP, isConst, isReverse >::SortedSequenceIteratorBase ( )
inline

Creates an invalid (null-) iterator.

Definition at line 395 of file SortedSequence.h.

◆ SortedSequenceIteratorBase() [3/4]

template<class KEY , class INFO , class CMP , bool isConst, bool isReverse>
template<bool isArgConst, typename std::enable_if< isConst||!isArgConst, int >::type = 0, bool isArgReverse>
ogdf::SortedSequenceIteratorBase< KEY, INFO, CMP, isConst, isReverse >::SortedSequenceIteratorBase ( const SortedSequenceIteratorBase< KEY, INFO, CMP, isArgConst, isArgReverse > &  it)
inline

Copy constructor.

Definition at line 399 of file SortedSequence.h.

◆ SortedSequenceIteratorBase() [4/4]

template<class KEY , class INFO , class CMP , bool isConst, bool isReverse>
ogdf::SortedSequenceIteratorBase< KEY, INFO, CMP, isConst, isReverse >::SortedSequenceIteratorBase ( const SortedSequenceIteratorBase< KEY, INFO, CMP, isConst, isReverse > &  it)
inline

Copy constructor.

Definition at line 405 of file SortedSequence.h.

Member Function Documentation

◆ info()

template<class KEY , class INFO , class CMP , bool isConst, bool isReverse>
std::conditional< isConst, constINFO, INFO >::type & ogdf::SortedSequenceIteratorBase< KEY, INFO, CMP, isConst, isReverse >::info ( ) const
inline

Returns the info of the sequence element pointed to.

Definition at line 416 of file SortedSequence.h.

◆ key()

template<class KEY , class INFO , class CMP , bool isConst, bool isReverse>
const KEY & ogdf::SortedSequenceIteratorBase< KEY, INFO, CMP, isConst, isReverse >::key ( ) const
inline

Returns the key of the sequence element pointed to.

Definition at line 410 of file SortedSequence.h.

◆ operator!=()

template<class KEY , class INFO , class CMP , bool isConst, bool isReverse>
bool ogdf::SortedSequenceIteratorBase< KEY, INFO, CMP, isConst, isReverse >::operator!= ( const SortedSequenceIteratorBase< KEY, INFO, CMP, isConst, isReverse > &  it) const
inline

Inequality operator.

Definition at line 473 of file SortedSequence.h.

◆ operator++() [1/2]

Move the iterator one item forward (prefix notation)

Definition at line 425 of file SortedSequence.h.

◆ operator++() [2/2]

Moves the iterator one item forward (postfix notation)

Definition at line 431 of file SortedSequence.h.

◆ operator--() [1/2]

Moves the iterator one item backward (prefix notation)

Definition at line 438 of file SortedSequence.h.

◆ operator--() [2/2]

Moves the iterator one item backward (postfix notation)

Definition at line 444 of file SortedSequence.h.

◆ operator=()

Assignment operator.

Definition at line 461 of file SortedSequence.h.

◆ operator==()

Equality operator.

Definition at line 468 of file SortedSequence.h.

◆ pred()

Returns an iterator pointing to the previous element in the sequence.

Definition at line 456 of file SortedSequence.h.

◆ predElement()

template<class KEY , class INFO , class CMP , bool isConst, bool isReverse>
SortedSequence< KEY, INFO, CMP >::Element * ogdf::SortedSequenceIteratorBase< KEY, INFO, CMP, isConst, isReverse >::predElement ( ) const
inlineprivate

Definition at line 483 of file SortedSequence.h.

◆ succ()

Returns an iterator pointing to the next element in the sequence.

Definition at line 451 of file SortedSequence.h.

◆ succElement()

template<class KEY , class INFO , class CMP , bool isConst, bool isReverse>
SortedSequence< KEY, INFO, CMP >::Element * ogdf::SortedSequenceIteratorBase< KEY, INFO, CMP, isConst, isReverse >::succElement ( ) const
inlineprivate

Definition at line 478 of file SortedSequence.h.

◆ valid()

template<class KEY , class INFO , class CMP , bool isConst, bool isReverse>
bool ogdf::SortedSequenceIteratorBase< KEY, INFO, CMP, isConst, isReverse >::valid ( ) const
inline

Returns true if the iterator points to an element.

Definition at line 422 of file SortedSequence.h.

Friends And Related Symbol Documentation

◆ SortedSequenceIteratorBase< KEY, INFO, CMP, !isConst, !isReverse >

template<class KEY , class INFO , class CMP , bool isConst, bool isReverse>
friend class SortedSequenceIteratorBase< KEY, INFO, CMP, !isConst, !isReverse >
friend

Definition at line 121 of file SortedSequence.h.

◆ SortedSequenceIteratorBase< KEY, INFO, CMP, !isConst, isReverse >

template<class KEY , class INFO , class CMP , bool isConst, bool isReverse>
friend class SortedSequenceIteratorBase< KEY, INFO, CMP, !isConst, isReverse >
friend

Definition at line 121 of file SortedSequence.h.

◆ SortedSequenceIteratorBase< KEY, INFO, CMP, isConst, !isReverse >

template<class KEY , class INFO , class CMP , bool isConst, bool isReverse>
friend class SortedSequenceIteratorBase< KEY, INFO, CMP, isConst, !isReverse >
friend

Definition at line 121 of file SortedSequence.h.

◆ SortedSequence< KEY, INFO, CMP >

template<class KEY , class INFO , class CMP , bool isConst, bool isReverse>
friend class SortedSequence< KEY, INFO, CMP >
friend

Definition at line 121 of file SortedSequence.h.

Member Data Documentation

◆ m_pElement

template<class KEY , class INFO , class CMP , bool isConst, bool isReverse>
Element* ogdf::SortedSequenceIteratorBase< KEY, INFO, CMP, isConst, isReverse >::m_pElement
private

Definition at line 388 of file SortedSequence.h.


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