RefTriePostOrderIterator< A, Payload > Class Template Reference

Postorder Iterator on a trie. More...

#include <ref_trie.hh>

List of all members.

Public Types

typedef IPNet< A > Key
typedef ::RefTrie< A, Payload > RefTrie
typedef RefTrieNode< A, Payload > Node

Public Member Functions

 RefTriePostOrderIterator ()
 RefTriePostOrderIterator (const RefTrie *trie, Node *n)
 constructor for exact searches: both the current node and the search key are taken from n, so the iterator will only loop once.
 RefTriePostOrderIterator (const RefTrie *trie, Node *n, const Key &k)
 construct for subtree scanning: the root key is set explicitly, and the current node is set according to the search order.
 RefTriePostOrderIterator (const RefTriePostOrderIterator &x)
RefTriePostOrderIteratorbegin ()
 move to the starting position according to the visiting order
RefTriePostOrderIterator operator++ (int)
 Postfix increment.
RefTriePostOrderIteratoroperator++ ()
 Prefix increment.
 operator RefTriePreOrderIterator< A, Payload > () const
 Conversion operator.
void next () const
void force_valid () const
Nodecur () const
bool operator== (const RefTriePostOrderIterator &x) const
bool operator!= (const RefTriePostOrderIterator &x) const
Payload & payload ()
const Keykey () const
RefTriePostOrderIteratoroperator= (const RefTriePostOrderIterator &x)

Private Member Functions

bool node_is_left (Node *n) const

Private Attributes

Key _root
const RefTrie * _trie


class RefTriePreOrderIterator< A, Payload >

Detailed Description

template<class A, class Payload>
class RefTriePostOrderIterator< A, Payload >

Postorder Iterator on a trie.

_cur points to the current object, _root contains the search key for root of the subtree we want to scan. The iterator skips over empty nodes, and visits the subtree in depth-first, left-to-right order. The keys returned by this iterator are not sorted by prefix length.

Member Function Documentation

template<class A, class Payload>
RefTriePostOrderIterator< A, Payload >::operator RefTriePreOrderIterator< A, Payload > ( ) const [inline]

Conversion operator.

Converts into a PreOrderIterator

template<class A, class Payload>
RefTriePostOrderIterator& RefTriePostOrderIterator< A, Payload >::operator++ ( ) [inline]

Prefix increment.

Updates position of iterator in tree.

position of iterator after increment.
template<class A, class Payload>
RefTriePostOrderIterator RefTriePostOrderIterator< A, Payload >::operator++ ( int  ) [inline]

Postfix increment.

Updates position of iterator in tree.

position of iterator before increment.

The documentation for this class was generated from the following file:
 All Classes Namespaces Functions Variables Typedefs Enumerations