18 /* SimpleHash *********************************************************/
20 struct SimpleHash * noargallocateSimpleHash();
21 struct SimpleHash * allocateSimpleHash(int size);
22 void SimpleHashaddChild(struct SimpleHash *thisvar, struct SimpleHash * child);
23 void freeSimpleHash(struct SimpleHash *);
26 int SimpleHashadd(struct SimpleHash *, int key, int data);
27 int SimpleHashremove(struct SimpleHash *,int key, int data);
28 bool SimpleHashcontainskey(struct SimpleHash *,int key);
29 bool SimpleHashcontainskeydata(struct SimpleHash *,int key, int data);
30 int SimpleHashget(struct SimpleHash *,int key, int* data);
31 int SimpleHashcountdata(struct SimpleHash *,int data);
32 void SimpleHashaddParent(struct SimpleHash *,struct SimpleHash* parent);
33 int SimpleHashfirstkey(struct SimpleHash *);
34 struct SimpleIterator* SimpleHashcreateiterator(struct SimpleHash *);
35 void SimpleHashiterator(struct SimpleHash *, struct SimpleIterator * it);
36 int SimpleHashcount(struct SimpleHash *, int key);
37 void SimpleHashaddAll(struct SimpleHash *, struct SimpleHash * set);
38 struct SimpleHash * SimpleHashimageSet(struct SimpleHash *, int key);
43 struct SimpleNode **bucket;
44 struct ArraySimple *listhead;
45 struct ArraySimple *listtail;
49 inline int SimpleHashcountset(struct SimpleHash * thisvar);
51 /* SimpleHashException *************************************************/
54 /* SimpleIterator *****************************************************/
58 struct SimpleNode *next;
65 struct SimpleNode nodes[ARRAYSIZE];
66 struct ArraySimple * nextarray;
70 struct SimpleIterator {
71 struct ArraySimple *cur, *tail;
75 inline struct SimpleIterator * noargallocateSimpleIterator();
77 inline struct SimpleIterator * allocateSimpleIterator(struct ArraySimple *start, struct ArraySimple *tl, int tlindex);
79 inline int hasNext(struct SimpleIterator *thisvar);
81 inline int next(struct SimpleIterator *thisvar);
83 inline int key(struct SimpleIterator *thisvar);