Trie.traverse

Traverses all nodes of @trie 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.

class Trie
void
traverse
(
string key
,
GTraverseType order
,
GTraverseFlags flags
,,
DzlTrieTraverseFunc func
,
void* userData
)

Parameters

key
Type: string

The key to start traversal from.

order
Type: GTraverseType

The order to traverse.

flags
Type: GTraverseFlags

The flags for which nodes to callback.

maxDepth
Type: int

the maximum depth to process.

func
Type: DzlTrieTraverseFunc

The func to execute for each matching node.

userData
Type: void*

User data for @func.

Meta