Add test case plus make changes so test case runs
[satune.git] / src / Collections / structs.h
1 #ifndef STRUCTS_H
2 #define STRUCTS_H
3 #include "vector.h"
4 #include "hashtable.h"
5 #include "hashset.h"
6 #include "classlist.h"
7 #include "array.h"
8
9 ArrayDef(Element, Element *);
10 ArrayDef(Boolean, Boolean *);
11 ArrayDef(Set, Set *);
12
13 VectorDef(Table, Table *, 4);
14 VectorDef(Set, Set *, 4);
15 VectorDef(Boolean, Boolean *, 4);
16 VectorDef(Constraint, Constraint *, 4);
17 VectorDef(Function, Function *, 4);
18 VectorDef(Predicate, Predicate *, 4);
19 VectorDef(Element, Element *, 4);
20 VectorDef(Order, Order *, 4);
21 VectorDef(TableEntry, TableEntry *, 4);
22 VectorDef(ASTNode, ASTNode *, 4);
23 VectorDef(Int, uint64_t, 4);
24
25
26 inline unsigned int Ptr_hash_function(void * hash) {
27         return (unsigned int)((uint64_t)hash >> 4);
28 }
29
30 inline bool Ptr_equals(void * key1, void * key2) {
31         return key1 == key2;
32 }
33
34
35 #endif