Ignore:
Timestamp:
Jun 24, 2007, 2:05:40 PM (17 years ago)
Author:
dai_9181
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/jenga/include/smoothie/Class.h

    r180 r181  
    4646    };
    4747
    48 private:
     48protected:
    4949    ClassType classType;
    5050
    5151    bool isReady;
    52     void Readed(){
    53         isReady = true;
    54     }
    55     bool IsReady() const{
    56         return isReady;
    57     }
    5852
    5953    // importされている名前空間
     
    9084    CClass( const NamespaceScopes &namespaceScopes, const NamespaceScopesCollection &importedNamespaces, const string &name );
    9185    ~CClass();
     86
     87    void Readed(){
     88        isReady = true;
     89    }
     90    bool IsReady() const{
     91        return isReady;
     92    }
    9293
    9394    const NamespaceScopesCollection &GetImportedNamespaces() const
     
    126127    }
    127128
    128     //継承させる
    129     bool Inherits( const char *inheritNames, int nowLine );
    130     bool InheritsClass( const CClass &inheritsClass, int nowLine );
    131     bool InheritsInterface( const CClass &inheritsClass, int nowLine );
    132 
    133     //メンバ、メソッドの追加
    134     void AddMember( Prototype::Accessibility accessibility, bool idConst, bool isRef, char *buffer );
    135     void AddStaticMember( Prototype::Accessibility accessibility, bool isConst, bool isRef, char *buffer, int nowLine );
     129    // 継承させる
     130    virtual bool Inherits( const char *inheritNames, int nowLine ) = 0;
     131    virtual bool InheritsClass( const CClass &inheritsClass, int nowLine ) = 0;
     132    virtual bool InheritsInterface( const CClass &inheritsClass, int nowLine ) = 0;
     133
     134    virtual void AddMember( Prototype::Accessibility accessibility, bool idConst, bool isRef, char *buffer, int nowLine ) = 0;
     135    virtual void AddStaticMember( Prototype::Accessibility accessibility, bool isConst, bool isRef, char *buffer, int nowLine ) = 0;
     136
     137    virtual void AddMethod(CClass *pobj_c, Prototype::Accessibility accessibility, BOOL bStatic, bool isConst, bool isAbstract,
     138        bool isVirtual, bool isOverride, char *buffer, int nowLine) = 0;
    136139
    137140    //重複チェック
     
    173176    }
    174177
    175     //デフォルト コンストラクタ メソッドを取得
     178    //デフォルト コンストラクタ
    176179    const CMethod *GetConstructorMethod() const;
     180    void SetConstructorMemberSubIndex( int constructorMemberSubIndex )
     181    {
     182        this->ConstructorMemberSubIndex = constructorMemberSubIndex;
     183    }
    177184
    178185    //デストラクタ メソッドを取得
    179186    const CMethod *GetDestructorMethod() const;
     187    void SetDestructorMemberSubIndex( int destructorMemberSubIndex )
     188    {
     189        this->DestructorMemberSubIndex = destructorMemberSubIndex;
     190    }
    180191
    181192    // vtblに存在する仮想関数の数
     
    209220
    210221    //vtbl
    211 private:
     222protected:
    212223    mutable long vtbl_offset;
    213224public:
    214225    int GetFuncNumInVtbl( const UserProc *pUserProc ) const;
    215     LONG_PTR GetVtblGlobalOffset(void) const;
    216     void ActionVtblSchedule(LONG_PTR ImageBase, LONG_PTR MemPos_CodeSection);
     226    virtual LONG_PTR GetVtblGlobalOffset(void) const = 0;
     227    virtual void ActionVtblSchedule(LONG_PTR ImageBase, LONG_PTR MemPos_CodeSection) = 0;
    217228    bool IsAbstract() const;
    218229
     
    306317    const CClass *Find( const NamespaceScopes &namespaceScopes, const string &name ) const;
    307318
    308     CClass *AddClass( const NamespaceScopes &namespaceScopes, const NamespaceScopesCollection &importedNamespaces, const char *name,int nowLine);
     319    virtual CClass *Create( const NamespaceScopes &namespaceScopes, const NamespaceScopesCollection &importedNamespaces, const char *name) = 0;
     320    CClass *Add( const NamespaceScopes &namespaceScopes, const NamespaceScopesCollection &importedNamespaces, const char *name,int nowLine);
    309321
    310322    void ActionVtblSchedule(LONG_PTR ImageBase, LONG_PTR MemPos_CodeSection);
    311323
    312 private:
    313     void AddMethod(CClass *pobj_c, Prototype::Accessibility accessibility, BOOL bStatic, bool isConst, bool isAbstract,
    314         bool isVirtual, bool isOverride, char *buffer, int nowLine);
    315     BOOL MemberVar_LoopRefCheck(const CClass &objClass);
    316324public:
    317325
    318326    // 実体収集
    319327    virtual void CollectClassesForNameOnly( const BasicSource &source ) = 0;
     328    virtual void GetClass_recur(const char *lpszInheritsClass) = 0;
    320329    virtual void GetAllClassInfo() = 0;
    321330    virtual void Compile_System_InitializeUserTypes() = 0;
Note: See TracChangeset for help on using the changeset viewer.