Provides a nlog(n) iterator for AbstractBinaryTree.
More...
#include <vdkbtrees.h>
template<class T, class Node>
class AbstractBinaryTree< T, Node >::Iterator
Provides a nlog(n) iterator for AbstractBinaryTree.
Iterator is implementes as a member of AbstractBinaryTree rather than an external object.
§ Iterator()
template<class T, class Node>
ructor
- Parameters
-
tree | tree reference |
start | where the iterator starts, can be:
- BtMinKey from lowest key
- BtRootKey from the tree root
- BtMaxKey from the highest key
|
§ ~Iterator()
template<class T, class Node>
§ current()
template<class T, class Node>
Dereferencing operator returns the object of the node currently pointed to by the iterator.
§ Next()
template<class T, class Node>
Move iterator to next key
§ Object()
template<class T, class Node>
returns a pointer to the object of the node currently pointed to (as opposed to returning a copy of the node, as the dereferencing operator does).
§ operator int()
template<class T, class Node>
Returns o if iterator points a non valid node. ie: was moved behind the lowest/highest key
§ operator*()
template<class T, class Node>
Dereferencing operator returns the object of the node currently pointed to by the iterator.
§ operator++() [1/2]
template<class T, class Node>
Move iterator to next key
§ operator++() [2/2]
template<class T, class Node>
Move iterator to next key
§ operator--() [1/2]
template<class T, class Node>
Move iterator to prev key
§ operator--() [2/2]
template<class T, class Node>
Move iterator to prev key
§ Parent()
template<class T, class Node>
Move iterator to parent node
§ Previous()
template<class T, class Node>
Move iterator to prev key
§ RefObject()
template<class T, class Node>
returns a pointer to the object of the node currently pointed to (as opposed to returning a copy of the node, as the dereferencing operator does).
§ StartAt()
template<class T, class Node>
Starts iterator over at the minimum, maximum or root node of the binary tree.
The documentation for this class was generated from the following file: