Open
Graph Drawing
Framework

 v. snapshot-2017-02-16
 

ogdf::SortedSequenceIterator< KEY, INFO, CMP > Class Template Reference

Iterators for sorted sequences. More...

#include <ogdf/basic/SortedSequence.h>

Public Member Functions

 SortedSequenceIterator ()
 Creates an invalid (null-) iterator. More...
 
 SortedSequenceIterator (const SortedSequenceIterator< KEY, INFO, CMP > &it)
 Copy constructor. More...
 
INFO & 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 SortedSequenceIterator< KEY, INFO, CMP > &it) const
 Inequality operator. More...
 
SortedSequenceIterator< KEY, INFO, CMP > & operator++ ()
 Move the iterator one item forward (prefix notation) More...
 
SortedSequenceIterator< KEY, INFO, CMP > operator++ (int)
 Moves the iterator one item forward (postfix notation) More...
 
SortedSequenceIterator< KEY, INFO, CMP > & operator-- ()
 Moves the iterator one item backward (prefix notation) More...
 
SortedSequenceIterator< KEY, INFO, CMP > operator-- (int)
 Moves the iterator one item backward (postfix notation) More...
 
SortedSequenceIterator< KEY, INFO, CMP > & operator= (const SortedSequenceIterator< KEY, INFO, CMP > &it)
 Assignment operator. More...
 
bool operator== (const SortedSequenceIterator< KEY, INFO, CMP > &it) const
 Equality operator. More...
 
SortedSequenceIterator< KEY, INFO, CMP > pred () const
 Returns an iterator pointing to the previous element in the sequence. More...
 
SortedSequenceIterator< KEY, INFO, CMP > 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 Member Functions

 SortedSequenceIterator (typename SortedSequence< KEY, INFO, CMP >::Element *pElement)
 Creates an iterator pointing to pElement. More...
 
SortedSequence< KEY, INFO, CMP >::Element * predElement () const
 
SortedSequence< KEY, INFO, CMP >::Element * succElement () const
 

Private Attributes

SortedSequence< KEY, INFO, CMP >::Element * m_pElement
 

Friends

class SortedSequence< KEY, INFO, CMP >
 
class SortedSequenceConstIterator< KEY, INFO, CMP >
 

Detailed Description

template<class KEY, class INFO, class CMP>
class ogdf::SortedSequenceIterator< KEY, INFO, CMP >

Iterators for sorted sequences.

Definition at line 41 of file SortedSequence.h.

Constructor & Destructor Documentation

◆ SortedSequenceIterator() [1/3]

template<class KEY, class INFO, class CMP>
ogdf::SortedSequenceIterator< KEY, INFO, CMP >::SortedSequenceIterator ( typename SortedSequence< KEY, INFO, CMP >::Element *  pElement)
inlineprivate

Creates an iterator pointing to pElement.

Definition at line 370 of file SortedSequence.h.

◆ SortedSequenceIterator() [2/3]

template<class KEY, class INFO, class CMP>
ogdf::SortedSequenceIterator< KEY, INFO, CMP >::SortedSequenceIterator ( )
inline

Creates an invalid (null-) iterator.

Definition at line 375 of file SortedSequence.h.

◆ SortedSequenceIterator() [3/3]

template<class KEY, class INFO, class CMP>
ogdf::SortedSequenceIterator< KEY, INFO, CMP >::SortedSequenceIterator ( const SortedSequenceIterator< KEY, INFO, CMP > &  it)
inline

Copy constructor.

Definition at line 378 of file SortedSequence.h.

Member Function Documentation

◆ info()

template<class KEY, class INFO, class CMP>
INFO& ogdf::SortedSequenceIterator< KEY, INFO, CMP >::info ( ) const
inline

Returns the info of the sequence element pointed to.

Definition at line 385 of file SortedSequence.h.

◆ key()

template<class KEY, class INFO, class CMP>
const KEY& ogdf::SortedSequenceIterator< KEY, INFO, CMP >::key ( ) const
inline

Returns the key of the sequence element pointed to.

