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

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

Prototypeクラスをちょっとだけ装飾

File size: 866 bytes
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 IsUsing() const
54 {
55 return isUsing;
56 }
57 void Using() const
58 {
59 isUsing = true;
60 }
61
62};
Note: See TracBrowser for help on using the repository browser.