|
LibJuno 1.0.1
LibJuno is a lightweight C11 library designed specifically for embedded systems.
|
Map API vtable. More...
#include <map_api.h>
Data Fields | |
| JUNO_RESULT_POINTER_T(* | Get )(JUNO_MAP_ROOT_T *ptJunoMap, JUNO_POINTER_T tReturnItem) |
| Retrieve the value for the provided key; returns pointer result. | |
| JUNO_STATUS_T(* | Set )(JUNO_MAP_ROOT_T *ptJunoMap, JUNO_POINTER_T tItem) |
| Insert or update a key-value pair. | |
| JUNO_STATUS_T(* | Remove )(JUNO_MAP_ROOT_T *ptJunoMap, JUNO_POINTER_T tKey) |
| Remove a key (and its value) from the map. | |
Map API vtable.
Operations use linear probing with wraparound.
| JUNO_RESULT_POINTER_T(* JUNO_MAP_API_TAG::Get) (JUNO_MAP_ROOT_T *ptJunoMap, JUNO_POINTER_T tReturnItem) |
Retrieve the value for the provided key; returns pointer result.
On success, returns a pointer descriptor to the matching entry in the backing array. If the key is not found and an empty slot is encountered during probing, returns JUNO_STATUS_DNE_ERROR. Propagates errors from hashing, array access, or pointer verification. May return JUNO_STATUS_TABLE_FULL_ERROR when the probe sequence traverses the full table without finding an empty slot or match.
| JUNO_STATUS_T(* JUNO_MAP_API_TAG::Remove) (JUNO_MAP_ROOT_T *ptJunoMap, JUNO_POINTER_T tKey) |
Remove a key (and its value) from the map.
Probes for the key; if found, resets the slot via the array API. If an empty slot is encountered before a match, the operation is a no-op and returns JUNO_STATUS_SUCCESS (key not present).
| JUNO_STATUS_T(* JUNO_MAP_API_TAG::Set) (JUNO_MAP_ROOT_T *ptJunoMap, JUNO_POINTER_T tItem) |
Insert or update a key-value pair.
Copies the provided entry into the first empty slot found in the probe sequence or overwrites the matching key. Returns JUNO_STATUS_TABLE_FULL_ERROR if no empty slot is available.