Definition at line 382 of file SortedSequence.h.

◆ operator!=()

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

Inequality operator.

Definition at line 439 of file SortedSequence.h.

◆ operator++() [1/2]

template<class KEY, class INFO, class CMP>
SortedSequenceIterator<KEY,INFO,CMP>& ogdf::SortedSequenceIterator< KEY, INFO, CMP >::operator++ ( )
inline

Move the iterator one item forward (prefix notation)

Definition at line 392 of file SortedSequence.h.

◆ operator++() [2/2]

template<class KEY, class INFO, class CMP>
SortedSequenceIterator<KEY,INFO,CMP> ogdf::SortedSequenceIterator< KEY, INFO, CMP >::operator++ ( int  )
inline

Moves the iterator one item forward (postfix notation)

Definition at line 398 of file SortedSequence.h.

◆ operator--() [1/2]

template<class KEY, class INFO, class CMP>
SortedSequenceIterator<KEY,INFO,CMP>& ogdf::SortedSequenceIterator< KEY, INFO, CMP >::operator-- ( )
inline

Moves the iterator one item backward (prefix notation)

Definition at line 405 of file SortedSequence.h.

◆ operator--() [2/2]

template<class KEY, class INFO, class CMP>
SortedSequenceIterator<KEY,INFO,CMP> ogdf::SortedSequenceIterator< KEY, INFO, CMP >::operator-- ( int  )
inline

Moves the iterator one item backward (postfix notation)

Definition at line 411 of file SortedSequence.h.

◆ operator=()

template<class KEY, class INFO, class CMP>
SortedSequenceIterator<KEY,INFO,CMP>& ogdf::SortedSequenceIterator< KEY, INFO, CMP >::operator= ( const SortedSequenceIterator< KEY, INFO, CMP > &  it)
inline

Assignment operator.

Definition at line 428 of file SortedSequence.h.

◆ operator==()

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

Equality operator.

Definition at line 434 of file SortedSequence.h.

◆ pred()

template<class KEY, class INFO, class CMP>
SortedSequenceIterator<KEY,INFO,CMP> ogdf::SortedSequenceIterator< KEY, INFO, CMP >::pred ( ) const
inline

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

Definition at line 423 of file SortedSequence.h.

◆ predElement()

template<class KEY, class INFO, class CMP>
SortedSequence<KEY,INFO,CMP>::Element* ogdf::SortedSequenceIterator< KEY, INFO, CMP >::predElement ( ) const
inlineprivate

Definition at line 448 of file SortedSequence.h.

◆ succ()

template<class KEY, class INFO, class CMP>
SortedSequenceIterator<KEY,INFO,CMP> ogdf::SortedSequenceIterator< KEY, INFO, CMP >::succ ( ) const
inline

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

Definition at line 418 of file SortedSequence.h.

◆ succElement()

template<class KEY, class INFO, class CMP>
SortedSequence<KEY,INFO,CMP>::Element* ogdf::SortedSequenceIterator< KEY, INFO, CMP >::succElement ( ) const
inlineprivate

Definition at line 444 of file SortedSequence.h.

◆ valid()

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

Returns true if the iterator points to an element.

Definition at line 389 of file SortedSequence.h.

Friends And Related Function Documentation

◆ SortedSequence< KEY, INFO, CMP >

template<class KEY, class INFO, class CMP>
friend class SortedSequence< KEY, INFO, CMP >
friend

Definition at line 364 of file SortedSequence.h.

◆ SortedSequenceConstIterator< KEY, INFO, CMP >

template<class KEY, class INFO, class CMP>
friend class SortedSequenceConstIterator< KEY, INFO, CMP >
friend

Definition at line 365 of file SortedSequence.h.

Member Data Documentation

◆ m_pElement

template<class KEY, class INFO, class CMP>
SortedSequence<KEY,INFO,CMP>::Element* ogdf::SortedSequenceIterator< KEY, INFO, CMP >::m_pElement
private

Definition at line 367 of file SortedSequence.h.


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