Map Function Hooks
Definition at line 81 of file as_map.h.
#include "as_map.h"
int(* as_map_hooks::clear) (as_map *map) |
Clear all entries of the map.
- Parameters
-
- Returns
- 0 on success. Otherwise an error occurred.
Definition at line 150 of file as_map.h.
bool(* as_map_hooks::destroy) (as_map *map) |
Releases the subtype of as_map.
- Parameters
-
map | The map instance to destroy. |
- Returns
- true on success. Otherwise false.
Definition at line 94 of file as_map.h.
Iterate over each entry in the map can call the callback function.
- Parameters
-
map | The map to iterate. |
callback | The function to call for each entry in the map. |
udata | User-data to be passed to the callback. |
- Returns
- true on success. Otherwise false.
Definition at line 175 of file as_map.h.
Set a value at the given key of the map.
- Parameters
-
map | The map to containing the (key,value) pair. |
key | The key of the value. |
- Returns
- The value on success. Otherwise NULL.
Definition at line 141 of file as_map.h.
uint32_t(* as_map_hooks::hashcode) (const as_map *map) |
The hash value of an as_map.
- Parameters
-
map | The map to get the hashcode value for. |
- Returns
- The hashcode value.
Definition at line 107 of file as_map.h.
union as_map_iterator_u*(* as_map_hooks::iterator_init) (const as_map *map, union as_map_iterator_u *it) |
Initialize a stack allocated iterator to traverse over the entries map.
- Parameters
-
- Returns
- true on success. Otherwise false.
Definition at line 193 of file as_map.h.
union as_map_iterator_u*(* as_map_hooks::iterator_new) (const as_map *map) |
Create and initialize a new heap allocated iterator to traverse over the entries map.
- Parameters
-
- Returns
- true on success. Otherwise false.
Definition at line 184 of file as_map.h.
int(* as_map_hooks::remove) (as_map *map, const as_val *key) |
Remove the entry specified by the key.
- Parameters
-
map | The map to remove the entry from. |
key | The key of the entry to be removed. |
- Returns
- 0 on success. Otherwise an error occurred.
Definition at line 160 of file as_map.h.
Set a value of the given key in a map.
- Parameters
-
map | The map to store the (key,value) pair. |
key | The key for the given value. |
val | The value for the given key. |
- Returns
- 0 on success. Otherwise an error occurred.
Definition at line 131 of file as_map.h.
uint32_t(* as_map_hooks::size) (const as_map *map) |
The size of the as_map.
- Parameters
-
map | The map to get the size of. |
- Returns
- The number of entries in the map.
Definition at line 116 of file as_map.h.
The documentation for this struct was generated from the following file: