// ConstIterator.h // this iterator traverses a BST in alphabetic order, low to high #ifndef CONSTITERATOR_CLASS #define CONSTITERATOR_CLASS #include "Bst.h" #include "Entry.h" class ConstIterator { Bst *root; // points to BST to which we are referring Entry *curr; // points to current Entry public: // initialize curr to currIn ConstIterator( Bst *bstIn = NULL, Entry *currIn = NULL ); // "dereference" curr, returns pointer to Entry Entry *operator->(); // pre-increment operator ConstIterator &operator++(); // post-increment operator ConstIterator operator++( int ); // pre-decrement operator ConstIterator &operator--(); // post-decrement operator ConstIterator operator--( int ); // equality operator bool operator==( const ConstIterator &other ); // inequality operator bool operator!=( const ConstIterator &other ); // points to first word in BST void setToFirstWord(); // points to last node in BST void setToLastWord(); private: // YOU MAY PLACE ANY FUNCTIONS HERE THAT YOU WISH }; #endif //CONSTITERATOR_CLASS