Trie

Constructors

this
this(DzlTrie* dzlTrie, bool ownedRef = false)

Sets our main struct and passes it to the parent class.

this
this(GDestroyNotify valueDestroy)

Creates a new #DzlTrie. When a value is removed from the trie, @value_destroy will be called to allow you to release any resources.

Destructor

A destructor is present on this object, but not explicitly documented in the source.

Members

Functions

destroy
void destroy()

This is an alias for dzl_trie_unref().

getStruct
void* getStruct()

the main Gtk struct as a void*

getTrieStruct
DzlTrie* getTrieStruct(bool transferOwnership = false)

Get the main Gtk struct

insert
void insert(string key, void* value)

Inserts @value into @trie located with @key.

lookup
void* lookup(string key)

Looks up @key in @trie and returns the value associated.

ref_
Trie ref_()
remove
bool remove(string key)

Removes @key from @trie, possibly destroying the value associated with the key.

traverse
void traverse(string key, GTraverseType order, GTraverseFlags flags, int maxDepth, DzlTrieTraverseFunc func, void* userData)

Traverses all nodes of @trie according to the parameters. For each node matching the traversal parameters, @func will be executed.

unref
void unref()

Drops the reference count by one on @trie. When it reaches zero, the structure is freed.

Static functions

getType
GType getType()

Variables

dzlTrie
DzlTrie* dzlTrie;

the main Gtk struct

Meta