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);
COLLECTION_MODE_DEEP COLLECTION_MODE_COPY COLLECTION_MODE_NOSYNC COLLECTION_MODE_MULTIPLE_VALUES
Setting COLLECTION_MODE_DEEP causes the tree to perform destructor calls on keys and items when mappings are removed. Note that a mapping may be removed before destruction time if inserting a new mapping for an existing key.
Setting COLLECTION_MODE_COPY causes the tree to insert copies of the given key and value when creating a new mapping.
Setting COLLECTION_MODE_NOSYNC disables locking on tree operations.
If COLLECTION_MODE_MULTIPLE_VALUES is set, inserting a mapping for an existing key adds the new value to the list for that key. The lookup function returns a cp_vector containing mappings. This may only be set at creation time with cp_narytree_create_by_option(3) and may not be altered with cp_narytree_set_mode or cp_narytree_unset_mode.
The mode is initially assigned at creation time. Creating the tree with cp_narytree_create_by_option(3) allows setting key and value constructor and destructor functions.
cp_narytree_get_mode returns the current mode indicator.
cp_narytree_set_mode makes a logical OR of the bits on the given mode parameter and the current mode setting and stores this as the new mode setting. No bits are unset. This function may fail if attempting to set COLLECTION_MODE_NOSYNC while the current thread owns the collection lock.
cp_narytree_unset mode unsets the bits given by the mode parameter.
This document was created by
using the manual pages.
Time: 17:58:11 GMT, September 08, 2006