build with other copy
[repair.git] / Repair / RepairInterpreter / set.h
1 #ifndef SET_H
2 #define SET_H
3
4 #include "classlist.h"
5
6 class WorkSet {
7  public:
8   WorkSet();
9   WorkSet(unsigned int (*hashf)(void *),int (*equals)(void *,void *));
10   WorkSet(bool);
11   ~WorkSet();
12   void addobject(void *obj);
13   void removeobject(void *obj);
14   bool contains(void *obj);
15   Iterator * getiterator();
16   void *firstelement();
17   void * getnextelement(void *src);
18   int size();
19   void * getelement(int i);  
20   bool isEmpty();
21   void print();
22
23  private:
24   struct genhashtable *ght;
25 };
26
27 class Iterator {
28  public:
29   Iterator(struct genhashtable *ght);
30   ~Iterator();
31   void * next();
32
33  private:
34   struct geniterator * gi;
35 };
36
37 #endif
38