LibCDS
HashMap Struct Reference

The implementation for hash map. More...

Data Fields

HashMapDatapData
 The container private information. More...
 
int32_t(* put )(struct _HashMap *, Pair *, size_t)
 Insert a key value pair into the map. More...
 
int32_t(* get )(struct _HashMap *, Key, size_t, Value *)
 Retrieve the value corresponding to the designated key. More...
 
int32_t(* find )(struct _HashMap *, Key, size_t)
 Check if the map contains the designated key. More...
 
int32_t(* remove )(struct _HashMap *, Key, size_t)
 Delete the key value pair corresponding to the designated key. More...
 
int32_t(* size )(struct _HashMap *)
 Return the number of stored key value pairs. More...
 
int32_t(* iterate )(struct _HashMap *, bool, Pair **)
 Iterate through the map to retrieve each key value pair. More...
 
int32_t(* set_destroy )(struct _HashMap *, void(*)(Pair *))
 Set the custom key value pair resource clean method. More...
 
int32_t(* set_hash )(struct _HashMap *, uint32_t(*)(Key, size_t))
 Set the custom hash function. More...
 

Detailed Description

The implementation for hash map.

Definition at line 14 of file hash_map.h.

Field Documentation

HashMapData* HashMap::pData

The container private information.

Definition at line 16 of file hash_map.h.

int32_t(* HashMap::put)(struct _HashMap *, Pair *, size_t)

Insert a key value pair into the map.

See Also
HashMapPut

Definition at line 20 of file hash_map.h.

int32_t(* HashMap::get)(struct _HashMap *, Key, size_t, Value *)

Retrieve the value corresponding to the designated key.

See Also
HashMapGet

Definition at line 24 of file hash_map.h.

int32_t(* HashMap::find)(struct _HashMap *, Key, size_t)

Check if the map contains the designated key.

See Also
HashMapFind

Definition at line 28 of file hash_map.h.

int32_t(* HashMap::remove)(struct _HashMap *, Key, size_t)

Delete the key value pair corresponding to the designated key.

See Also
HashMapRemove

Definition at line 32 of file hash_map.h.

int32_t(* HashMap::size)(struct _HashMap *)

Return the number of stored key value pairs.

See Also
HashMapSize

Definition at line 36 of file hash_map.h.

int32_t(* HashMap::iterate)(struct _HashMap *, bool, Pair **)

Iterate through the map to retrieve each key value pair.

See Also
HashMapIterate

Definition at line 40 of file hash_map.h.

int32_t(* HashMap::set_destroy)(struct _HashMap *, void(*)(Pair *))

Set the custom key value pair resource clean method.

See Also
HashMapSetDestroy

Definition at line 44 of file hash_map.h.

int32_t(* HashMap::set_hash)(struct _HashMap *, uint32_t(*)(Key, size_t))

Set the custom hash function.

See Also
HashMapSetHash

Definition at line 48 of file hash_map.h.