Changeset 114 in dev for BasicCompiler_Common/Class.h


Ignore:
Timestamp:
May 10, 2007, 8:52:40 PM (17 years ago)
Author:
dai_9181
Message:

CClassクラスのインスタンスを全面的にconstにした。
TypeDefされたクラスの静的メソッドを呼び出せるようにした。(静的メンバへの対応はまだ)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • BasicCompiler_Common/Class.h

    r108 r114  
    4848    bool isStatic;
    4949
    50     CClass *pobj_InheritsClass;
     50    const CClass *pobj_InheritsClass;
    5151
    5252    CMethod(CMethod *pobj);
     
    8787    ClassType classType;
    8888
    89     bool isUsing;
     89    mutable bool isUsing;
    9090
    9191public:
     
    9494
    9595    //継承クラスへのポインタ
    96     CClass *pobj_InheritsClass;
     96    const CClass *pobj_InheritsClass;
    9797
    9898    //メンバ情報
     
    130130
    131131    bool IsUsing() const;
    132     void Using();
     132    void Using() const;
    133133
    134134    bool IsClass() const;
     
    139139
    140140    //継承させる
    141     bool Inherits( CClass &inheritsClass, int nowLine );
    142     bool InheritsInterface( CClass &inheritsClass, int nowLine );
     141    bool Inherits( const CClass &inheritsClass, int nowLine );
     142    bool InheritsInterface( const CClass &inheritsClass, int nowLine );
    143143
    144144    //メンバ、メソッドの追加
     
    192192    //vtbl
    193193private:
    194     long vtbl_offset;
     194    mutable long vtbl_offset;
    195195public:
    196196    int GetFuncNumInVtbl( const UserProc *pUserProc ) const;
    197     LONG_PTR GetVtblGlobalOffset(void);
     197    LONG_PTR GetVtblGlobalOffset(void) const;
    198198    void ActionVtblSchedule(LONG_PTR ImageBase, LONG_PTR MemPos_CodeSection);
    199199    bool IsAbstract() const;
     
    202202    //コンストラクタをコンパイルしているかどうかのチェックフラグ
    203203private:
    204     bool isCompilingConstructor;
    205 public:
    206     void NotifyStartConstructorCompile();
    207     void NotifyFinishConstructorCompile();
     204    mutable bool isCompilingConstructor;
     205public:
     206    void NotifyStartConstructorCompile() const;
     207    void NotifyFinishConstructorCompile() const;
    208208    bool IsCompilingConstructor() const;
    209209
    210210    //デストラクタをコンパイルしているかどうかのチェックフラグ
    211211private:
    212     bool isCompilingDestructor;
    213 public:
    214     void NotifyStartDestructorCompile();
    215     void NotifyFinishDestructorCompile();
     212    mutable bool isCompilingDestructor;
     213public:
     214    void NotifyStartDestructorCompile() const;
     215    void NotifyFinishDestructorCompile() const;
    216216    bool IsCompilingDestructor() const;
    217217
     
    252252    ~CDBClass();
    253253
    254     CClass *Find( const string &fullName ) const;
    255     CClass *Find( const NamespaceScopes &namespaceScopes, const string &name ) const;
     254    const CClass *Find( const string &fullName ) const;
     255    const CClass *Find( const NamespaceScopes &namespaceScopes, const string &name ) const;
    256256
    257257    CClass *AddClass( const NamespaceScopes &namespaceScopes, const NamespaceScopesCollection &importedNamespaces, const char *name,int nowLine);
     
    283283    /////////////////////////////
    284284private:
    285     CClass *pCompilingClass;
     285    const CClass *pCompilingClass;
    286286    CMethod *pCompilingMethod;
    287287public:
     
    290290
    291291    //現在コンパイル中のメソッド情報を取得
    292     CClass *GetNowCompilingClass();
     292    const CClass *GetNowCompilingClass() const;
    293293    CMethod *GetNowCompilingMethodInfo();
    294294
     
    311311
    312312extern CDBClass *pobj_DBClass;
    313 extern CClass *pobj_CompilingClass;
     313extern const CClass *pobj_CompilingClass;
Note: See TracChangeset for help on using the changeset viewer.