Ignore:
Timestamp:
May 3, 2008, 6:32:50 PM (16 years ago)
Author:
dai_9181
Message:

Compiler::pCompilingClassメンバをprivateにし、setter/getterにあたるメソッドを用意した。

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ab5.0/abdev/BasicCompiler_Common/VariableOpe.cpp

    r508 r536  
    457457
    458458    //アクセシビリティをチェック
    459     if( &objClass == compiler.pCompilingClass ){
     459    if( compiler.IsCompilingClass() && &objClass == &compiler.GetCompilingClass() ){
    460460        //同一クラスオブジェクトの場合はプライベートアクセスを容認する
    461461        if( pMember->IsNoneAccess() ){
     
    571571    }
    572572
    573     if(compiler.pCompilingClass){
     573    if( compiler.IsCompilingClass() ){
    574574        ///////////////////////
    575575        // クラスメンバの参照
     
    578578        if(lstrcmpi(variable,"This")==0){
    579579            //Thisオブジェクト
    580             resultType.SetType( DEF_OBJECT, compiler.pCompilingClass );
     580            resultType.SetType( DEF_OBJECT, &compiler.GetCompilingClass() );
    581581            return true;
    582582        }
     
    590590            //クラス内の動的メンバを参照するとき(通常)
    591591
    592             if( !compiler.pCompilingClass->HasDynamicMember( VarName ) )
     592            if( !compiler.GetCompilingClass().HasDynamicMember( VarName ) )
    593593            {
    594594                goto NonClassMember;
     
    597597
    598598        return GetMemberType(
    599             Type( DEF_OBJECT, *compiler.pCompilingClass ),
     599            Type( DEF_OBJECT, compiler.GetCompilingClass() ),
    600600            variable,
    601601            resultType,
     
    653653    }
    654654
    655     if(compiler.pCompilingClass){
     655    if( compiler.IsCompilingClass() ){
    656656        //自身のクラスから静的メンバを参照する場合
    657657        char temp2[VN_SIZE];
    658         sprintf(temp2,"%s.%s",compiler.pCompilingClass->GetName().c_str(),VarName);
     658        sprintf(temp2,"%s.%s",compiler.GetCompilingClass().GetName().c_str(),VarName);
    659659
    660660        pVar = compiler.GetObjectModule().meta.GetGlobalVars().Find( LexicalAnalyzer::FullNameToSymbol( temp2 ) );
     
    916916
    917917    //クラス名
    918     if(compiler.pCompilingClass){
    919         lstrcat(FullName,compiler.pCompilingClass->GetName().c_str());
     918    if( compiler.IsCompilingClass() ){
     919        lstrcat(FullName,compiler.GetCompilingClass().GetName().c_str());
    920920        lstrcat(FullName,"%");
    921921    }
Note: See TracChangeset for help on using the changeset viewer.