Tree

class Tree(pointer: <Error class: unknown class><<Error class: unknown class>>) : Record

The GTree struct is an opaque data structure representing a glib-Balanced-Binary-Trees. It should be accessed only by using the following functions.

Skipped during bindings generation

  • parameter key: gpointer

  • parameter key: gpointer

  • parameter key: gpointer

  • parameter lookup_key: gpointer

  • parameter key: gpointer

  • parameter key: gpointer

  • method node_first: Return type TreeNode is unsupported

  • method node_last: Return type TreeNode is unsupported

  • parameter key: gpointer

  • parameter key: gpointer

  • parameter key: gpointer

  • method search: Return type gpointer is unsupported

  • method search_node: Return type TreeNode is unsupported

  • parameter key: gpointer

  • method traverse: C function g_tree_traverse is ignored

  • parameter key: gpointer

  • parameter value_destroy_func: DestroyNotify

Constructors

Link copied to clipboard
constructor(pointer: <Error class: unknown class><<Error class: unknown class>>)

Types

Link copied to clipboard
object Companion : RecordCompanion<Tree, <Error class: unknown class>>

Properties

Link copied to clipboard
val glibTreePointer: <Error class: unknown class><<Error class: unknown class>>

Functions

Link copied to clipboard
fun destroy()

Removes all keys and values from the #GTree and decreases its reference count by one. If keys and/or values are dynamically allocated, you should either free them first or create the #GTree using g_tree_new_full(). In the latter case the destroy functions you supplied will be called on all keys and values before destroying the #GTree.

Link copied to clipboard

Calls the given function for each of the key/value pairs in the #GTree. The function is passed the key and value of each pair, and the given

Link copied to clipboard

Calls the given function for each of the nodes in the #GTree. The function is passed the pointer to the particular node, and the given

Link copied to clipboard
fun height(): Int

Gets the height of a #GTree.

Link copied to clipboard
fun nnodes(): Int

Gets the number of nodes in a #GTree.

Link copied to clipboard
fun ref(): Tree

Increments the reference count of @tree by one.

Link copied to clipboard
fun removeAll()

Removes all nodes from a #GTree and destroys their keys and values, then resets the #GTree’s root to null.

Link copied to clipboard
fun unref()

Decrements the reference count of @tree by one. If the reference count drops to 0, all keys and values will be destroyed (if destroy functions were specified) and all memory allocated by @tree will be released.