#ifndef _ListItr_H #define _ListItr_H // ListItr class; maintains "current position" within a List // // CONSTRUCTION: Package friendly only, with a ListNode // // ******************PUBLIC OPERATIONS********************* // bool isPastEnd( ) --> True if past end position in list // void advance( ) --> Advance (if not already null) // Object retrieve --> Return item in current position #include "ListNode.H" // partial calss declarations for friends template class List; template class ListItr { public: ListItr( ); bool isPastEnd( ) const; void advance( ); const Object & retrieve( ) const; private: // current position within the list ListNode *current; // private constructor for List to use ListItr( ListNode *theNode ); friend class List; // Grant access to constructor }; #endif