seal::AbstractIterator< T > Class Template Reference

#include <iterator.h>

Inheritance diagram for seal::AbstractIterator< T >:

seal::Array1D< T >::Iterator seal::BinTreeBreadthFirstIterator< T > seal::LinkedList< T >::Iterator seal::Vector< T >::Iterator

List of all members.

Public Member Functions

virtual bool hasNext (void)=0
virtual T next (void)=0 throw (OutOfBoundsException)
virtual void reset (void)=0


Detailed Description

template<typename T>
class seal::AbstractIterator< T >

This class is an abstract base class which defines the interface for concrete iterator classes of the collections provided in SEAL. User defined collections should also have a concrete iterator class derived from this class.

Member Function Documentation

template<typename T>
virtual bool seal::AbstractIterator< T >::hasNext ( void   )  [pure virtual]

In a derived concrete class, this function will return true if the iterator can iterate to a next element. It will return false otherwise.

Implemented in seal::Array1D< T >::Iterator, seal::BinTreeBreadthFirstIterator< T >, seal::LinkedList< T >::Iterator, seal::Map< IndexType, DataType >::Iterator, seal::PriorityQueue< PrtType, DataType >::Iterator, and seal::Vector< T >::Iterator.

template<typename T>
virtual T seal::AbstractIterator< T >::next ( void   )  throw (OutOfBoundsException) [pure virtual]

In a derived concrete class, this function will return the next element to which the iterator iterates to. An OutOfBoundsException is thrown in case the user requests the iterator to iterate beyond the bounds of the respective collection object.

Implemented in seal::Array1D< T >::Iterator, seal::BinTreeBreadthFirstIterator< T >, seal::LinkedList< T >::Iterator, seal::Map< IndexType, DataType >::Iterator, seal::PriorityQueue< PrtType, DataType >::Iterator, and seal::Vector< T >::Iterator.

template<typename T>
virtual void seal::AbstractIterator< T >::reset ( void   )  [pure virtual]

In a derived concrete class, this function will reset the iterator to the first element of the collection. In other words, the iterator is reset so that it can iterate over the entire collection starting from the first element of the collection.

Implemented in seal::Array1D< T >::Iterator, seal::BinTreeBreadthFirstIterator< T >, seal::LinkedList< T >::Iterator, seal::Map< IndexType, DataType >::Iterator, seal::PriorityQueue< PrtType, DataType >::Iterator, and seal::Vector< T >::Iterator.


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

Generated on Sat May 16 21:35:20 2009 for SEAL by  doxygen 1.5.5