BBTree.insert

Inserts a key/value pair into a GTree

If the given key already exists in the GTree its corresponding value is set to the new value. If you supplied a value_destroy_func when creating the GTree, the old value is freed using that function. If you supplied a key_destroy_func when creating the GTree, the passed key is freed using that function.

The tree is automatically 'balanced' as new key/value pairs are added, so that the distance from the root to every leaf is as small as possible.

class BBTree
void
insert
(
void* key
,
void* value
)

Parameters

key void*

the key to insert

value void*

the value corresponding to the key