source: dev/trunk/abdev/BasicCompiler_Common/src/VariableImpl.cpp@ 201

Last change on this file since 201 was 199, checked in by dai_9181, 17 years ago
File size: 737 bytes
Line 
1#include <Compiler.h>
2#include <VariableImpl.h>
3#include <NamespaceSupporter.h>
4
5bool VariableImpl::IsEqualSymbol( const Symbol &symbol, bool isSupportStaticMember ) const
6{
7 if( GetName() == symbol.GetName()
8 && compiler.GetNamespaceSupporter().IsSameAreaNamespace( this->GetNamespaceScopes(), symbol.GetNamespaceScopes() ) )
9 {
10 return true;
11 }
12
13 if( isSupportStaticMember && symbol.GetNamespaceScopes().size() >= 1 )
14 {
15 // 静的メンバを考慮
16 NamespaceScopes namespaceScopes( symbol.GetNamespaceScopes() );
17 string name = namespaceScopes[namespaceScopes.size()-1] + "." + symbol.GetName();
18 namespaceScopes.pop_back();
19
20 return IsEqualSymbol( Symbol( namespaceScopes, name ), false );
21 }
22 return false;
23}
Note: See TracBrowser for help on using the repository browser.