Last change
on this file since 318 was 114, checked in by dai_9181, 17 years ago |
CClassクラスのインスタンスを全面的にconstにした。
TypeDefされたクラスの静的メソッドを呼び出せるようにした。(静的メンバへの対応はまだ)
|
File size:
1.2 KB
|
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 | NamespaceScopes namespaceScopes;
|
---|
16 |
|
---|
17 | string name;
|
---|
18 | string baseName;
|
---|
19 | Type baseType;
|
---|
20 | public:
|
---|
21 | TypeDef( const NamespaceScopes &namespaceScopes, const string &name, const string &baseName );
|
---|
22 | ~TypeDef();
|
---|
23 |
|
---|
24 | const string &GetName() const
|
---|
25 | {
|
---|
26 | return name;
|
---|
27 | }
|
---|
28 | const string &GetBaseName() const
|
---|
29 | {
|
---|
30 | return baseName;
|
---|
31 | }
|
---|
32 | const Type &GetBaseType() const
|
---|
33 | {
|
---|
34 | return baseType;
|
---|
35 | }
|
---|
36 |
|
---|
37 | bool IsEqualSymbol( const NamespaceScopes &namespaceScopes, const string &name ) const;
|
---|
38 | bool IsEqualSymbol( const string &name ) const;
|
---|
39 | };
|
---|
40 |
|
---|
41 | class TypeDefCollection : public vector<TypeDef>
|
---|
42 | {
|
---|
43 | public:
|
---|
44 | TypeDefCollection();
|
---|
45 | ~TypeDefCollection();
|
---|
46 |
|
---|
47 | void Add( const NamespaceScopes &namespaceScopes, const string &name, const string &baseName );
|
---|
48 | int GetIndex( const NamespaceScopes &namespaceScopes, const string &name ) const;
|
---|
49 | int GetIndex( const string &fullName ) const;
|
---|
50 |
|
---|
51 | private:
|
---|
52 | void Add( const NamespaceScopes &namespaceScopes, const string &expression, int nowLine );
|
---|
53 | public:
|
---|
54 | void Init();
|
---|
55 | };
|
---|
Note:
See
TracBrowser
for help on using the repository browser.