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