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 string

The key to start traversal from.

order GTraverseType

The order to traverse.

flags GTraverseFlags

The flags for which nodes to callback.

maxDepth int

the maximum depth to process.

func DzlTrieTraverseFunc

The func to execute for each matching node.

userData void*

User data for @func.

Meta