libcomps ..
|
Functions | |
void | comps_objmdict_set (COMPS_ObjMDict *rt, char *key, COMPS_Object *data) |
void | comps_objmdict_set_x (COMPS_ObjMDict *rt, char *key, COMPS_Object *data) |
void | comps_objmdict_set_n (COMPS_ObjMDict *rt, char *key, unsigned int len, COMPS_Object *data) |
COMPS_ObjList * | comps_objmdict_get (COMPS_ObjMDict *rt, const char *key) |
void | comps_objmdict_unset (COMPS_ObjMDict *rt, const char *key) |
void | comps_objmdict_clear (COMPS_ObjMDict *rt) |
COMPS_HSList * | comps_objmdict_values (COMPS_ObjMDict *rt) |
void | comps_objmdict_values_walk (COMPS_ObjMDict *rt, void *udata, void(*walk_f)(void *, void *)) |
COMPS_ObjMDict * | comps_objmdict_clone (COMPS_ObjMDict *rt) |
COMPS_HSList * | comps_objmdict_keys (COMPS_ObjMDict *rt) |
COMPS_HSList * | comps_objmdict_pairs (COMPS_ObjMDict *rt) |
void comps_objmdict_clear | ( | COMPS_ObjMDict * | rt | ) |
remove all items from multi-dictionary
rt | COMPS_ObjDict object |
COMPS_ObjMDict * comps_objmdict_clone | ( | COMPS_ObjMDict * | rt | ) |
Makes copy of multi-dictionary
Items in new dictionary is same items with incremented reference counter only
rt | COMPS_ObjDict object |
COMPS_ObjList * comps_objmdict_get | ( | COMPS_ObjMDict * | rt, |
const char * | key | ||
) |
get items from multi-dictionary for specified key
if there's no such items, return NULL. Item's reference counter WON'T be incremented.
rt | COMPS_ObjDict object |
specified | key |
COMPS_HSList * comps_objmdict_keys | ( | COMPS_ObjMDict * | rt | ) |
Return list of keys in multi-dictionary
rt | COMPS_ObjMDict object |
COMPS_HSList * comps_objmdict_pairs | ( | COMPS_ObjMDict * | rt | ) |
Return list of pairs(key-value) in multi-dictionary
rt | COMPS_ObjMDict object |
void comps_objmdict_set | ( | COMPS_ObjMDict * | rt, |
char * | key, | ||
COMPS_Object * | data | ||
) |
set new item to multi-dictionary
if there's already item for specified key, new item will be added into list for specified key. Reference counter of new item is incremented
rt | COMPS_ObjMDict object |
key | key for new item |
data | new item |
void comps_objmdict_set_n | ( | COMPS_ObjMDict * | rt, |
char * | key, | ||
unsigned int | len, | ||
COMPS_Object * | data | ||
) |
same as comps_objmdict_set but with key length limited by argument
rt | COMPS_ObjMDict object |
key | key for new item |
len | key length limiter |
data | new item |
void comps_objmdict_set_x | ( | COMPS_ObjMDict * | rt, |
char * | key, | ||
COMPS_Object * | data | ||
) |
set new item to multi-dictionary
if there's already item for specified key, new item will be added into list for specified key. Reference counter of new item isn't incremented
rt | COMPS_ObjMDict object |
key | key for new item |
data | new item |
void comps_objmdict_unset | ( | COMPS_ObjMDict * | rt, |
const char * | key | ||
) |
remove item from multi-dictionary for specified key
item's reference counter will be decremented
rt | COMPS_ObjDict object |
key | item's key |
COMPS_HSList * comps_objmdict_values | ( | COMPS_ObjMDict * | rt | ) |
Return list of all values(items) in multi-dictionary
rt | COMPS_ObjDict object |
void comps_objmdict_values_walk | ( | COMPS_ObjMDict * | rt, |
void * | udata, | ||
void(*)(void *, void *) | walk_f | ||
) |
Apply function for each item in multi-dictionary
Applied function takes user data (udata param) and item as arguments
rt | COMPS_ObjDict object |
udata | user data |
walk_f | applied function |