[view source]
cp_narytree instances may be created with a specifiable degree of internal or external synchronization and entry memory management.
A tree is created with cp_narytree_create_by_option(3) and deallocated with cp_narytree_destroy(3). After creation behavior may be changed by calling cp_narytree_unset_mode(3) to set and unset mode bits. Mappings may be added with cp_narytree_insert(3), retrieved with cp_narytree_delete(3). For more details see the documentation for specific functions.
cp_narytree *cp_narytree_create(int order, cp_compare_fn cmp);
cp_narytree *
cp_narytree_create_by_option(int mode,
int order,
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_narytree_destroy(cp_narytree *tree);
void cp_narytree_destroy_custom(cp_narytree *tree,
cp_destructor_fn key_dtr,
cp_destructor_fn value_dtr);
void *cp_narytree_insert(cp_narytree *tree, void *key, void *value);
void *cp_narytree_get(cp_narytree *tree, void *key);
void *cp_narytree_delete(cp_narytree *tree, void *key);
int cp_narytree_contains(cp_narytree *tree, void *key);
int cp_narytree_callback(cp_narytree *tree,
cp_callback_fn callback,
void *prm)
long cp_narytree_count(cp_narytree *tree);
int cp_narytree_get_mode(cp_narytree *tree);
void cp_narytree_set_mode(cp_narytree *tree, int mode);
void cp_narytree_unset_mode(cp_narytree *tree, int mode);
int cp_narytree_lock(cp_narytree *tree, int type);
int cp_narytree_unlock(cp_narytree *tree);
int cp_narytree_rdlock(cp_narytree *tree);
int cp_narytree_wrlock(cp_narytree *tree);
This document was created by
man2html,
using the manual pages. Time: 17:58:11 GMT, September 08, 2006 |