aboutsummaryrefslogtreecommitdiff
path: root/analyzer/utils/hashmap.h
diff options
context:
space:
mode:
Diffstat (limited to 'analyzer/utils/hashmap.h')
-rw-r--r--analyzer/utils/hashmap.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/analyzer/utils/hashmap.h b/analyzer/utils/hashmap.h
index 96e8b58..22c71c6 100644
--- a/analyzer/utils/hashmap.h
+++ b/analyzer/utils/hashmap.h
@@ -72,6 +72,21 @@ extern void *hashmap_get(HashMap *map, void *key);
// - key - pointer to the key of the entry to delete
extern void hashmap_delete(HashMap *map, void *key);
+// get first node in the hashmap, use with hashmap_next to iterate over hashmap
+// params:
+// - map - hash map to get the first node from
+// returns:
+// pointer to the first node in the hashmap or NULL if there's no entries in it
+extern HashMapNode *hashmap_first(HashMap *map);
+
+// get next node in the hashmap, use with hashmap_first to iterate over hashmap
+// params:
+// - map - hash map to get the next node from
+// - node - the node preceeding the one we search for
+// returns:
+// pointer to the next node in the hashmap or NULL if there's no next
+extern HashMapNode *hashmap_next(HashMap *map, HashMapNode *node);
+
// free the hash map
// - map - hash map to free
extern void hashmap_free(HashMap *map);