#ifndef HASH_TABLE_ENUMERATOR #define HASH_TABLE_ENUMERATOR #include "Enumerator.h" #include "Exceptions.h" #include "HashTable.h" template class HashTableEnumerator : public Enumerator { private: unsigned long bucket = 0; // the current bucket during the enumeration process OULinkedListEnumerator* chainEnumerator = NULL; // used to move through the linked list of the current bucket HashTable* hashTable = NULL; // pointer to the HashTable being enumerated // you may add additional member variables and functions here to support the operation of your code public: HashTableEnumerator(HashTable* hashTable); // constructor needs a pointer to the HashTable to be enumerated virtual ~HashTableEnumerator(); bool hasNext() const; // true if there are elements that have not yet been returned via next() T next(); // throws ExceptionEnumerationBeyondEnd if no next item is available T peek() const; // throws ExceptionEnumerationBeyondEnd if no next item is available }; // put implementation for HashTableEnumerator here #endif // !HASH_TABLE_ENUMERATOR