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