#include <stddef.h>
#include <stdbool.h>
Go to the source code of this file.
|
struct anomap * | anomap_create (size_t key_size, size_t val_size, int(*cmp)(const void *, const void *)) |
|
void | anomap_destroy (struct anomap *map) |
|
void | anomap_set_on_item_changed (struct anomap *map, anomap_on_item_changed *on_changed, void *data) |
|
size_t | anomap_length (struct anomap *map) |
|
void | anomap_clear (struct anomap *map) |
|
bool | anomap_index_of (struct anomap *map, void *key, size_t *index) |
|
bool | anomap_at_index (struct anomap *map, size_t index, void *key, void *val) |
|
enum anomap_operation | anomap_do (struct anomap *map, enum anomap_operation operation, void *key, void *val) |
|
size_t | anomap_copy_range (struct anomap *map, size_t from_index, size_t to_index, void *keys, void *vals) |
|
size_t | anomap_delete_range (struct anomap *map, size_t from_index, size_t to_index, void *keys, void *vals) |
|
◆ ANOMAP_H
◆ ANOMAP_DECLARE_COMPARE_FUNCTION
#define ANOMAP_DECLARE_COMPARE_FUNCTION |
( |
|
function_name, |
|
|
|
data_type |
|
) |
| |
Value: static int \
function_name(const void *a, const void *b) { \
if (*(data_type *)a == *(data_type *)b) return 0; \
return *(data_type *)a > *(data_type *)b ? 1 : -1; \
}
◆ anomap_on_item_changed
typedef void anomap_on_item_changed(struct anomap *map, struct anomap_item_changed *item_changed) |
◆ anomap_operation
Enumerator |
---|
anomap_insert | |
anomap_update | |
anomap_upsert | |
anomap_delete | |
anomap_getval | |
◆ anomap_create()
struct anomap * anomap_create |
( |
size_t |
key_size, |
|
|
size_t |
val_size, |
|
|
int(*)(const void *, const void *) |
cmp |
|
) |
| |
◆ anomap_destroy()
void anomap_destroy |
( |
struct anomap * |
map | ) |
|
◆ anomap_set_on_item_changed()
◆ anomap_length()
size_t anomap_length |
( |
struct anomap * |
map | ) |
|
◆ anomap_clear()
void anomap_clear |
( |
struct anomap * |
map | ) |
|
◆ anomap_index_of()
bool anomap_index_of |
( |
struct anomap * |
map, |
|
|
void * |
key, |
|
|
size_t * |
index |
|
) |
| |
◆ anomap_at_index()
bool anomap_at_index |
( |
struct anomap * |
map, |
|
|
size_t |
index, |
|
|
void * |
key, |
|
|
void * |
val |
|
) |
| |
◆ anomap_do()
◆ anomap_copy_range()
size_t anomap_copy_range |
( |
struct anomap * |
map, |
|
|
size_t |
from_index, |
|
|
size_t |
to_index, |
|
|
void * |
keys, |
|
|
void * |
vals |
|
) |
| |
◆ anomap_delete_range()
size_t anomap_delete_range |
( |
struct anomap * |
map, |
|
|
size_t |
from_index, |
|
|
size_t |
to_index, |
|
|
void * |
keys, |
|
|
void * |
vals |
|
) |
| |