aboutsummaryrefslogtreecommitdiff
path: root/collections/map/map.h
blob: 38e3e11a34fe0fed45d6ca885571753ec2ce35a8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#ifndef MAP_H
#define MAP_H

typedef struct map_node map;
typedef int (*cmp_func)(void*, void*);

/*constructors*/
map* map_new(cmp_func);

/*management*/
int map_size(map*);

/*data*/
int map_insert(map*, void*, void*);
void* map_index(map*, void*);

int map_check_key_ptr(map*, void*);
void* map_set_key(map*, void*);


/*memory*/
void map_clear(map*);
void map_free(map*);
#endif