2024-10-24 19:24:54 +01:00
|
|
|
#ifndef _B_HASHMAP_H_
|
|
|
|
|
#define _B_HASHMAP_H_
|
|
|
|
|
|
|
|
|
|
#include <blue/core/btree.h>
|
|
|
|
|
#include <blue/core/queue.h>
|
2025-08-09 19:57:42 +01:00
|
|
|
#include <blue/ds/hashmap.h>
|
2024-10-24 19:24:54 +01:00
|
|
|
|
|
|
|
|
struct b_hashmap_bucket_item {
|
|
|
|
|
struct b_queue_entry bi_entry;
|
|
|
|
|
struct b_hashmap_key bi_key;
|
|
|
|
|
struct b_hashmap_value bi_value;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
struct b_hashmap_bucket {
|
|
|
|
|
struct b_btree_node bk_node;
|
|
|
|
|
uint64_t bk_hash;
|
|
|
|
|
struct b_queue bk_items;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
struct b_hashmap {
|
2025-08-09 19:57:42 +01:00
|
|
|
struct b_dsref h_base;
|
2024-10-24 19:24:54 +01:00
|
|
|
struct b_btree h_buckets;
|
2025-06-27 21:46:55 +01:00
|
|
|
b_hashmap_key_destructor h_key_dtor;
|
|
|
|
|
b_hashmap_value_destructor h_value_dtor;
|
2024-10-24 19:24:54 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
#endif
|