Changeset 78 in dev for BasicCompiler_Common/TypeDef.h
- Timestamp:
- Mar 25, 2007, 2:47:49 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
BasicCompiler_Common/TypeDef.h
r46 r78 1 #pragma once 1 2 2 class CTypeDef{ 3 #include <vector> 4 #include <string> 5 6 #include "../Type.h" 7 8 using namespace std; 9 10 class TypeDefCollection; 11 12 class TypeDef{ 13 friend TypeDefCollection; 14 15 string newName; 16 string baseName; 17 Type baseType; 3 18 public: 4 char *lpszName; 5 char *lpszBaseName; 6 CTypeDef(const char *name,char *base); 7 ~CTypeDef(); 19 TypeDef( const string &newName, const string &baseName ); 20 ~TypeDef(); 21 22 const string &GetNewName(){ 23 return newName; 24 } 25 const string &GetBaseName(){ 26 return baseName; 27 } 28 const Type &GetBaseType(){ 29 return baseType; 30 } 8 31 }; 9 32 10 class CDBTypeDef{ 33 class TypeDefCollection : public vector<TypeDef> 34 { 11 35 public: 12 CTypeDef **ppobj_TypeDef; 13 int iNum; 14 CDBTypeDef(); 15 ~CDBTypeDef(); 36 TypeDefCollection(); 37 ~TypeDefCollection(); 16 38 17 void init(); 39 void Add( const string &newName, const string &baseName ); 40 int GetIndex( const string &typeName ) const; 18 41 19 void add(const char *name,char *base); 20 int check(const char *name); 42 private: 43 void Add( const string &expression, int nowLine ); 44 public: 45 void Init(); 21 46 }; 22 extern CDBTypeDef *pobj_DBTypeDef;23 24 25 void AddTypeDefData(char *Command);
Note:
See TracChangeset
for help on using the changeset viewer.