1 #ifndef LIBDERP_HASHMAP_H
2 #define LIBDERP_HASHMAP_H
10 typedef struct hashmap hashmap;
12 /* don't look inside, clients */
13 typedef struct hm_iter
20 hashmap * hm_new(size_t, hashfn *, comparator *, void *cmp_aux);
21 void hm_free(hashmap *);
22 void hm_dtor(hashmap *, dtor *key_dtor, dtor *val_dtor, void *aux);
23 size_t hm_length(const hashmap *);
24 bool hm_is_empty(const hashmap *);
25 void * hm_at(const hashmap *, const void *);
26 bool hm_insert(hashmap *, void *key, void *val);
27 bool hm_remove(hashmap *, void *);
28 void hm_clear(hashmap *);
30 bool hm_iter_begin(hashmap *h, hm_iter *i);
31 struct map_pair* hm_iter_next(hm_iter *);