lcs::Iterator< T > Class Template Reference

#include <iterator.h>

Inheritance diagram for lcs::Iterator< T >:

lcs::ListIterator< T > List of all members.

Detailed Description

template<class T>
class lcs::Iterator< T >

An abstract base class which can be subclassed to generate iterators for conatiner classes. Under normal circumstances, a user of libLCS will not use this class directly.


Public Member Functions

 Iterator ()
virtual ~Iterator ()
virtual bool hasNext ()=0
virtual T next ()=0
virtual void reset ()=0


Constructor & Destructor Documentation

template<class T>
lcs::Iterator< T >::Iterator (  )  [inline]

The default constructor.

template<class T>
virtual lcs::Iterator< T >::~Iterator (  )  [inline, virtual]

Destrcutor.


Member Function Documentation

template<class T>
virtual bool lcs::Iterator< T >::hasNext (  )  [pure virtual]

Indicates if there are any more elements in a container at the current state of iteration. Returns true if yes, false if not.

Implemented in lcs::ListIterator< T >.

template<class T>
virtual T lcs::Iterator< T >::next (  )  [pure virtual]

Returns the next element in the container if it exists. Else, the behaviour is undefined.

Implemented in lcs::ListIterator< T >.

template<class T>
virtual void lcs::Iterator< T >::reset (  )  [pure virtual]

Resets the iterator to the first element of the container class.

Implemented in lcs::ListIterator< T >.


Generated on Sat Oct 14 11:23:40 2006 for libLCS by  doxygen 1.4.7