CcHashMap

CcHashMap

Synopsis


#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);

Object Hierarchy


  GObject
   +----CcHashMap

Properties


  "content"                  GType                 : Read / Write / Construct Only

Description

Details

CcHashMap

typedef struct _CcHashMap CcHashMap;

A hash map object for CCC.


cc_hash_map_foreach ()

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

cc_hash_map_insert ()

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

cc_hash_map_lookup ()

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.

cc_hash_map_new ()

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.

cc_hash_map_remove ()

void                cc_hash_map_remove                  (CcHashMap *self,
                                                         gconstpointer key);

Removes the data that was registered in self with the index key.

self : a CcHashMap
key : a key

Property Details

The "content" property

  "content"                  GType                 : Read / Write / Construct Only

The Type of the content.