Ignore:
Timestamp:
May 4, 2008, 12:17:40 AM (16 years ago)
Author:
dai_9181
Message:

StartCompileメソッドを廃止し、Usingメソッドのオーバーロードに差し替えた。

File:
1 edited

Legend:

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

    r538 r540  
    1414using namespace ActiveBasic::Compiler;
    1515
     16void CClass::Using() const
     17{
     18    if( this->IsUsing() )
     19    {
     20        // 既に使用することになっている
     21        return;
     22    }
     23
     24    Prototype::Using();
     25
     26    // 仮想関数になるメソッドに使用チェックをつける
     27    const CClass &objThis = *this;
     28    BOOST_FOREACH( const CMethod *pMethod, objThis.GetDynamicMethods() )
     29    {
     30        if( pMethod->IsVirtual() )
     31        {
     32            pMethod->GetUserProc().Using();
     33        }
     34    }
     35}
    1636
    1737bool CClass::IsClass() const
     
    11531173    return Find( NamespaceScopes( AreaName ), NestName );
    11541174}
    1155 void Classes::StartCompile( const UserProc *pUserProc ){
    1156     const CClass *pParentClass = pUserProc->GetParentClassPtr();
    1157     if( pParentClass ){
    1158         pParentClass->Using();
    1159 
    1160         // 仮想関数になるメソッドに使用チェックをつける
    1161         BOOST_FOREACH( const CMethod *pMethod, pParentClass->GetDynamicMethods() )
    1162         {
    1163             if( pMethod->IsVirtual() )
    1164             {
    1165                 pMethod->GetUserProc().Using();
    1166             }
    1167         }
    1168     }
    1169 }
    11701175
    11711176const CClass *Classes::GetStringClassPtr() const
Note: See TracChangeset for help on using the changeset viewer.