135 ptMap->ptHashablePointerApi &&
136 ptMap->ptValuePointerApi &&
138 ptMap->ptHashablePointerApi->Hash &&
139 ptMap->ptHashablePointerApi->IsValueNull &&
140 ptMap->ptValuePointerApi->Equals
Abstract fixed-capacity array interface for DS modules.
struct JUNO_DS_ARRAY_ROOT_TAG JUNO_DS_ARRAY_ROOT_T
Opaque array root carrying capacity and API pointer.
Definition array_api.h:58
static JUNO_STATUS_T JunoDs_ArrayVerify(const JUNO_DS_ARRAY_ROOT_T *ptArray)
Verify an array instance's capacity and API.
Definition array_api.h:117
JUNO_STATUS_T JunoDs_MapInit(JUNO_MAP_ROOT_T *ptMapRoot, const JUNO_MAP_HASHABLE_POINTER_API_T *ptHashablePointerApi, const JUNO_VALUE_POINTER_API_T *ptValuePointerApi, JUNO_DS_ARRAY_ROOT_T *ptArray, JUNO_FAILURE_HANDLER_T pfcnFailureHandler, JUNO_USER_DATA_T *pvUserData)
Initialize the map root with hashing/equality APIs and backing array.
Definition juno_map.c:34
JUNO_STATUS_T JunoDs_MapSet(JUNO_MAP_ROOT_T *ptJunoMap, JUNO_POINTER_T tItem)
Insert or update an entry (key/value) via linear probing.
Definition juno_map.c:133
static JUNO_STATUS_T JunoDs_MapVerify(JUNO_MAP_ROOT_T *ptMap)
Verify the map root, APIs, and backing array are valid.
Definition map_api.h:130
JUNO_STATUS_T JunoDs_MapRemove(JUNO_MAP_ROOT_T *ptJunoMap, JUNO_POINTER_T tKey)
Remove an entry by key via linear probing.
Definition juno_map.c:153
JUNO_RESULT_POINTER_T JunoDs_MapGet(JUNO_MAP_ROOT_T *ptJunoMap, JUNO_POINTER_T tItem)
Retrieve an entry by key via linear probing.
Definition juno_map.c:108
#define JUNO_ASSERT_EXISTS(ptr)
Returns JUNO_STATUS_NULLPTR_ERROR if the expression is falsy.
Definition macros.h:50
#define JUNO_MODULE_ROOT(API_T,...)
Implement a module root struct containing ptApi and failure fields.
Definition module.h:126
void(* JUNO_FAILURE_HANDLER_T)(JUNO_STATUS_T tStatus, const char *pcCustomMessage, JUNO_USER_DATA_T *pvUserData)
Failure handler callback signature.
Definition status.h:104
int32_t JUNO_STATUS_T
Canonical status type for LibJuno functions.
Definition status.h:49
void JUNO_USER_DATA_T
Opaque user data type for failure callbacks.
Definition status.h:96
Common assertion and helper macros for LibJuno modules.
struct JUNO_MAP_ROOT_TAG JUNO_MAP_ROOT_T
Map root type holding state and API pointers.
Definition map_api.h:67
Module system and dependency injection primitives for LibJuno.
Pointer trait and helpers for memory operations.
struct JUNO_POINTER_TAG JUNO_POINTER_T
Definition pointer_api.h:49
Status codes and failure-handling helpers for LibJuno.
Map API vtable.
Definition map_api.h:101
JUNO_STATUS_T(* Remove)(JUNO_MAP_ROOT_T *ptJunoMap, JUNO_POINTER_T tKey)
Remove a key (and its value) from the map.
Definition map_api.h:119
JUNO_RESULT_POINTER_T(* Get)(JUNO_MAP_ROOT_T *ptJunoMap, JUNO_POINTER_T tReturnItem)
Retrieve the value for the provided key; returns pointer result.
Definition map_api.h:109
JUNO_STATUS_T(* Set)(JUNO_MAP_ROOT_T *ptJunoMap, JUNO_POINTER_T tItem)
Insert or update a key-value pair.
Definition map_api.h:114
Hashing and null-check operations for map keys/values.
Definition map_api.h:88
JUNO_RESULT_BOOL_T(* IsValueNull)(JUNO_POINTER_T tItem)
Determine if a value slot is logically empty/null.
Definition map_api.h:92
JUNO_RESULT_SIZE_T(* Hash)(JUNO_POINTER_T tItem)
Compute a hash value for the given key.
Definition map_api.h:90
Value-pointer operations API (equality by contents).
Definition pointer_api.h:94
Common module result type aliases used throughout LibJuno.