#include "uviterator.h" // author: Owen Astrachan // for cps 100, 11/8/95 template UVMapIterator::UVMapIterator(Vector & list, int size) : myList(list), myMaxIndex(size) { } template void UVMapIterator::First() { myIndex = 0; } template bool UVMapIterator::IsDone() const { return myIndex >= myMaxIndex; } template void UVMapIterator::Next() { myIndex++; } template const Kind & UVMapIterator::Current() const { if (! IsDone()) { return myList[myIndex]; } else { cerr << "bad call of current, iterator done" << endl; } } template Kind & UVMapIterator::Current() { if (! IsDone()) { return myList[myIndex]; } else { cerr << "bad call of current, iterator done" << endl; } }