source: dev/BasicCompiler_Common/include/Prototype.h@ 134

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

Prototype::IsEqualSymbolメソッドを実装。

File size: 1.1 KB
Line 
1#pragma once
2
3#include <string>
4#include <vector>
5
6#include <Namespace.h>
7
8using namespace std;
9
10class Prototype
11{
12 // 名前空間
13 NamespaceScopes namespaceScopes;
14
15 //名前
16 string name;
17
18 mutable bool isUsing;
19
20public:
21
22 Prototype( const NamespaceScopes &namespaceScopes, const string &name )
23 : namespaceScopes( namespaceScopes )
24 , name( name )
25 , isUsing( false )
26 {
27 }
28 ~Prototype()
29 {
30 }
31
32 // 名前空間
33 const NamespaceScopes &GetNamespaceScopes() const
34 {
35 return namespaceScopes;
36 }
37
38 const string &GetName() const
39 {
40 return name;
41 }
42
43 //自身と等しいかどうかを確認
44 bool IsEquals( const Prototype *prototype ) const
45 {
46 if( this == prototype ){
47 return true;
48 }
49 return false;
50 }
51
52 // シンボル比較
53 bool IsEqualSymbol( const NamespaceScopes &namespaceScopes, const string &name ) const;
54 bool IsEqualSymbol( const Prototype &objClass ) const;
55 bool IsEqualSymbol( const string &name ) const;
56
57 // 利用状況
58 bool IsUsing() const
59 {
60 return isUsing;
61 }
62 void Using() const
63 {
64 isUsing = true;
65 }
66
67};
Note: See TracBrowser for help on using the repository browser.