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

Last change on this file since 192 was 192, checked in by dai_9181, 17 years ago
File size: 1.6 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 string &fullName ) const
40{
41 char AreaName[VN_SIZE] = ""; //オブジェクト変数
42 char NestName[VN_SIZE] = ""; //入れ子メンバ
43 bool isNest = CClass::SplitName( fullName.c_str(), AreaName, NestName );
44
45 if( IsEqualSymbol( NamespaceScopes( AreaName ), NestName ) ){
46 return true;
47 }
48
49 if( isNest ){
50 // 静的メンバを考慮
51
52 char AreaName2[VN_SIZE] = ""; //オブジェクト変数
53 char NestName2[VN_SIZE] = ""; //入れ子メンバ
54 bool isNest = CClass::SplitName( AreaName, AreaName2, NestName2 );
55 lstrcat( NestName2, "." );
56 lstrcat( NestName2, NestName );
57
58 return IsEqualSymbol( NamespaceScopes( AreaName2 ), NestName2 );
59 }
60
61 return false;
62}
63
64UserProc *UserProc::pCompilingUserProc = NULL;
Note: See TracBrowser for help on using the repository browser.