aboutsummaryrefslogtreecommitdiff
path: root/include/hashmap.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/hashmap.h')
-rw-r--r--include/hashmap.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/include/hashmap.h b/include/hashmap.h
new file mode 100644
index 0000000..c62a319
--- /dev/null
+++ b/include/hashmap.h
@@ -0,0 +1,23 @@
+#ifndef HASHMAP_H
+#define HASHMAP_H
+
+
+typedef struct HashMap *hashmap_t;
+typedef struct HashMapKeys *hashmap_keys_t;
+
+
+hashmap_t hashmap_create(void);
+void hashmap_free(hashmap_t map);
+
+void **hashmap_get(hashmap_t map, const char *key);
+void hashmap_insert(hashmap_t map, const char *key, void *value);
+int hashmap_delete(hashmap_t map, const char *key);
+
+void hashmap_iterate(hashmap_t map, void (*callback)(const char *key, void *value));
+hashmap_keys_t hashmap_keys_create(hashmap_t map);
+const char *hashmap_keys_next(hashmap_keys_t iter);
+void hashmap_keys_free(hashmap_keys_t iter);
+
+
+
+#endif \ No newline at end of file