G_Tree_Lookup_Extended

G_Tree_Lookup_Extended



gboolean g_tree_lookup_extended (GTree *tree, gconstpointer lookup_key, gpointer *orig_key, gpointer *value) Looks up a key in the GTree , returning the original key and the associated value. This is useful if you need to free the memory allocated for the original key, for example before calling g_tree_remove() .


g_tree_lookup_extended gboolean g_tree_lookup_extended (GTree *tree, gconstpointer lookup_key, gpointer *orig_key, gpointer *value) Looks up a key in the GTree, returning the original key and the associated value and a gboolean which is TRUE if the key was found. This is useful if.


g_tree_lookup_extended ( tree , key , key_ptr_addr , value_ptr_addr ) Upon a match, this function sets the pointer behind key_ptr_addr to the key of the matching node, and likewise with value_ptr_addr and the matching value. The return value is TRUE if there’s a match, and FALSE otherwise. Use this function only if you need to access the key in …


* g_tree_lookup() and g_tree_lookup_extended (). * * To find out the number of nodes in a #GTree, use g_tree_nnodes(). To * get the height of a #GTree, use g_tree_height(). * * To traverse a #GTree, calling a function for each node visited in * the traversal, use g_tree_foreach(). * * To destroy a #GTree, use g_tree_destroy(). * */ # define MAX …


Balanced Binary Trees : GLib Reference Manual, Balanced Binary Trees : GLib Reference Manual, Balanced Binary Trees : GLib Reference Manual, Description The GTree structure and its associated functions provide a sorted collection of key/value pairs optimized for searching and traversing in order.. To create a new GTree use g_tree_new().. To insert a key/value pair into a GTree use g_tree_insert().. To lookup the value corresponding to a given key, use g_tree_lookup() and g_tree_lookup_extended ().

Advertiser