Open
Graph Drawing
Framework

 v.2012.05
 

ogdf::SListConstIterator< E > Class Template Reference

The parameterized class SListIterator<E> encapsulates a constant pointer to an slist element. More...

#include <ogdf/basic/SList.h>

List of all members.

Public Member Functions

 SListConstIterator ()
 Constructs an iterator pointing to no element.
 SListConstIterator (const SListElement< E > *pX)
 Constructs an iterator pointing to pX.
 SListConstIterator (const SListIterator< E > &it)
 Constructs an iterator that is a copy of it.
 SListConstIterator (const SListConstIterator &it)
 Constructs an iterator that is a copy of it.
bool valid () const
 Returns true iff the iterator points to an element.
bool operator== (const SListConstIterator< E > &it) const
 Equality operator.
bool operator!= (const SListConstIterator< E > &it) const
 Inequality operator.
SListConstIterator< E > succ () const
 Returns successor iterator.
const E & operator* () const
 Returns a reference to the element content.
SListConstIterator< E > & operator= (const SListConstIterator< E > &it)
 Assignment operator.
SListConstIterator< E > & operator++ ()
 Increment operator (prefix).
SListConstIterator< E > operator++ (int)
 Increment operator (postfix).

Private Member Functions

 operator const SListElement< E > * ()
 Conversion to pointer to slist element.

Private Attributes

const SListElement< E > * m_pX
 Pointer to slist element.

Friends

class SListPure< E >

Detailed Description

template<class E>
class ogdf::SListConstIterator< E >

The parameterized class SListIterator<E> encapsulates a constant pointer to an slist element.

It is used in order to iterate over singly linked lists, and to specify a position in a singly linked list. It is possible that an iterator encapsulates a null pointer. In contrast to SListIterator, it is not possible to change the slist element pointed to.

Definition at line 166 of file SList.h.


Constructor & Destructor Documentation

template<class E>
ogdf::SListConstIterator< E >::SListConstIterator ( ) [inline]

Constructs an iterator pointing to no element.

Definition at line 176 of file SList.h.

template<class E>
ogdf::SListConstIterator< E >::SListConstIterator ( const SListElement< E > *  pX) [inline]

Constructs an iterator pointing to pX.

Definition at line 179 of file SList.h.

template<class E>
ogdf::SListConstIterator< E >::SListConstIterator ( const SListIterator< E > &  it) [inline]

Constructs an iterator that is a copy of it.

Definition at line 182 of file SList.h.

template<class E>
ogdf::SListConstIterator< E >::SListConstIterator ( const SListConstIterator< E > &  it) [inline]

Constructs an iterator that is a copy of it.

Definition at line 184 of file SList.h.


Member Function Documentation

template<class E>
ogdf::SListConstIterator< E >::operator const SListElement< E > * ( ) [inline, private]

Conversion to pointer to slist element.

Definition at line 172 of file SList.h.

template<class E>
bool ogdf::SListConstIterator< E >::operator!= ( const SListConstIterator< E > &  it) const [inline]

Inequality operator.

Definition at line 195 of file SList.h.

template<class E>
const E& ogdf::SListConstIterator< E >::operator* ( ) const [inline]

Returns a reference to the element content.

Definition at line 203 of file SList.h.

template<class E>
SListConstIterator<E>& ogdf::SListConstIterator< E >::operator++ ( ) [inline]

Increment operator (prefix).

Definition at line 213 of file SList.h.

template<class E>
SListConstIterator<E> ogdf::SListConstIterator< E >::operator++ ( int  ) [inline]

Increment operator (postfix).

Definition at line 219 of file SList.h.

template<class E>
SListConstIterator<E>& ogdf::SListConstIterator< E >::operator= ( const SListConstIterator< E > &  it) [inline]

Assignment operator.

Definition at line 206 of file SList.h.

template<class E>
bool ogdf::SListConstIterator< E >::operator== ( const SListConstIterator< E > &  it) const [inline]

Equality operator.

Definition at line 190 of file SList.h.

template<class E>
SListConstIterator<E> ogdf::SListConstIterator< E >::succ ( ) const [inline]

Returns successor iterator.

Definition at line 200 of file SList.h.

template<class E>
bool ogdf::SListConstIterator< E >::valid ( ) const [inline]

Returns true iff the iterator points to an element.

Definition at line 187 of file SList.h.


Friends And Related Function Documentation

template<class E>
friend class SListPure< E > [friend]

Definition at line 169 of file SList.h.


Member Data Documentation

template<class E>
const SListElement<E>* ogdf::SListConstIterator< E >::m_pX [private]

Pointer to slist element.

Definition at line 167 of file SList.h.


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