- Main Page
- Modules
- Namespaces
- Classes
- Files
- Related Pages

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# fm::tree< KEY, DATA >::iterator Class Reference

A tree element iterator. More...

`#include <FMTree.h>`

List of all members.

## Public Member Functions
| iterator ()
| Empty constructor.
| iterator (node *n)
| Constructor.
iterator & | operator= (const iterator &copy)
| Copy operator.
bool | operator== (const iterator &other) const
| Retrieves whether this iterator points to the same node as the given iterator.
bool | operator== (const const_iterator &other) const
| See above.
bool | operator!= (const iterator &other) const
| Retrieves whether this iterator points to a different node that a given iterator.
bool | operator!= (const const_iterator &other) const
| See above.
iterator & | operator++ ()
| Advances the iterator to the next ordered tree node.
iterator & | operator-- ()
| Backtrack the iterator to the next ordered tree node.
pair & | operator * ()
| Retrieves the current tree node.
pair * | operator-> ()
| See above.
## Friends
class | tree
class | const_iterator

## Detailed Description

### template<class KEY, class DATA>
class fm::tree< KEY, DATA >::iterator

A tree element iterator.

Similar to the basic STL iterator.

## Constructor & Destructor Documentation

template<class KEY, class DATA>
fm::tree< KEY, DATA >::iterator::iterator | ( | node * | n | ) | `[inline]`

  | Constructor. Parameters:
  | n | The tree node at which to start the iteration.

## Member Function Documentation

template<class KEY, class DATA>
pair& fm::tree< KEY, DATA >::iterator::operator * | ( |  | ) | `[inline]`

| Retrieves the current tree node. Returns: The current tree node.

template<class KEY, class DATA>
bool fm::tree< KEY, DATA >::iterator::operator!= | ( | const iterator & | other | ) | const`[inline]`

  | Retrieves whether this iterator points to a different node that a given iterator. Parameters:
  | other | A second iterator.
Returns: Whether the two iterators are pointing at different nodes.

template<class KEY, class DATA>
iterator& fm::tree< KEY, DATA >::iterator::operator++ | ( |  | ) | `[inline]`

| Advances the iterator to the next ordered tree node. Returns: This iterator.

template<class KEY, class DATA>
iterator& fm::tree< KEY, DATA >::iterator::operator-- | ( |  | ) | `[inline]`

| Backtrack the iterator to the next ordered tree node. Returns: This iterator.

template<class KEY, class DATA>
iterator& fm::tree< KEY, DATA >::iterator::operator= | ( | const iterator & | copy | ) | `[inline]`

  | Copy operator. Parameters:
  | copy | The tree iterator to copy.

template<class KEY, class DATA>
bool fm::tree< KEY, DATA >::iterator::operator== | ( | const iterator & | other | ) | const`[inline]`

  | Retrieves whether this iterator points to the same node as the given iterator. Parameters:
  | other | A second iterator.
Returns: Whether the two iterators are pointing to the same node.

The documentation for this class was generated from the following file:

- FMath/FMTree.h