Changeset 203 in dev for trunk/jenga/src


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/src/smoothie/Class.cpp

    r192 r203  
    66
    77
    8 CClass::CClass( const NamespaceScopes &namespaceScopes, const NamespaceScopesCollection &importedNamespaces, const string &name )
    9     : isReady( false )
    10     , Prototype( namespaceScopes, name )
    11     , importedNamespaces( importedNamespaces )
    12     , ConstructorMemberSubIndex( -1 )
    13     , DestructorMemberSubIndex( -1 )
    14     , classType( Class )
    15     , pobj_InheritsClass( NULL )
    16     , vtblNum( 0 )
    17     , iAlign( 0 )
    18     , vtbl_offset( -1 )
    19     , isCompilingConstructor( false )
    20     , isCompilingDestructor( false )
    21     , pobj_NextClass( NULL )
    22 {
    23 }
    248CClass::~CClass(){
    259    // 動的メンバ
     
    284268bool CClass::IsSubClass( const CClass *pClass ) const
    285269{
    286     pClass = pClass->pobj_InheritsClass;
    287     while( pClass ){
    288         if( this == pClass ) return true;
    289         pClass = pClass->pobj_InheritsClass;
     270    if( !pClass->HasSuperClass() )
     271    {
     272        return false;
     273    }
     274
     275    const CClass *pTempClass = &pClass->GetSuperClass();
     276    while( pTempClass ){
     277        if( this == pTempClass ) return true;
     278        pTempClass = &pTempClass->GetSuperClass();
    290279    }
    291280    return false;
Note: See TracChangeset for help on using the changeset viewer.