A hashtable based implementation of as_map.
To use the map, you can either initialize a stack allocated map, using as_hashmap_init():
Or you can create a new heap allocated map using as_hashmap_new():
When you are finished using the map, then you should release the map and associated resources, using as_hashmap_destroy():
The as_hashmap is a subtype of as_map. This allows you to alternatively use as_map functions, by typecasting as_hashmap to as_map.
The as_stringmap functions are simplified functions for using string key.
Each of the as_map functions proxy to the as_hashmap functions. So, calling as_map_destroy() is equivalent to calling as_hashmap_destroy().
Definition at line 81 of file as_hashmap.h.
|
(Note that these are not member functions.)
|
| int | as_hashmap_clear (as_hashmap *map) |
| |
| void | as_hashmap_destroy (as_hashmap *map) |
| |
| bool | as_hashmap_foreach (const as_hashmap *map, as_map_foreach_callback callback, void *udata) |
| |
| as_val * | as_hashmap_get (const as_hashmap *map, const as_val *key) |
| |
| uint32_t | as_hashmap_hashcode (const as_hashmap *map) |
| |
| as_hashmap * | as_hashmap_init (as_hashmap *map, uint32_t buckets) |
| |
| as_hashmap * | as_hashmap_new (uint32_t buckets) |
| |
| int | as_hashmap_remove (as_hashmap *map, const as_val *key) |
| |
| int | as_hashmap_set (as_hashmap *map, const as_val *key, const as_val *val) |
| |
| uint32_t | as_hashmap_size (const as_hashmap *map) |
| |
| int | as_map_clear (as_map *map) |
| |
| as_map * | as_map_cons (as_map *map, bool free, void *data, const as_map_hooks *hooks) |
| |
| void | as_map_destroy (as_map *map) |
| |
| bool | as_map_foreach (const as_map *map, as_map_foreach_callback callback, void *udata) |
| |
| as_map * | as_map_fromval (const as_val *val) |
| |
| as_val * | as_map_get (const as_map *map, const as_val *key) |
| |
| uint32_t | as_map_hashcode (const as_map *map) |
| |
| as_map * | as_map_init (as_map *map, void *data, const as_map_hooks *hooks) |
| |
| union as_map_iterator_u * | as_map_iterator_init (union as_map_iterator_u *it, const as_map *map) |
| |
| union as_map_iterator_u * | as_map_iterator_new (const as_map *map) |
| |
| as_map * | as_map_new (void *data, const as_map_hooks *hooks) |
| |
| int | as_map_remove (as_map *map, const as_val *key) |
| |
| int | as_map_set (as_map *map, const as_val *key, const as_val *val) |
| |
| uint32_t | as_map_size (const as_map *map) |
| |
| as_val * | as_map_toval (const as_map *map) |
| |