Open
Graph Drawing
Framework

 v.2012.07
 

ogdf::ListConstIterator< E > Class Template Reference

The parameterized class ListIterator<E> encapsulates a constant pointer to a list element. More...

#include <ogdf/basic/List.h>

List of all members.

Public Member Functions

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

Private Member Functions

 operator const ListElement< E > * ()
 Conversion to pointer to list element.

Private Attributes

const ListElement< E > * m_pX

Friends

class ListPure< E >

Detailed Description

template<class E>
class ogdf::ListConstIterator< E >

The parameterized class ListIterator<E> encapsulates a constant pointer to a list element.

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

Definition at line 185 of file List.h.


Constructor & Destructor Documentation

template<class E>
ogdf::ListConstIterator< E >::ListConstIterator ( )
inline

Constructs an iterator pointing to no element.

Definition at line 195 of file List.h.

template<class E>
ogdf::ListConstIterator< E >::ListConstIterator ( const ListElement< E > *  pX)
inline

Constructs an iterator pointing to pX.

Definition at line 198 of file List.h.

template<class E>
ogdf::ListConstIterator< E >::ListConstIterator ( const ListIterator< E > &  it)
inline

Constructs an iterator that is a copy of it.

Definition at line 201 of file List.h.

template<class E>
ogdf::ListConstIterator< E >::ListConstIterator ( const ListConstIterator< E > &  it)
inline

Constructs an iterator that is a copy of it.

Definition at line 203 of file List.h.


Member Function Documentation

template<class E>
ogdf::ListConstIterator< E >::operator const ListElement< E > * ( )
inlineprivate

Conversion to pointer to list element.

Definition at line 191 of file List.h.

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

Inequality operator.

Definition at line 214 of file List.h.

template<class E>
const E& ogdf::ListConstIterator< E >::operator* ( ) const
inline

Returns a reference to the element content.

Definition at line 225 of file List.h.

template<class E>
ListConstIterator<E>& ogdf::ListConstIterator< E >::operator++ ( )
inline

Increment operator (prefix).

Definition at line 234 of file List.h.

template<class E>
ListConstIterator<E> ogdf::ListConstIterator< E >::operator++ ( int  )
inline

Increment operator (postfix).

Definition at line 240 of file List.h.

template<class E>
ListConstIterator<E>& ogdf::ListConstIterator< E >::operator-- ( )
inline

Decrement operator (prefix).

Definition at line 247 of file List.h.

template<class E>
ListConstIterator<E> ogdf::ListConstIterator< E >::operator-- ( int  )
inline

Decrement operator (postfix).

Definition at line 253 of file List.h.

template<class E>
ListConstIterator<E>& ogdf::ListConstIterator< E >::operator= ( const ListConstIterator< E > &  it)
inline

Assignment operator.

Definition at line 228 of file List.h.

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

Equality operator.

Definition at line 209 of file List.h.

template<class E>
ListConstIterator<E> ogdf::ListConstIterator< E >::pred ( ) const
inline

Returns predecessor iterator.

Definition at line 222 of file List.h.

template<class E>
ListConstIterator<E> ogdf::ListConstIterator< E >::succ ( ) const
inline

Returns successor iterator.

Definition at line 219 of file List.h.

template<class E>
bool ogdf::ListConstIterator< E >::valid ( ) const
inline

Returns true iff the iterator points to an element.

Definition at line 206 of file List.h.


Friends And Related Function Documentation

template<class E>
friend class ListPure< E >
friend

Definition at line 188 of file List.h.


Member Data Documentation

template<class E>
const ListElement<E>* ogdf::ListConstIterator< E >::m_pX
private

Definition at line 186 of file List.h.


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