traverse
Description:
public void traverse (string key, TraverseType order, TraverseFlags flags, int max_depth, TrieTraverseFunc func)
Traverses all nodes of this according to the parameters.
For each node matching the traversal parameters, func
will be executed.
Only g_pre_order and g_post_order are supported for order
.
If max_depth
is less than zero, the entire tree will be traversed. If max_depth is 1, then only the root will be traversed.
Parameters:
this |
A Trie. |
key |
The key to start traversal from. |
order |
The order to traverse. |
flags |
The flags for which nodes to callback. |
max_depth |
the maximum depth to process. |
func |
The func to execute for each matching node. |
user_data |
User data for |