Ignore:
Timestamp:
May 5, 2008, 10:41:25 AM (16 years ago)
Author:
dai_9181
Message:

Overrideメソッド内で発生したエラーのエラーメッセージ表示処理は呼び出し元で行うようにした。

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ab5.0/abdev/BasicCompiler_Common/include/Method.h

    r523 r558  
    3737        this->pUserProc = pUserProc;
    3838    }
    39 
    40     virtual bool Override( const UserProc *pUserProc, Prototype::Accessibility accessibility, bool isOverrideModifier ) = 0;
    4139
    4240    virtual bool IsAbstract() const = 0;
     
    5452class DynamicMethod : public CMethod
    5553{
     54public:
     55    struct OverrideResult
     56    {
     57        enum EnumType
     58        {
     59            Successful = 0,             // オーバーライドに成功
     60            NotVirtual,                 // 非Virtualメソッドに対してオーバーライドを行おうとした
     61            NotUseOverrideModifier,     // Override修飾子が無い状況で基底クラスの実体メソッドをオーバーライドしようとした
     62            DifferentAccesibility,      // オーバーライド元、先のアクセシビリティに相違がある
     63        };
     64
     65        EnumType enumType;
     66        const CMethod *pMethod;
     67    };
     68
     69private:
    5670    bool isAbstract;
    5771    bool isVirtual;
     
    100114    }
    101115
    102     virtual bool Override( const UserProc *pUserProc, Prototype::Accessibility accessibility, bool isOverrideModifier );
     116    DynamicMethod::OverrideResult::EnumType Override( const UserProc *pUserProc, Prototype::Accessibility accessibility, bool isOverrideModifier );
    103117
    104118    virtual bool IsAbstract() const
     
    250264            pUserProc 照らし合わせる関数
    251265    */
    252     CMethod *FindForOverride( const Types &actualTypeParametersForThisMethods, const UserProc *pUserProc );
     266    DynamicMethod *FindForOverride( const Types &actualTypeParametersForThisMethods, const UserProc *pUserProc );
    253267
    254268    const CMethod *GetMethodPtr( const UserProc *pUserProc ) const;
Note: See TracChangeset for help on using the changeset viewer.