Changeset 7 in dev for BasicCompiler_Common/Const.h
- Timestamp:
- Dec 7, 2006, 3:09:44 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
BasicCompiler_Common/Const.h
r5 r7 9 9 CConstBase(char *Name); 10 10 ~CConstBase(); 11 12 char *GetName(); 11 13 }; 12 14 … … 15 17 int Type; 16 18 _int64 i64data; 19 17 20 public: 21 CConst *pNext; 18 22 19 CConst(char *Name, char *Expression); 23 CConst(char *Name, int Type, _int64 i64data); 24 CConst(char *Name, int value); 20 25 ~CConst(); 26 27 int GetType(); 28 _int64 GetWholeData(); 29 double GetDoubleData(); 21 30 }; 22 31 … … 33 42 //定数管理クラス 34 43 class CDBConst{ 35 CConst **ppobj_Const; 36 int NumOfConst; 44 CConst **ppHash; 37 45 38 46 CConstMacro **ppobj_Macro; 39 47 int NumOfMacro; 48 49 //シングルトンクラスなので、プライベートに置く 50 CDBConst(); 51 ~CDBConst(); 52 void _free(); 53 void Free(); 54 40 55 public: 41 56 42 CDBConst(); 43 ~CDBConst(); 57 void Init(); 44 58 45 59 void Add(char *buffer); 60 private: 61 void AddConst(char *Name, CConst *newconst); 62 public: 63 void AddConst(char *Name, char *Expression); 64 void AddConst(char *Name, int value); 46 65 47 void AddConst(char *Name, char *Expression); 66 private: 67 CConst *GetObjectPtr(char *Name); 68 public: 69 70 int GetType(char *Name); 71 _int64 GetWholeData(char *Name); 72 double GetDoubleData(char *Name); 73 74 75 //シングルトンオブジェクト 76 static CDBConst obj; 48 77 };
Note:
See TracChangeset
for help on using the changeset viewer.