|
rlib
Convenience library for useful things
|
String-keyed convenience wrapper around RHashTable. More...
#include <rlib/data/rhashtable.h>Go to the source code of this file.
Macros | |
| #define | RDictionary RHashTable |
Alias: RDictionary is just an RHashTable. | |
| #define | r_dictionary_ref r_ref_ref |
| Increment the dictionary's refcount. | |
| #define | r_dictionary_unref r_ref_unref |
| Decrement the dictionary's refcount; clears all entries when it reaches zero. | |
Functions | |
| static RDictionary * | r_dictionary_new (void) |
| Construct an empty string-keyed dictionary (no value notifier). | |
| static RDictionary * | r_dictionary_new_full (RDestroyNotify notify) |
| Construct an empty dictionary with a value destroy notifier. | |
| static rsize | r_dictionary_size (RDictionary *dict) |
| Number of entries currently in the dictionary. | |
| static rsize | r_dictionary_current_alloc_size (RDictionary *dict) |
| Allocated bucket count. | |
| static rboolean | r_dictionary_insert (RDictionary *dict, const rchar *key, rpointer value) |
Insert (key, value). | |
| static rpointer | r_dictionary_lookup (RDictionary *dict, const rchar *key) |
Return the value associated with key, or NULL. | |
| static rboolean | r_dictionary_lookup_full (RDictionary *dict, const rchar *key, rpointer *value) |
Look up key, returning the value via value. | |
| static rboolean | r_dictionary_contains (RDictionary *dict, const rchar *key) |
TRUE iff key is present. | |
| static rboolean | r_dictionary_steal (RDictionary *dict, const rchar *key, rpointer *value) |
Remove key without running the value destroy notifier; return the value via value. | |
| static rboolean | r_dictionary_remove (RDictionary *dict, const rchar *key) |
Remove key (value destroy notifier runs). | |
| static rboolean | r_dictionary_foreach (RDictionary *dict, RStrKeyValueFunc func, rpointer user) |
| Iterate every entry in the dictionary. | |
String-keyed convenience wrapper around RHashTable.