1 #ifndef LIBDERP_HASHMAP_H
2 #define LIBDERP_HASHMAP_H
10 /* for public consumption */
17 typedef struct hashmap hashmap;
19 /* don't look inside, clients */
20 typedef struct hm_iter
27 hashmap * hm_new(size_t, hashfn *, comparator *, void *cmp_aux);
28 void hm_free(hashmap *);
29 void hm_dtor(hashmap *, dtor *key_dtor, dtor *val_dtor, void *aux);
30 size_t hm_length(const hashmap *);
31 bool hm_is_empty(const hashmap *);
32 void * hm_at(const hashmap *, const void *);
33 bool hm_insert(hashmap *, void *key, void *val);
34 bool hm_remove(hashmap *, void *);
35 void hm_clear(hashmap *);
37 bool hm_iter_begin(hashmap *h, hm_iter *i);
38 struct hm_pair* hm_iter_next(hm_iter *);