#ifndef AVL_TREE_ENUMERATOR #define AVL_TREE_ENUMERATOR #include #include "Enumerator.h" #include "AVLTreeOrder.h" template class AVLTree; template class AVLTreeEnumerator : public Enumerator { private: AVLTreeOrder order; std::stack*> traversalStack; void buildTraversalStack(const AVLTree* current); public: AVLTreeEnumerator(const AVLTree* root, AVLTreeOrder order = AVLTreeOrder::inorder); virtual ~AVLTreeEnumerator(); bool hasNext() const; T next(); // throws ExceptionEnumerationBeyondEnd if no next item is available T peek() const; // throws ExceptionEnumerationBeyondEnd if no next item is available AVLTreeOrder getOrder(); // returns the order of this enumerator (preorder, inorder, or postorder) }; // Add your implementation below this line. #endif // !AVL_TREE_ENUMERATOR