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

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

Method/Memberのリファクタリング

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 CMethod;
11class UserProc;
12
13class Prototype
14{
15 // 名前空間
16 NamespaceScopes namespaceScopes;
17
18 //名前
19 string name;
20
21 mutable bool isUsing;
22
23public:
24
25 Prototype( const NamespaceScopes &namespaceScopes, const string &name )
26 : namespaceScopes( namespaceScopes )
27 , name( name )
28 , isUsing( false )
29 {
30 }
31 ~Prototype()
32 {
33 }
34
35 // 名前空間
36 const NamespaceScopes &GetNamespaceScopes() const
37 {
38 return namespaceScopes;
39 }
40
41 const string &GetName() const
42 {
43 return name;
44 }
45
46 //自身と等しいかどうかを確認
47 bool IsEquals( const Prototype *prototype ) const
48 {
49 if( this == prototype ){
50 return true;
51 }
52 return false;
53 }
54
55 // シンボル比較
56 bool IsEqualSymbol( const NamespaceScopes &namespaceScopes, const string &name ) const;
57 bool IsEqualSymbol( const Prototype &prototype ) const;
58 bool IsEqualSymbol( const string &name ) const;
59
60 // 利用状況
61 bool IsUsing() const
62 {
63 return isUsing;
64 }
65 void Using() const
66 {
67 isUsing = true;
68 }
69
70};
Note: See TracBrowser for help on using the repository browser.