Open
Graph Drawing
Framework

 v. snapshot-2017-02-16
 

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

Const iterators for sorted sequences. More...

#include <ogdf/basic/SortedSequence.h>

Public Member Functions

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

 SortedSequenceConstIterator (const 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

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

Friends

class SortedSequence< KEY, INFO, CMP >
 

Detailed Description

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

Const iterators for sorted sequences.

Definition at line 44 of file SortedSequence.h.

Constructor & Destructor Documentation

◆ SortedSequenceConstIterator() [1/4]

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

Creates an iterator pointing to pElement.

Definition at line 462 of file SortedSequence.h.

◆ SortedSequenceConstIterator() [2/4]

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

Creates an invalid (null-) iterator.

Definition at line 467 of file SortedSequence.h.

◆ SortedSequenceConstIterator() [3/4]

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

Copy constructor.

Definition at line 470 of file SortedSequence.h.

◆ SortedSequenceConstIterator() [4/4]

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

Creates an iterator pointing to the same element as it.

Definition at line 474 of file SortedSequence.h.

Member Function Documentation

◆ info()

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

Returns the info of the sequence element pointed to.

Definition at line 481 of file SortedSequence.h.

◆ key()

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

Returns the key of the sequence element pointed to.

Definition at line 478 of file SortedSequence.h.

◆ operator!=()

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

Inequality operator.

Definition at line 535 of file SortedSequence.h.

◆ operator++() [1/2]

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

Moves the iterator one item forward (prefix notation).

Definition at line 488 of file SortedSequence.h.

◆ operator++() [2/2]

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

Moves the iterator one item forward (postfix notation).

Definition at line 494 of file SortedSequence.h.

◆ operator--() [1/2]

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

Moves the iterator one item backward (prefix notation).

Definition at line 501 of file SortedSequence.h.

◆ operator--() [2/2]

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

Moves the iterator one item backward (postfix notation).

Definition at line 507 of file SortedSequence.h.

◆ operator=()

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

Assignment operator.

Definition at line 524 of file SortedSequence.h.

◆ operator==()

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

Equality operator.

Definition at line 530 of file SortedSequence.h.

◆ pred()

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

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

Definition at line 519 of file SortedSequence.h.

◆ predElement()

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

Definition at line 544 of file SortedSequence.h.

◆ succ()

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

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

Definition at line 514 of file SortedSequence.h.

◆ succElement()

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

Definition at line 540 of file SortedSequence.h.

◆ valid()

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

Returns true if the iterator points to an element.

Definition at line 485 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 457 of file SortedSequence.h.

Member Data Documentation

◆ m_pElement

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

Definition at line 459 of file SortedSequence.h.


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