class RefTrieIterator

Iterator on a trie. More...

Definition#include <ref_trie.hh>
Template formRefTrieIterator<class A, class Payload>
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Types

Public Methods


Detailed Description

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. This does not guarantees that keys returned are sorted by prefix length.

typedef IPNet<A> Key

Key

typedef RefTrieNode<A, Payload> Node

Node

 RefTrieIterator ()

RefTrieIterator

Constructors

 RefTrieIterator (const RefTrie<A,Payload>* trie, Node *n)

RefTrieIterator

constructor for exact searches: both the current node and the search key are taken from n, so the iterator will only loop once.

 RefTrieIterator (const RefTrie<A,Payload>* trie, Node *n, const Key &k)

RefTrieIterator

construct for subtree scanning: the root key is set explicitly, and the current node is set according to the search order.

 RefTrieIterator (const RefTrieIterator& x)

RefTrieIterator

 ~RefTrieIterator ()

~RefTrieIterator

RefTrieIterator  operator ++ (int)

operator ++

Postfix increment

Updates position of iterator in tree.

Returns: position of iterator before increment.

RefTrieIterator&  operator ++ ()

operator ++

Prefix increment

Updates position of iterator in tree.

Returns: position of iterator after increment.

void  next ()

next

[const]

inline void  force_valid ()

force_valid

[const]

inline Node * cur ()

cur

[const]

bool  operator== (const RefTrieIterator & x)

operator==

[const]

bool  operator!= (const RefTrieIterator & x)

operator!=

[const]

Payload &  payload ()

payload

const Key &  key ()

key

[const]

RefTrieIterator&  operator= (const RefTrieIterator& x)

operator=


Generated by: pavlin on possum.icir.org on Mon Jun 9 13:23:43 2003, using kdoc 2.0a54+XORP.