#ifndef ITERATOR_H #define ITERATOR_H #include "nosuchobject.h" #include "list.h" using namespace std; template class List; template class ListIterator { friend class List; public: ListIterator(); void add( const T &object ); bool hasNext() const; bool hasPrevious() const; T &next() throw ( NoSuchObject ); T &previous() throw ( NoSuchObject ); void set( const T & ); void printInternal() const; private: Node *current; bool atFront, atEnd; }; // ListIterator class #endif