![]() |
#include <aerospike/as_iterator.h>#include <aerospike/as_util.h>#include <aerospike/as_val.h>#include <stdbool.h>#include <stdint.h>
Include dependency graph for as_map.h:
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Data Structures | |
| struct | as_map |
| struct | as_map_hooks |
Typedefs | |
| typedef bool(* | as_map_foreach_callback )(const as_val *key, const as_val *value, void *udata) |
Functions | |
| static int | as_map_clear (as_map *map) |
| as_map * | as_map_cons (as_map *map, bool free, void *data, const as_map_hooks *hooks) |
| static void | as_map_destroy (as_map *map) |
| static bool | as_map_foreach (const as_map *map, as_map_foreach_callback callback, void *udata) |
| static as_map * | as_map_fromval (const as_val *val) |
| static as_val * | as_map_get (const as_map *map, const as_val *key) |
| static uint32_t | as_map_hashcode (const as_map *map) |
| as_map * | as_map_init (as_map *map, void *data, const as_map_hooks *hooks) |
| static union as_map_iterator_u * | as_map_iterator_init (union as_map_iterator_u *it, const as_map *map) |
| static 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) |
| static int | as_map_remove (as_map *map, const as_val *key) |
| static int | as_map_set (as_map *map, const as_val *key, const as_val *val) |
| static uint32_t | as_map_size (const as_map *map) |
| static as_val * | as_map_toval (const as_map *map) |
| void | as_map_val_destroy (as_val *val) |
| uint32_t | as_map_val_hashcode (const as_val *val) |
| char * | as_map_val_tostring (const as_val *val) |
Callback function for as_map_foreach(). Called for each entry in the map.
| key | The key of the current entry. |
| value | The value of the current entry. |
| udata | The user-data provided to the as_list_foreach(). |
|
inlinestatic |
Remove all entries from the map.
| map | The map. |
Definition at line 322 of file as_map.h.
References as_util_hook.
|
private |
|
inlinestatic |
Destroy the as_map and associated resources.
Definition at line 246 of file as_map.h.
References as_val_destroy.
|
inlinestatic |
Call the callback function for each entry in the map.
| map | The map. |
| callback | The function to call for each entry. |
| udata | User-data to be passed to the callback. |
Definition at line 357 of file as_map.h.
References as_util_hook.
Convert from an as_val.
Definition at line 406 of file as_map.h.
References AS_MAP, and as_util_fromval.
Get the value for specified key.
| map | The map. |
| key | The key. |
Definition at line 294 of file as_map.h.
References as_util_hook.
|
inlinestatic |
Hash value for the map
| map | The map |
Definition at line 263 of file as_map.h.
References as_util_hook.
| as_map * as_map_init | ( | as_map * | map, |
| void * | data, | ||
| const as_map_hooks * | hooks | ||
| ) |
Initialize a stack allocated map.
| map | Stack allocated map to initialize. |
| data | Data for the map. |
| hooks | Implementation for the map interface. |
|
static |
Initialzies a stack allocated iterator over the given map.
| map | The map to iterate. |
| it | The iterator to initialize. |
Definition at line 384 of file as_map.h.
References as_util_hook.
|
static |
Creates and initializes a new heap allocated iterator over the given map.
| map | The map to iterate. |
Definition at line 370 of file as_map.h.
References as_util_hook.
| as_map * as_map_new | ( | void * | data, |
| const as_map_hooks * | hooks | ||
| ) |
Create and initialize a new heap allocated map.
| data | Data for the list. |
| hooks | Implementation for the list interface. |
Remove the entry specified by the key.
| map | The map to remove the entry from. |
| key | The key of the entry to be removed. |
Definition at line 337 of file as_map.h.
References as_util_hook.
Set the value for specified key.
| map | The map. |
| key | The key. |
| val | The value for the key. |
Definition at line 309 of file as_map.h.
References as_util_hook.
|
inlinestatic |
Get the number of entries in the map.
| map | The map |
Definition at line 276 of file as_map.h.
References as_util_hook.
|
private |
Internal helper function for getting the hashcode of an as_val.