source: dev/BasicCompiler_Common/TypeDef.h@ 114

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

CClassクラスのインスタンスを全面的にconstにした。
TypeDefされたクラスの静的メソッドを呼び出せるようにした。(静的メンバへの対応はまだ)

File size: 1.2 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 );
[114]48 int GetIndex( const NamespaceScopes &namespaceScopes, const string &name ) const;
49 int GetIndex( const string &fullName ) const;
[4]50
[78]51private:
[113]52 void Add( const NamespaceScopes &namespaceScopes, const string &expression, int nowLine );
[78]53public:
54 void Init();
[4]55};
Note: See TracBrowser for help on using the repository browser.