Added minimum size analysis.
[repair.git] / Repair / RepairInterpreter / tmap.h
1 #ifndef TMAP_H
2 #define TMAP_H
3 #include "classlist.h"
4
5 class typemap {
6  public:
7   typemap(model *);
8   ~typemap();
9   void allocate(void *, int);
10   void deallocate(void *);
11   bool assertvalidmemory(void* low, void* high);
12   bool assertvalidmemory(void* ptr, structure *structure);
13   bool asserttype(void *ptr, structure *structure);
14   bool istype(void *ptr, structure *structure);
15   void reset();
16  private:
17   bool checkmemory(void* low, void* high);
18   bool checktype(bool doaction,void *ptr, structure *structure);
19   bool checktype(bool doaction, void *low, void *high,structure *structure, struct rbtree *ttree);
20   structure * findoffsetstructure(structure *s, int offset);
21   model *globalmodel;
22   struct rbtree *alloctree;
23   struct rbtree *typetree;
24 };
25
26 class structuremap {
27   public:
28   structuremap(structure *s);
29   ~structuremap();
30   structure *str;
31   struct rbtree *typetree;
32 };
33 #endif