![]() |
![]() |
![]() |
libccc Reference Manual | ![]() |
---|---|---|---|---|
#include <ccc/cc-hash-map.h> CcHashMap; void cc_hash_map_foreach (CcHashMap *self, GHFunc func, gpointer user_data); void cc_hash_map_insert (CcHashMap *self, gpointer key, gpointer data); gpointer cc_hash_map_lookup (CcHashMap *self, gconstpointer key); CcHashMap* cc_hash_map_new (GType content_type); void cc_hash_map_remove (CcHashMap *self, gconstpointer key);
void cc_hash_map_foreach (CcHashMap *self, GHFunc func, gpointer user_data);
Execute a function on each item from a CcHashMap.
self : |
a CcHashMap |
func : |
a GHFunc |
user_data : |
user_data for func
|
void cc_hash_map_insert (CcHashMap *self, gpointer key, gpointer data);
Inserts value
into self
(indexed by key
).
self : |
a CcHashMap |
key : |
the key that will be used for inserting |
data : |
the value to be inserted |
gpointer cc_hash_map_lookup (CcHashMap *self, gconstpointer key);
Looks up the data for key
.
self : |
a CcHashMap |
key : |
a key |
Returns : | the data belonging to key , NULL if no data was found.
|
CcHashMap* cc_hash_map_new (GType content_type);
Create a new CcHashMap that can hold items of the GType content_type
.
content_type : |
a GType for the content |
Returns : | a new CcHashMap. |