The member variable Object* state has been added, which collection classes can use to associate additional state information with an Iterator. For example, a collection class implemented as a tree structure can use state to point to a Stack used to maintain the state of a traversal of the tree. The destructor for class Iterator calls a new virtual function, doFinish(), which a class that uses state can reimplement to delete the state object when the Iterator is destroyed.
The storeOn() format has changed as a result of these modifications.
The function Object* Iterator::operator()() has been added to return a pointer to the current object, or 0 if there is none.