cp_multimap_reindex(3)
| cp_multimap(3) | libcprops - cp_multimap | cp_multimap(3) |
NAME
cp_multimap_reindex - reposition an entry in a multimap after changing key field values
SYNOPSIS
#include <cprops/multimap.h>
int cp_multimap_reindex(cp_multimap *map, void *before, void *after);
DESCRIPTION
cp_multimap_reindex must be called to correctly reposition an entry when changing fields that affect entry placement with reference to map indices. This requires creating a new entry with the modified value. Reindexing removes the old entry from the map and inserts the new entry instead.
RETURN VALUE
cp_multimap_reindex return zero on success or non-zero on error. Possible error codes are CP_LOCK_FAILED on locking failure or CP_UNIQUE_INDEX_VIOLATION if the modified value can not be reconciled with existing index constraints.
SEE ALSO
cp_multimap_insert(3), cp_multimap_contains(3), cp_multimap_remove(3)
| OCT 2007 | libcprops.0.1.7 |
