Open
Graph Drawing
Framework

 v.2012.07
 

ogdf::ListIterator< E > Class Template Reference

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

#include <ogdf/basic/List.h>

List of all members.

Public Member Functions

 ListIterator ()
 Constructs an iterator pointing to no element.
 ListIterator (ListElement< E > *pX)
 Constructs an iterator pointing to pX.
 ListIterator (const ListIterator< E > &it)
 Constructs an iterator that is a copy of it.
bool operator!= (const ListIterator< E > &it) const
 Inequality operator.
E & operator* () const
 Returns a reference to the element content.
ListIterator< E > & operator++ ()
 Increment operator (prefix).
ListIterator< E > operator++ (int)
 Increment operator (postfix).
ListIterator< E > & operator-- ()
 Decrement operator (prefix).
ListIterator< E > operator-- (int)
 Decrement operator (postfix).
ListIterator< E > & operator= (const ListIterator< E > &it)
 Assignment operator.
bool operator== (const ListIterator< E > &it) const
 Equality operator.
ListIterator< E > pred () const
 Returns predecessor iterator.
ListIterator< 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 > * () const
 Conversion to pointer to list element.
 operator ListElement< E > * ()
 Conversion to pointer to list element.

Private Attributes

ListElement< E > * m_pX

Friends

class ListConstIterator< E >
class ListPure< E >

Detailed Description

template<class E>
class ogdf::ListIterator< E >

The parameterized class ListIterator<E> encapsulates a pointer to a dlist 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.

Definition at line 95 of file List.h.


Constructor & Destructor Documentation

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

Constructs an iterator pointing to no element.

Definition at line 108 of file List.h.

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

Constructs an iterator pointing to pX.

Definition at line 110 of file List.h.

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

Constructs an iterator that is a copy of it.

Definition at line 112 of file List.h.


Member Function Documentation

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

Conversion to pointer to list element.

Definition at line 104 of file List.h.

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

Conversion to pointer to list element.

Definition at line 102 of file List.h.

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

Inequality operator.

Definition at line 123 of file List.h.

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

Returns a reference to the element content.

Definition at line 134 of file List.h.

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

Increment operator (prefix).

Definition at line 143 of file List.h.

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

Increment operator (postfix).

Definition at line 149 of file List.h.

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

Decrement operator (prefix).

Definition at line 156 of file List.h.

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

Decrement operator (postfix).

Definition at line 162 of file List.h.

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

Assignment operator.

Definition at line 137 of file List.h.

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

Equality operator.

Definition at line 118 of file List.h.

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

Returns predecessor iterator.

Definition at line 131 of file List.h.

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

Returns successor iterator.

Definition at line 128 of file List.h.

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

Returns true iff the iterator points to an element.

Definition at line 115 of file List.h.


Friends And Related Function Documentation

template<class E>
friend class ListConstIterator< E >
friend

Definition at line 98 of file List.h.

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

Definition at line 99 of file List.h.


Member Data Documentation

template<class E>
ListElement<E>* ogdf::ListIterator< E >::m_pX
private

Definition at line 96 of file List.h.


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