Open
Graph Drawing
Framework

 v.2007.11
 

ogdf::ListIterator< E > Class Template Reference

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

#include <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 valid () const
 Returns true iff the iterator points to an element.
bool operator== (const ListIterator< E > &it) const
 Equality operator.
bool operator!= (const ListIterator< E > &it) const
 Inequality operator.
ListIterator< E > succ () const
 Returns successor iterator.
ListIterator< E > pred () const
 Returns predecessor iterator.
E & operator * () const
 Returns a reference to the element content.
ListIterator< E > & operator= (const ListIterator< E > &it)
 Assignment operator.
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).
void * operator new (size_t nBytes)
void * operator new (size_t, void *p)
void operator delete (void *p, size_t nBytes)

Private Member Functions

 operator ListElement< E > * ()
 Conversion to pointer to list element.
 operator const ListElement< E > * () const
 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 102 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 115 of file List.h.

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

Constructs an iterator pointing to pX.

Definition at line 117 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 119 of file List.h.


Member Function Documentation

template<class E>
ogdf::ListIterator< E >::operator ListElement< E > * (  )  [inline, private]

Conversion to pointer to list element.

Definition at line 109 of file List.h.

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

Conversion to pointer to list element.

Definition at line 111 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 122 of file List.h.

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

Equality operator.

Definition at line 125 of file List.h.

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

Inequality operator.

Definition at line 130 of file List.h.

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

Returns successor iterator.

Definition at line 135 of file List.h.

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

Returns predecessor iterator.

Definition at line 138 of file List.h.

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

Returns a reference to the element content.

Definition at line 141 of file List.h.

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

Assignment operator.

Definition at line 144 of file List.h.

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

Increment operator (prefix).

Definition at line 150 of file List.h.

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

Increment operator (postfix).

Definition at line 156 of file List.h.

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

Decrement operator (prefix).

Definition at line 163 of file List.h.

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

Decrement operator (postfix).

Definition at line 169 of file List.h.

template<class E>
void* ogdf::ListIterator< E >::operator new ( size_t  nBytes  )  [inline]

Definition at line 175 of file List.h.

template<class E>
void* ogdf::ListIterator< E >::operator new ( size_t  ,
void *  p 
) [inline]

Definition at line 175 of file List.h.

template<class E>
void ogdf::ListIterator< E >::operator delete ( void *  p,
size_t  nBytes 
) [inline]

Definition at line 175 of file List.h.


Friends And Related Function Documentation

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

Definition at line 105 of file List.h.

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

Definition at line 106 of file List.h.


Member Data Documentation

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

Definition at line 103 of file List.h.


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

© 1999-2007 by oreas GmbH, © 2005-2007 by University Dortmund and University Cologne.

Generated on Thu Nov 22 19:40:08 2007 by doxygen 1.5.4.