Moved the interpreter
[repair.git] / Repair / RepairInterpreter / Relation.h
diff --git a/Repair/RepairInterpreter/Relation.h b/Repair/RepairInterpreter/Relation.h
new file mode 100755 (executable)
index 0000000..7b9083f
--- /dev/null
@@ -0,0 +1,44 @@
+#ifndef Relation_H
+#define Relation_h
+#include "classlist.h"
+
+class Tuple {
+ public:
+  Tuple(void *l,void *r);
+  Tuple();
+  bool isnull();
+  void *left,*right;
+};
+
+
+
+#define WRELATION_SINGDOMAIN 0x1
+#define WRELATION_MANYDOMAIN 0x2
+#define WRELATION_SINGRANGE 0x10
+#define WRELATION_MANYRANGE 0x20
+
+class WorkRelation {
+ public:
+  WorkRelation();
+  WorkRelation(bool);
+  ~WorkRelation();
+  bool contains(void *key, void *object);
+  Tuple firstelement();
+  Tuple getnextelement(void *left, void *right);
+  void put(void *key, void *object);
+  void remove(void *key, void *object);
+  WorkSet* getset(void *key);
+  void* getobj(void *key);
+  WorkSet* invgetset(void *key);
+  void* invgetobj(void *key);
+  void print();
+
+ private:
+  void destroyer(struct genhashtable *d);
+  bool flag;
+  struct genhashtable *forward, *inverse;
+};
+#endif
+
+
+