| Top |
| gboolean | (*DzlTrieTraverseFunc) () |
| void | dzl_trie_destroy () |
| void | dzl_trie_unref () |
| DzlTrie * | dzl_trie_ref () |
| void | dzl_trie_insert () |
| gpointer | dzl_trie_lookup () |
| DzlTrie * | dzl_trie_new () |
| gboolean | dzl_trie_remove () |
| void | dzl_trie_traverse () |
gboolean (*DzlTrieTraverseFunc) (DzlTrie *dzl_trie,const gchar *key,gpointer value,gpointer user_data);
void
dzl_trie_unref (DzlTrie *trie);
Drops the reference count by one on trie
. When it reaches zero, the
structure is freed.
void dzl_trie_insert (DzlTrie *trie,const gchar *key,gpointer value);
Inserts value
into trie
located with key
.
gpointer dzl_trie_lookup (DzlTrie *trie,const gchar *key);
Looks up key
in trie
and returns the value associated.
DzlTrie *
dzl_trie_new (GDestroyNotify value_destroy);
Creates a new DzlTrie. When a value is removed from the trie, value_destroy
will be called to allow you to release any resources.
gboolean dzl_trie_remove (DzlTrie *trie,const gchar *key);
Removes key
from trie
, possibly destroying the value associated with
the key.
void dzl_trie_traverse (DzlTrie *trie,const gchar *key,GTraverseType order,GTraverseFlags flags,gint max_depth,DzlTrieTraverseFunc func,gpointer user_data);
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.
trie |
A DzlTrie. |
|
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. |
[scope call][closure user_data] |
user_data |
User data for |