Hack grammar to add unary minus.
[repair.git] / Repair / RepairInterpreter / Relation.h
1 #ifndef Relation_H
2 #define Relation_h
3 #include "classlist.h"
4
5 class Tuple {
6  public:
7   Tuple(void *l,void *r);
8   Tuple();
9   bool isnull();
10   void *left,*right;
11 };
12
13
14
15 #define WRELATION_SINGDOMAIN 0x1
16 #define WRELATION_MANYDOMAIN 0x2
17 #define WRELATION_SINGRANGE 0x10
18 #define WRELATION_MANYRANGE 0x20
19
20 class WorkRelation {
21  public:
22   WorkRelation();
23   WorkRelation(bool);
24   ~WorkRelation();
25   bool contains(void *key, void *object);
26   Tuple firstelement();
27   Tuple getnextelement(void *left, void *right);
28   void put(void *key, void *object);
29   void remove(void *key, void *object);
30   WorkSet* getset(void *key);
31   void* getobj(void *key);
32   WorkSet* invgetset(void *key);
33   void* invgetobj(void *key);
34   void print();
35
36  private:
37   void destroyer(struct genhashtable *d);
38   bool flag;
39   struct genhashtable *forward, *inverse;
40 };
41 #endif
42
43
44