Another bug fix
[satune.git] / src / Collections / structs.h
1 #ifndef STRUCTS_H
2 #define STRUCTS_H
3 #include "cppvector.h"
4 #include "hashtable.h"
5 #include "hashset.h"
6 #include "classlist.h"
7 #include "array.h"
8 #include "corestructs.h"
9
10
11 unsigned int table_entry_hash_function(TableEntry *This);
12 bool table_entry_equals(TableEntry *key1, TableEntry *key2);
13 unsigned int order_node_hash_function(OrderNode *This);
14 bool order_node_equals(OrderNode *key1, OrderNode *key2);
15 unsigned int order_edge_hash_function(OrderEdge *This);
16 bool order_edge_equals(OrderEdge *key1, OrderEdge *key2);
17 unsigned int order_element_hash_function(OrderElement *This);
18 bool order_element_equals(OrderElement *key1, OrderElement *key2);
19 unsigned int order_pair_hash_function(OrderPair *This);
20 bool order_pair_equals(OrderPair *key1, OrderPair *key2);
21
22
23 typedef Hashset<TableEntry *, uintptr_t, PTRSHIFT, table_entry_hash_function, table_entry_equals> HashsetTableEntry;
24 typedef Hashset<OrderNode *, uintptr_t, PTRSHIFT, order_node_hash_function, order_node_equals> HashsetOrderNode;
25 typedef Hashset<OrderEdge *, uintptr_t, PTRSHIFT, order_edge_hash_function, order_edge_equals> HashsetOrderEdge;
26 typedef Hashset<OrderElement *, uintptr_t, PTRSHIFT, order_element_hash_function, order_element_equals> HashsetOrderElement;
27 typedef Hashset<Boolean *, uintptr_t, PTRSHIFT> HashsetBoolean;
28 typedef Hashset<Element *, uintptr_t, PTRSHIFT> HashsetElement;
29 typedef SetIterator<Boolean *, uintptr_t, PTRSHIFT> SetIteratorBoolean;
30 typedef Hashset<uint64_t, uint64_t, 0> Hashset64Int;
31 typedef SetIterator<uint64_t, uint64_t, 0> SetIterator64Int;
32
33
34 typedef Hashtable<OrderNode *, HashsetOrderNode *, uintptr_t, PTRSHIFT> HashtableNodeToNodeSet;
35 typedef Hashtable<OrderPair *, OrderPair *, uintptr_t, PTRSHIFT, order_pair_hash_function, order_pair_equals> HashtableOrderPair;
36 typedef Hashtable<void *, void *, uintptr_t, PTRSHIFT> CloneMap;
37
38
39 typedef Hashtable<Set *, EncodingNode *, uintptr_t, PTRSHIFT> HashtableEncoding;
40
41
42 typedef SetIterator<TableEntry *, uintptr_t, PTRSHIFT, table_entry_hash_function, table_entry_equals> SetIteratorTableEntry;
43 typedef SetIterator<OrderEdge *, uintptr_t, PTRSHIFT, order_edge_hash_function, order_edge_equals> SetIteratorOrderEdge;
44 typedef SetIterator<OrderNode *, uintptr_t, PTRSHIFT, order_node_hash_function, order_node_equals> SetIteratorOrderNode;
45 typedef SetIterator<OrderElement *, uintptr_t, PTRSHIFT, order_element_hash_function, order_element_equals> SetIteratorOrderElement;
46
47 #endif