LibJuno 0.23.0
LibJuno is a lightweight C99 library designed specifically for embedded systems.
Loading...
Searching...
No Matches
map_impl.h
Go to the documentation of this file.
1/*
2 MIT License
3
4 Copyright (c) 2025 Robin A. Onsay
5
6 Permission is hereby granted, free of charge, to any person obtaining
7 a copy of this software and associated documentation files
8 (the "Software"), to deal in the Software without restriction,
9 including without limitation the rights to use, copy, modify, merge,
10 publish, distribute, sublicense, and/or sell copies of the Software,
11 and to permit persons to whom the Software is furnished to do so,
12 subject to the following conditions:
13
14 The above copyright notice and this permission notice shall be
15 included in all copies or substantial portions of the Software.
16*/
17
27#ifndef JUNO_MAP_IMPL_H
28#define JUNO_MAP_IMPL_H
29#include "juno/module.h"
30#include "juno/status.h"
31#include "juno/map/map_api.h"
32#ifdef __cplusplus
33extern "C"
34{
35#endif
36
37
39
40JUNO_MODULE_DERIVE(JUNO_MAP_IMPL_T, JUNO_MAP_BASE_T,
41 /*
42
43 TODO: Include implementation specific members here
44
45 */
46);
47
48#ifdef JUNO_MAP_DEFAULT
58JUNO_MODULE(JUNO_MAP_T, JUNO_MAP_API_T, JUNO_MAP_BASE_T,
59 JUNO_MAP_IMPL_T tJunoMapImpl;
60);
61#endif
62
64 JUNO_MAP_T *ptJunoMap,
65 JUNO_HASH_T *ptHash,
66 JUNO_MEMORY_T *ptKeyTable,
67 JUNO_MEMORY_T *ptValueTable,
68 size_t zCapacity,
69 JUNO_MAP_KEY_EQUAL_FCN_T pfcnIsEqual,
70 JUNO_FAILURE_HANDLER_T pfcnFailureHandler,
71 JUNO_USER_DATA_T *pvFailureUserData
72);
73#ifdef __cplusplus
74}
75#endif
76#endif // JUNO_MAP_IMPL_H
77
bool(* JUNO_MAP_KEY_EQUAL_FCN_T)(JUNO_MEMORY_T ptKey1, JUNO_MEMORY_T ptKey2)
Definition map_api.h:40
JUNO_STATUS_T JunoMap_ImplApi(JUNO_MAP_T *ptJunoMap, JUNO_HASH_T *ptHash, JUNO_MEMORY_T *ptKeyTable, JUNO_MEMORY_T *ptValueTable, size_t zCapacity, JUNO_MAP_KEY_EQUAL_FCN_T pfcnIsEqual, JUNO_FAILURE_HANDLER_T pfcnFailureHandler, JUNO_USER_DATA_T *pvFailureUserData)
Definition juno_map.c:141
#define JUNO_MODULE_DERIVE_DECLARE(name)
Definition module.h:36
#define JUNO_MODULE(name, API, base, derived)
Definition module.h:67
#define JUNO_MODULE_DERIVE(name, base, members)
Definition module.h:96
void(* JUNO_FAILURE_HANDLER_T)(JUNO_STATUS_T tStatus, const char *pcCustomMessage, JUNO_USER_DATA_T *pvUserData)
Definition status.h:44
enum JUNO_STATUS_TAG JUNO_STATUS_T
void JUNO_USER_DATA_T
Definition status.h:43
Definition map_api.h:55
Structure for an allocated memory segment. Describes the allocated memory with a pointer to the start...
Definition memory_api.h:65