Ignore:
Timestamp:
Jul 3, 2007, 3:49:18 AM (17 years ago)
Author:
dai_9181
Message:

jengaライブラリに一通りserializeメソッドを仕込んだ

File:
1 edited

Legend:

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

    r200 r203  
    5454    NamespaceScopesCollection importedNamespaces;
    5555
    56     // 継承するインターフェイス
     56    // 実装するインターフェイス
    5757    Interfaces interfaces;
     58   
     59    // 継承クラス
     60    const CClass *pSuperClass;
    5861
    5962    // Blittable型情報
     
    7780
    7881    // XMLシリアライズ用
     82    // TODO: xml実装
    7983private:
    8084    friend class boost::serialization::access;
     
    8589        ar & BOOST_SERIALIZATION_NVP( importedNamespaces );
    8690        //ar & BOOST_SERIALIZATION_NVP( interfaces );
     91        ar & boost::serialization::make_nvp( "pSuperClass", const_cast<CClass *&>(pSuperClass) );
    8792        ar & BOOST_SERIALIZATION_NVP( blittableType );
    8893        //ar & BOOST_SERIALIZATION_NVP( dynamicMembers );
     
    99104
    100105public:
    101     //継承クラスへのポインタ
    102     const CClass *pobj_InheritsClass;
    103106
    104107    //アラインメント値
    105108    int iAlign;
    106109
    107     CClass( const NamespaceScopes &namespaceScopes, const NamespaceScopesCollection &importedNamespaces, const string &name );
     110    CClass( const NamespaceScopes &namespaceScopes, const NamespaceScopesCollection &importedNamespaces, const string &name )
     111        : isReady( false )
     112        , Prototype( namespaceScopes, name )
     113        , importedNamespaces( importedNamespaces )
     114        , ConstructorMemberSubIndex( -1 )
     115        , DestructorMemberSubIndex( -1 )
     116        , classType( Class )
     117        , pSuperClass( NULL )
     118        , vtblNum( 0 )
     119        , iAlign( 0 )
     120        , vtbl_offset( -1 )
     121        , isCompilingConstructor( false )
     122        , isCompilingDestructor( false )
     123        , pobj_NextClass( NULL )
     124    {
     125    }
    108126    CClass()
    109         : Prototype()
     127        : isReady( false )
     128        , Prototype()
     129        , importedNamespaces()
     130        , ConstructorMemberSubIndex( -1 )
     131        , DestructorMemberSubIndex( -1 )
     132        , classType()
     133        , pSuperClass( NULL )
     134        , vtblNum( 0 )
     135        , iAlign( 0 )
     136        , vtbl_offset( -1 )
     137        , isCompilingConstructor( false )
     138        , isCompilingDestructor( false )
     139        , pobj_NextClass( NULL )
    110140    {
    111141    }
     
    130160    }
    131161    bool IsInheritsInterface( const CClass *pInterfaceClass ) const;
     162
     163    // 継承元クラス
     164    bool HasSuperClass() const
     165    {
     166        return ( pSuperClass != NULL );
     167    }
     168    const CClass &GetSuperClass() const
     169    {
     170        return *pSuperClass;
     171    }
     172    void SetSuperClass( const CClass *pSuperClass )
     173    {
     174        this->pSuperClass = pSuperClass;
     175    }
    132176
    133177    // Blittable型
Note: See TracChangeset for help on using the changeset viewer.