template <class T> class PP_ListIterator

Iterate over a List for ParmParse

Inheritance:

PP_ListIterator


public members:

PP_ListIterator (const PP_List<T>& aList)
PP_ListIterator (const PP_ListIterator<T>& rhs)
void rewind ()
const T& operator() () const
const T& operator* () const
operator void* ()
bool operator! () const
const T& value () const
PP_ListIterator<T>& operator++ ()
PP_ListIterator<T>& operator-- ()
PP_ListIterator<T> operator-- (int)
PP_ListIterator<T> operator++ (int)
bool operator== (const PP_ListIterator<T>&) const
bool operator!= (const PP_ListIterator<T>&) const

Documentation

The class PP_ListIterator<T> is an iterator over class PP_List<T>.

This class does NOT provide a default constructor or an assignment operator.

This is a convenience class for ParmParse and will not be in any way supported by anyone at ANAG.

PP_ListIterator (const PP_List<T>& aList)
Construct a PP_ListIterator<T> to first element of aList.

PP_ListIterator (const PP_ListIterator<T>& rhs)
The copy constructor.

void rewind ()
Reset this PP_ListIterator<T> to point to the first element in the PP_List<T>.

const T& operator() () const
Return a constant reference to the object in the PP_List<T> currently pointed to by this PP_ListIterator<T>.

const T& operator* () const
Return a constant reference to the object in the PP_List<T> currently pointed to by this PP_ListIterator<T>.

operator void* ()
This is a conversion operator that makes the iterator look like a pointer. This operator makes it easy to check if the iterator is pointing to an element on the PP_List<T>. If the iterator has been moved off the PP_List<T> or if the PP_List<T> is empty, this conversion returns the NULL pointer.

bool operator! () const
Returns true if PP_ListIterator<T> doesn't point to any element on the PP_List<T>.

const T& value () const
Return a constant reference to the object in the PP_List<T> currently pointed to by the iterator.

PP_ListIterator<T>& operator++ ()
This is the prefix auto-increment operator. It advances the PP_ListIterator<T> to point to the next element on the PP_List<T>. It then returns a reference to itself to allow for chaining with other operators.

PP_ListIterator<T>& operator-- ()
This is the prefix auto-decrement operator. It moves the PP_ListIterator<T> to point to the previous element on the PP_List<T>. It then returns a reference to itself to allow for chaining with other operators.

PP_ListIterator<T> operator-- (int)
This is the postfix auto-decrement operator. It moves the PP_ListIterator<T> to point to the previous element on the PP_List<T>. It then returns a PP_ListIterator<T> that points to the old element to allow for chaining with other operators.

PP_ListIterator<T> operator++ (int)
This is the postfix auto-increment operator. It advances the PP_ListIterator<T> to point to the next element on the PP_List<T>. It then returns a PP_ListIterator<T> that points to the old element to allow for chaining with other operators.

bool operator== (const PP_ListIterator<T>&) const
Do the two PP_ListIterator<T>s point to the same PP_List<T> and the same element within the PP_List<T>?

bool operator!= (const PP_ListIterator<T>&) const
Are the PP_ListIterator<T>s not equal?


this class has no child classes.

alphabetic index hierarchy of classes


Chombo

Copyright Notice

This software is copyright (C) by the Lawrence Berkeley National Laboratory. Permission is granted to reproduce this software for non-commercial purposes provided that this notice is left intact.

It is acknowledged that the U.S. Government has rights to this software under Contract DE-AC03-765F00098 between the U.S. Department of Energy and the University of California.

This software is provided as a professional and academic contribution for joint exchange. Thus it is experimental, is provided ``as is'', with no warranties of any kind whatsoever, no support, no promise of updates, or printed documentation. By using this software, you acknowledge that the Lawrence Berkeley National Laboratory and Regents of the University of California shall have no liability with respect to the infringement of other copyrights by any part of this software.