Line | |
---|
1 | #pragma once
|
---|
2 |
|
---|
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;
|
---|
18 | public:
|
---|
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 |
|
---|
33 | class TypeDefCollection : public vector<TypeDef>
|
---|
34 | {
|
---|
35 | public:
|
---|
36 | TypeDefCollection();
|
---|
37 | ~TypeDefCollection();
|
---|
38 |
|
---|
39 | void Add( const string &newName, const string &baseName );
|
---|
40 | int GetIndex( const string &typeName ) const;
|
---|
41 |
|
---|
42 | private:
|
---|
43 | void Add( const string &expression, int nowLine );
|
---|
44 | public:
|
---|
45 | void Init();
|
---|
46 | };
|
---|
Note:
See
TracBrowser
for help on using the repository browser.