source: dev/trunk/jenga/src/smoothie/Procedure.cpp@ 187

Last change on this file since 187 was 186, checked in by dai_9181, 17 years ago
File size: 1.8 KB
Line 
1#include <jenga/include/smoothie/Class.h>
2#include <jenga/include/smoothie/SmoothieException.h>
3
4string UserProc::GetFullName() const
5{
6 if( HasParentClass() ){
7 return GetParentClass().GetName() + "." + GetName();
8 }
9
10 return GetName();
11}
12bool UserProc::IsVirtual() const
13{
14 if( pMethod == NULL ){
15 return false;
16 }
17 return ( pMethod->IsVirtual() != 0 );
18}
19const NamespaceScopes &UserProc::GetNamespaceScopes() const
20{
21 if( !pParentClass ){
22 SmoothieException::Throw();
23 }
24 return pParentClass->GetNamespaceScopes();
25}
26const NamespaceScopesCollection &UserProc::GetImportedNamespaces() const
27{
28 if( !pParentClass ){
29 SmoothieException::Throw();
30 }
31 return pParentClass->GetImportedNamespaces();
32}
33bool UserProc::IsEqualSymbol( const NamespaceScopes &namespaceScopes, const string &name ) const
34{
35 SmoothieException::Throw();
36 return false;
37}
38
39bool DllProc::IsEqualSymbol( const NamespaceScopes &namespaceScopes, const string &name ) const
40{
41 if( GetName() != name ){
42 return false;
43 }
44 return NamespaceScopes::IsSameArea( this->namespaceScopes, namespaceScopes );
45}
46bool DllProc::IsEqualSymbol( const string &fullName ) const
47{
48 char AreaName[VN_SIZE] = ""; //オブジェクト変数
49 char NestName[VN_SIZE] = ""; //入れ子メンバ
50 bool isNest = CClass::SplitName( fullName.c_str(), AreaName, NestName );
51
52 if( IsEqualSymbol( NamespaceScopes( AreaName ), NestName ) ){
53 return true;
54 }
55
56 if( isNest ){
57 // 静的メンバを考慮
58
59 char AreaName2[VN_SIZE] = ""; //オブジェクト変数
60 char NestName2[VN_SIZE] = ""; //入れ子メンバ
61 bool isNest = CClass::SplitName( AreaName, AreaName2, NestName2 );
62 lstrcat( NestName2, "." );
63 lstrcat( NestName2, NestName );
64
65 return IsEqualSymbol( NamespaceScopes( AreaName2 ), NestName2 );
66 }
67
68 return false;
69}
70
71UserProc *UserProc::pCompilingUserProc = NULL;
Note: See TracBrowser for help on using the repository browser.