source: dev/BasicCompiler_Common/TypeDef.h@ 113

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

TypeDef、Declareの名前空間対応を行った。
TypeDef、Declareをローカル領域で使用した際、エラーを表示するようにした。

File size: 1.1 KB
RevLine 
[78]1#pragma once
[4]2
[78]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
[113]15 NamespaceScopes namespaceScopes;
16
17 string name;
[78]18 string baseName;
19 Type baseType;
[4]20public:
[113]21 TypeDef( const NamespaceScopes &namespaceScopes, const string &name, const string &baseName );
[78]22 ~TypeDef();
23
[113]24 const string &GetName() const
25 {
26 return name;
[78]27 }
[113]28 const string &GetBaseName() const
29 {
[78]30 return baseName;
31 }
[113]32 const Type &GetBaseType() const
33 {
[78]34 return baseType;
35 }
[113]36
37 bool IsEqualSymbol( const NamespaceScopes &namespaceScopes, const string &name ) const;
38 bool IsEqualSymbol( const string &name ) const;
[4]39};
40
[78]41class TypeDefCollection : public vector<TypeDef>
42{
[4]43public:
[78]44 TypeDefCollection();
45 ~TypeDefCollection();
[4]46
[113]47 void Add( const NamespaceScopes &namespaceScopes, const string &name, const string &baseName );
[78]48 int GetIndex( const string &typeName ) const;
[4]49
[78]50private:
[113]51 void Add( const NamespaceScopes &namespaceScopes, const string &expression, int nowLine );
[78]52public:
53 void Init();
[4]54};
Note: See TracBrowser for help on using the repository browser.