Pointer->Pointer hashmap.
More...
Pointer->Pointer hashmap.
A key, value pair.
Definition at line 32 of file pmap.h.
Data Fields |
void const * |
key |
The key. |
void * |
value |
The value. |
Iterate over all elements in the map setting curr to the current element.
Definition at line 85 of file pmap.h.
#define pmap_get |
( |
|
type, |
|
|
|
map, |
|
|
|
key |
|
) |
| ((type*)pmap_get(map, key)) |
Returns the value of "key".
This is a wrapper for pmap_get(map, key); It allows to express the intended type of the set elements (instead of weakly typed void*).
Definition at line 67 of file pmap.h.
A map which maps addresses to addresses.
Definition at line 27 of file pmap.h.
void pmap_break |
( |
pmap * |
map | ) |
|
Breaks an iteration.
Must be called, if a iteration ends before pmap_next() returns NULL.
int pmap_contains |
( |
pmap const * |
map, |
|
|
void const * |
key |
|
) |
| |
Checks if an entry with key "key" exists.
size_t pmap_count |
( |
pmap const * |
map | ) |
|
Return number of elements in the map.
pmap* pmap_create |
( |
void |
| ) |
|
pmap* pmap_create_ex |
( |
size_t |
slots | ) |
|
Creates a new empty map with an initial number of slots.
void pmap_destroy |
( |
pmap * |
map | ) |
|
Returns the key, value pair of "key".
Returns the first entry of a map if the map is not empty.
void* pmap_get |
( |
pmap const * |
map, |
|
|
void const * |
key |
|
) |
| |
Returns the value of "key".
void pmap_insert |
( |
pmap * |
map, |
|
|
void const * |
key, |
|
|
void * |
value |
|
) |
| |
Inserts a pair (key,value) into the map.
If an entry with key "key" already exists, its "value" is overwritten.
Returns the next entry of a map or NULL if all entries were visited.