Rev | Line | |
---|
[131] | 1 | #pragma once
|
---|
| 2 |
|
---|
| 3 | #include <string>
|
---|
| 4 | #include <vector>
|
---|
| 5 |
|
---|
| 6 | #include <Namespace.h>
|
---|
| 7 |
|
---|
| 8 | using namespace std;
|
---|
| 9 |
|
---|
[135] | 10 | class CMethod;
|
---|
| 11 | class UserProc;
|
---|
| 12 |
|
---|
[131] | 13 | class Prototype
|
---|
| 14 | {
|
---|
[137] | 15 | public:
|
---|
| 16 | enum Accessibility{
|
---|
| 17 | None,
|
---|
| 18 | Private,
|
---|
| 19 | Protected,
|
---|
| 20 | Public,
|
---|
| 21 | };
|
---|
| 22 |
|
---|
| 23 | private:
|
---|
[131] | 24 | // 名前空間
|
---|
| 25 | NamespaceScopes namespaceScopes;
|
---|
| 26 |
|
---|
| 27 | //名前
|
---|
| 28 | string name;
|
---|
| 29 |
|
---|
[133] | 30 | mutable bool isUsing;
|
---|
| 31 |
|
---|
[131] | 32 | public:
|
---|
| 33 |
|
---|
| 34 | Prototype( const NamespaceScopes &namespaceScopes, const string &name )
|
---|
| 35 | : namespaceScopes( namespaceScopes )
|
---|
| 36 | , name( name )
|
---|
[133] | 37 | , isUsing( false )
|
---|
[131] | 38 | {
|
---|
| 39 | }
|
---|
| 40 | ~Prototype()
|
---|
| 41 | {
|
---|
| 42 | }
|
---|
| 43 |
|
---|
| 44 | // 名前空間
|
---|
| 45 | const NamespaceScopes &GetNamespaceScopes() const
|
---|
| 46 | {
|
---|
| 47 | return namespaceScopes;
|
---|
| 48 | }
|
---|
| 49 |
|
---|
| 50 | const string &GetName() const
|
---|
| 51 | {
|
---|
| 52 | return name;
|
---|
| 53 | }
|
---|
| 54 |
|
---|
[133] | 55 | //自身と等しいかどうかを確認
|
---|
| 56 | bool IsEquals( const Prototype *prototype ) const
|
---|
| 57 | {
|
---|
| 58 | if( this == prototype ){
|
---|
| 59 | return true;
|
---|
| 60 | }
|
---|
| 61 | return false;
|
---|
| 62 | }
|
---|
| 63 |
|
---|
[134] | 64 | // シンボル比較
|
---|
| 65 | bool IsEqualSymbol( const NamespaceScopes &namespaceScopes, const string &name ) const;
|
---|
[135] | 66 | bool IsEqualSymbol( const Prototype &prototype ) const;
|
---|
[134] | 67 | bool IsEqualSymbol( const string &name ) const;
|
---|
| 68 |
|
---|
[133] | 69 | // 利用状況
|
---|
| 70 | bool IsUsing() const
|
---|
| 71 | {
|
---|
| 72 | return isUsing;
|
---|
| 73 | }
|
---|
| 74 | void Using() const
|
---|
| 75 | {
|
---|
| 76 | isUsing = true;
|
---|
| 77 | }
|
---|
| 78 |
|
---|
[131] | 79 | };
|
---|
[137] | 80 |
|
---|
| 81 | class MemberPrototype
|
---|
| 82 | {
|
---|
| 83 | Prototype::Accessibility accessibility;
|
---|
| 84 | public:
|
---|
| 85 | MemberPrototype( Prototype::Accessibility accessibility )
|
---|
| 86 | : accessibility( accessibility )
|
---|
| 87 | {
|
---|
| 88 | }
|
---|
| 89 |
|
---|
| 90 | Prototype::Accessibility GetAccessibility() const
|
---|
| 91 | {
|
---|
| 92 | return accessibility;
|
---|
| 93 | }
|
---|
| 94 | void SetAccessibility( Prototype::Accessibility accessibility ){
|
---|
| 95 | this->accessibility = accessibility;
|
---|
| 96 | }
|
---|
| 97 |
|
---|
| 98 | bool IsNoneAccess() const
|
---|
| 99 | {
|
---|
| 100 | return ( accessibility == Prototype::None );
|
---|
| 101 | }
|
---|
| 102 | bool IsPrivate() const
|
---|
| 103 | {
|
---|
| 104 | return ( accessibility == Prototype::Private );
|
---|
| 105 | }
|
---|
| 106 | bool IsProtected() const
|
---|
| 107 | {
|
---|
| 108 | return ( accessibility == Prototype::Protected );
|
---|
| 109 | }
|
---|
| 110 | bool IsPublic() const
|
---|
| 111 | {
|
---|
| 112 | return ( accessibility == Prototype::Public );
|
---|
| 113 | }
|
---|
| 114 | };
|
---|
Note:
See
TracBrowser
for help on using the repository browser.