#ifndef _ITERATOR_H #define _ITERATOR_H // author: Owen Astrachan // for cps 100, 8/23/95 // modified for abstract base class 11/8/95 template class Iterator { public: virtual ~Iterator() {}; virtual void First() = 0; // must call for first element virtual bool IsDone() const = 0; // true -> no more elements virtual void Next() = 0; // advance to next element virtual const Kind & Current() const = 0; // return current element virtual Kind & Current() = 0; // return modifiable current }; #endif