Moved the interpreter
[repair.git] / Repair / RepairInterpreter / tmap.h
diff --git a/Repair/RepairInterpreter/tmap.h b/Repair/RepairInterpreter/tmap.h
new file mode 100755 (executable)
index 0000000..e05f28d
--- /dev/null
@@ -0,0 +1,33 @@
+#ifndef TMAP_H
+#define TMAP_H
+#include "classlist.h"
+
+class typemap {
+ public:
+  typemap(model *);
+  ~typemap();
+  void allocate(void *, int);
+  void deallocate(void *);
+  bool assertvalidmemory(void* low, void* high);
+  bool assertvalidmemory(void* ptr, structure *structure);
+  bool asserttype(void *ptr, structure *structure);
+  bool istype(void *ptr, structure *structure);
+  void reset();
+ private:
+  bool checkmemory(void* low, void* high);
+  bool checktype(bool doaction,void *ptr, structure *structure);
+  bool checktype(bool doaction, void *low, void *high,structure *structure, struct rbtree *ttree);
+  structure * findoffsetstructure(structure *s, int offset);
+  model *globalmodel;
+  struct rbtree *alloctree;
+  struct rbtree *typetree;
+};
+
+class structuremap {
+  public:
+  structuremap(structure *s);
+  ~structuremap();
+  structure *str;
+  struct rbtree *typetree;
+};
+#endif