Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

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. More...
 
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. More...
 
 SortedSequenceIteratorBase (const SortedSequenceIteratorBase< KEY, INFO, CMP, isConst, isReverse > &it)
 Copy constructor. More...
 
std::conditional< isConst, const INFO, INFO >::type & info () const
 Returns the info of the sequence element pointed to. More...
 
const KEY & key () const
 Returns the key of the sequence element pointed to. More...
 
bool operator!= (const SortedSequenceIteratorBase< KEY, INFO, CMP, isConst, isReverse > &it) const
 Inequality operator. More...
 
SortedSequenceIteratorBase< KEY, INFO, CMP, isConst, isReverse > & operator++ ()
 Move the iterator one item forward (prefix notation) More...
 
SortedSequenceIteratorBase< KEY, INFO, CMP, isConst, isReverse > operator++ (int)
 Moves the iterator one item forward (postfix notation) More...
 
SortedSequenceIteratorBase< KEY, INFO, CMP, isConst, isReverse > & operator-- ()
 Moves the iterator one item backward (prefix notation) More...
 
SortedSequenceIteratorBase< KEY, INFO, CMP, isConst, isReverse > operator-- (int)
 Moves the iterator one item backward (postfix notation) More...
 
SortedSequenceIteratorBase< KEY, INFO, CMP, isConst, isReverse > & operator= (const SortedSequenceIteratorBase< KEY, INFO, CMP, isConst, isReverse > &it)
 Assignment operator. More...
 
bool operator== (const SortedSequenceIteratorBase< KEY, INFO, CMP, isConst, isReverse > &it) const
 Equality operator. More...
 
SortedSequenceIteratorBase< KEY, INFO, CMP, isConst, isReverse > pred () const
 Returns an iterator pointing to the previous element in the sequence. More...
 
SortedSequenceIteratorBase< KEY, INFO, CMP, isConst, isReverse > succ () const
 Returns an iterator pointing to the next element in the sequence. More...
 
bool valid () const
 Returns true if the iterator points to an element. More...
 

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. More...
 
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 43 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 387 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, const INFO, 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]

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

Move the iterator one item forward (prefix notation)

Definition at line 425 of file SortedSequence.h.

◆ operator++() [2/2]

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

Moves the iterator one item forward (postfix notation)

Definition at line 431 of file SortedSequence.h.

◆ operator--() [1/2]

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

Moves the iterator one item backward (prefix notation)

Definition at line 438 of file SortedSequence.h.

◆ operator--() [2/2]

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

Moves the iterator one item backward (postfix notation)

Definition at line 444 of file SortedSequence.h.

◆ operator=()

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

Assignment operator.

Definition at line 461 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

Equality operator.

Definition at line 468 of file SortedSequence.h.

◆ pred()

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

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()

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

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 Function 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 383 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 381 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 382 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 380 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: