source: dev/BasicCompiler_Common/TypeDef.h@ 78

Last change on this file since 78 was 78, checked in by dai_9181, 17 years ago

CTypeDef → TypeDef
Houseクラスを追加。
オーバーロードレベルの種類を追加(レベル1に挿入)

File size: 797 bytes
Line 
1#pragma once
2
3#include <vector>
4#include <string>
5
6#include "../Type.h"
7
8using namespace std;
9
10class TypeDefCollection;
11
12class TypeDef{
13 friend TypeDefCollection;
14
15 string newName;
16 string baseName;
17 Type baseType;
18public:
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 }
31};
32
33class TypeDefCollection : public vector<TypeDef>
34{
35public:
36 TypeDefCollection();
37 ~TypeDefCollection();
38
39 void Add( const string &newName, const string &baseName );
40 int GetIndex( const string &typeName ) const;
41
42private:
43 void Add( const string &expression, int nowLine );
44public:
45 void Init();
46};
Note: See TracBrowser for help on using the repository browser.