// Iterator.h // singly linked list iterator class for Vector #ifndef ITERATOR #define ITERATOR #include #include "Node.h" // singly linked list forward iterator class Iterator { private: Node *curr; // points to current node public: // initializes curr to currIn Iterator(Node *currIn = NULL); // returns a pointer to the string in the current Node const std::string * operator->() const; // dereference curr, returns plaintext string const std::string operator*() const; // pre-increment operator Iterator &operator++(); // post-increment operator Iterator operator++(int); // for iterator math // for example it = it + 4; Iterator operator+(const int &); // for iterator math // for example it += 4; Iterator operator+=(const int &); // equality operator // is true if 2 iterators are pointing to the same node bool operator==(const Iterator &other); // inequality operator // is true if 2 iterators are pointing to different nodes bool operator!=(const Iterator &other); // returns the node to which the iterator points Node *& getCurr(); private: // YOU MAY ADD ANY OTHER PRIVATE FUNCTIONS HERE }; #endif // ITERATOR