Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

Iter Class Reference

A template for iterators (using the iterhelper). More...

#include <suifkernel/iter.h>

Inheritance diagram for Iter:

IterHelper List of all members.

Public Methods

virtual T& current () const
 Iter ( Iterator* iter )
 Iter ( const Iter &other )
virtual ~Iter (void)


Detailed Description

template<class T> class Iter

A template for iterators (using the iterhelper).

Common usage:

 for (Iter<Expression*> iter = st->get_expression_iterator(); 
      iter.is_valid(); iter.next()) {
     Expression *e = iter.current();
 }
An iterator is an ordered collection of objects. It has a concept of a current element position which is initialized to the first element of the collection. One can advance the position by using next or set it back by using previous.

The current element can be retrieved with current. Other useful methods:


Constructor & Destructor Documentation

template<class T>
Iter<T>::Iter<T> (
Iterator * iter)

template<class T>
Iter<T>::Iter<T> (
const Iter<T> & other)

template<class T>
Iter<T>::~Iter<T> (
void) [inline, virtual]


Member Function Documentation

template<class T>
T & Iter<T>::current (
void) const [inline, virtual]

Reimplemented from IterHelper.


The documentation for this class was generated from the following file:
Generated at Mon Jul 31 13:43:20 2000 for NCI SUIF by doxygen 1.1.2 written by Dimitri van Heesch, © 1997-2000