[view source]
A tree is created with cp_avltree_create_by_option(3) and deallocated with cp_avltree_destroy(3). After creation behavior may be changed by calling cp_avltree_unset_mode(3) to set and unset mode bits. Mappings may be added with cp_avltree_insert(3), retrieved with cp_avltree_delete(3). For more details see the documentation for specific functions.
cp_avltree *cp_avltree_create(cp_compare_fn cmp);
cp_avltree *
cp_avltree_create_by_option(int mode,
cp_compare_fn compare_fn,
cp_copy_fn copy_key,
cp_destructor_fn free_key);
cp_copy_fn copy_value
cp_destructor_fn free_value);
void cp_avltree_destroy(cp_avltree *tree);
void cp_avltree_destroy_custom(cp_avltree *tree,
cp_destructor_fn dk,
cp_destructor_fn dv);
void *cp_avltree_insert(cp_avltree *tree, void *key, void *value);
void *cp_avltree_get(cp_avltree *tree, void *key);
void *cp_avltree_delete(cp_avltree *tree, void *key);
int cp_avltree_contains(cp_avltree *tree, void *key);
long cp_avltree_count(cp_avltree *tree);
int cp_avltree_get_mode(cp_avltree *tree);
void cp_avltree_set_mode(cp_avltree *tree, int mode);
void cp_avltree_unset_mode(cp_avltree *tree, int mode);
int cp_avltree_lock(cp_avltree *tree, int type);
int cp_avltree_unlock(cp_avltree *tree);
int cp_avltree_rdlock(cp_avltree *tree);
int cp_avltree_wrlock(cp_avltree *tree);
This document was created by
man2html,
using the manual pages. Time: 12:01:45 GMT, May 23, 2006 |