Ignore:
Timestamp:
Mar 24, 2008, 8:05:20 PM (16 years ago)
Author:
dai_9181
Message:

Messenger/ErrorMessengerクラスを導入。SetError関数によるエラー生成を廃止した。

Location:
trunk/ab5.0/abdev/BasicCompiler_Common/include
Files:
1 added
3 edited

Legend:

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

    r461 r465  
    11#pragma once
    22
     3#include <Messenger.h>
    34#include <CodeGenerator.h>
    45#include <NamespaceSupporter.h>
     
    8586        return namespaceSupporter;
    8687    }
     88
     89    // メッセンジャー
     90    Messenger messenger;
     91    ErrorMessenger errorMessenger;
    8792
    8893    // コード生成機構
  • trunk/ab5.0/abdev/BasicCompiler_Common/include/Method.h

    r382 r465  
    55class UserProc;
    66class CClass;
    7 void SetError();
    87
    98class CMethod : public MemberPrototype
     
    175174    }
    176175
    177     virtual bool Override( const UserProc *pUserProc, Prototype::Accessibility accessibility, bool isOverrideModifier ){SetError();return false;}
    178 
    179     virtual bool IsAbstract() const{SetError();return false;}
    180     virtual void SetAbstractMark( bool isAbstract ){SetError();}
     176    virtual bool Override( const UserProc *pUserProc, Prototype::Accessibility accessibility, bool isOverrideModifier )
     177    {
     178        throw;
     179    }
     180
     181    virtual bool IsAbstract() const
     182    {
     183        throw;
     184    }
     185    virtual void SetAbstractMark( bool isAbstract )
     186    {
     187        throw;
     188    }
    181189    virtual bool IsVirtual() const{
    182190        return false;
    183191    }
    184     virtual bool IsConst() const{SetError();return false;}
     192    virtual bool IsConst() const
     193    {
     194        throw;
     195    }
    185196    virtual bool IsDynamic() const
    186197    {
     
    191202        return true;
    192203    }
    193     virtual const CClass *GetInheritsClassPtr() const{SetError();return NULL;}
    194     virtual void SetInheritsClassPtr( const CClass *pInheritsClass ){SetError();}
     204    virtual const CClass *GetInheritsClassPtr() const
     205    {
     206        throw;
     207    }
     208    virtual void SetInheritsClassPtr( const CClass *pInheritsClass )
     209    {
     210        throw;
     211    }
    195212    virtual bool IsNotUse() const
    196213    {
     
    199216    virtual void SetNotUseMark( bool isNotUse )
    200217    {
    201         SetError();
     218        throw;
    202219    }
    203220};
  • trunk/ab5.0/abdev/BasicCompiler_Common/include/NativeCode.h

    r370 r465  
    119119        return lpValue;
    120120    }
    121     const ::DllProc &GetDllProc() const
    122     {
    123         if( type != Schedule::DllProc )
    124         {
    125             SetError();
    126         }
    127         return *pDllProc;
    128     }
    129     const ::UserProc &GetUserProc() const
    130     {
    131         if( !( type == Schedule::UserProc || type == Schedule::AddressOf || type == Schedule::CatchAddress ) )
    132         {
    133             SetError();
    134         }
    135         return *pUserProc;
    136     }
    137     const ::CClass &GetClass() const
    138     {
    139         if( !( type == Schedule::ComVtbl || type == Schedule::Vtbl || type == Schedule::TypeInfo ) )
    140         {
    141             SetError();
    142         }
    143         return *pClass;
    144     }
    145 
    146     void SpecifyAddressOf()
    147     {
    148         if( type != Schedule::UserProc )
    149         {
    150             SetError();
    151         }
    152         type = Schedule::AddressOf;
    153     }
    154     void SpecifyCatchAddress()
    155     {
    156         if( type != Schedule::UserProc )
    157         {
    158             SetError();
    159         }
    160         type = Schedule::CatchAddress;
    161     }
     121    const ::DllProc &GetDllProc() const;
     122    const ::UserProc &GetUserProc() const;
     123    const ::CClass &GetClass() const;
     124
     125    void SpecifyAddressOf();
     126    void SpecifyCatchAddress();
    162127};
    163128typedef std::vector<Schedule> Schedules;
Note: See TracChangeset for help on using the changeset viewer.