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

Last change on this file since 195 was 195, checked in by dai_9181, 17 years ago
File size: 723 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 && namespaceSupporter.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.