For use with CMSC-341, Spring 99, Project 2 Here is the definition of the ListIterator class. Copy it to your ListIterator.H file. Remember: -- implement the inline method(s) -- guard the file -- complete the documentation ------------------------------------------------ /* Iterators over Lists. Forward and reverse iterators can be chosen by argument to the constructor. This is an abstract class -- it does not implement the Next() method of Iterator, its superclass. Author: Thomas Anastasio Version: 28 February 1999 */ template class ListIterator : public Iterator { private: List * _list; // the list iterated over int _current; // current position protected: inline void SetCurrent(int cur); // mutator for _current inline void SetList(List *); // mutator for _list inline List * GetList(); // accessor for _list // Constructor for iterator // Param: lst the list over which to iterate. // Param: direction the direction in which to iterate // (FORWARD or REVERSE see IteratorConstants.H) // Defaults to FORWARD unless REVERSE is chosen ListIterator(List* lst, int direction); public: // Accessor for the current position // Return: the current position inline int GetCurrent(); bool HasNext(); };