Ignore:
Timestamp:
Jun 5, 2008, 10:04:39 PM (16 years ago)
Author:
dai_9181
Message:

ジェネリッククラスの型パラメータに値型が指定されたときに限り、テンプレート展開を行うようにした。

TODO: libファイルを跨ってテンプレート展開ができていないため、ソースコード管理部分に手を加える必要あり。

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ab5.0/abdev/ab_common/include/Lexical/Class.h

    r603 r632  
    22
    33class UserProc;
     4class UserProcs;
    45class Delegate;
     6class Classes;
    57
    68class ClassPrototype : public Prototype, public DynamicMethodsPrototype
     
    7880    //アラインメント値
    7981    int fixedAlignment;
     82
     83public:
     84    ActiveBasic::Common::Lexical::ExpandedTemplateClasses expandedTemplateClasses;
    8085
    8186    // XMLシリアライズ用
     
    101106        ar & BOOST_SERIALIZATION_NVP( staticMethods );
    102107        ar & BOOST_SERIALIZATION_NVP( fixedAlignment );
     108        ar & BOOST_SERIALIZATION_NVP( expandedTemplateClasses );
    103109    }
    104110
     
    106112public:
    107113
    108     CClass( const NamespaceScopes &namespaceScopes, const NamespaceScopesCollection &importedNamespaces, const std::string &name )
    109         : ClassPrototype( namespaceScopes, name )
    110         , importedNamespaces( importedNamespaces )
    111         , classType( Class )
    112         , pSuperClass( NULL )
    113         , blittableType( Type() )
    114         , isReady( false )
    115         , fixedAlignment( 0 )
    116         , ConstructorMemberSubIndex( -1 )
    117         , DestructorMemberSubIndex( -1 )
    118         , vtblNum( 0 )
    119         , vtbl_offset( -1 )
    120         , comVtblOffset( 0 )
    121         , isCompilingConstructor( false )
    122         , isCompilingDestructor( false )
    123         , cacheSize( 0 )
    124     {
    125     }
    126     CClass()
    127         : ClassPrototype()
    128         , importedNamespaces()
    129         , classType()
    130         , pSuperClass( NULL )
    131         , blittableType( Type() )
    132         , isReady( false )
    133         , fixedAlignment( 0 )
    134         , ConstructorMemberSubIndex( -1 )
    135         , DestructorMemberSubIndex( -1 )
    136         , vtblNum( 0 )
    137         , vtbl_offset( -1 )
    138         , comVtblOffset( 0 )
    139         , isCompilingConstructor( false )
    140         , isCompilingDestructor( false )
    141         , cacheSize( 0 )
    142     {
    143     }
    144     ~CClass()
    145     {
    146         // 動的メンバ
    147         BOOST_FOREACH( Member *member, dynamicMembers )
    148         {
    149             delete member;
    150         }
    151 
    152         // 静的メンバ
    153         BOOST_FOREACH( Member *member, staticMembers )
    154         {
    155             delete member;
    156         }
    157 
    158         // インターフェイス
    159         BOOST_FOREACH( ::Interface *pInterface, interfaces )
    160         {
    161             delete pInterface;
    162         }
    163     }
     114    CClass( const NamespaceScopes &namespaceScopes, const NamespaceScopesCollection &importedNamespaces, const std::string &name );
     115    CClass( const NamespaceScopes &namespaceScopes,
     116        const NamespaceScopesCollection &importedNamespaces,
     117        const std::string &name, ClassType classType,
     118        const GenericTypes &formalGenericTypes,
     119        const Types &superClassActualTypeParameters,
     120        int ConstructorMemberSubIndex,
     121        int DestructorMemberSubIndex,
     122        int vtblNum,
     123        int fixedAlignment );
     124    CClass();
     125    ~CClass();
    164126
    165127    virtual const std::string &GetKeyName() const
     
    273235        this->classType = classType;
    274236    }
     237    ClassType GetClassType() const
     238    {
     239        return classType;
     240    }
    275241
    276242
     
    314280        return interfaces;
    315281    }
     282    Interfaces &GetInterfaces()
     283    {
     284        return interfaces;
     285    }
    316286    bool IsInheritsInterface( const CClass *pInterfaceClass ) const;
    317287
     
    372342        this->ConstructorMemberSubIndex = constructorMemberSubIndex;
    373343    }
     344    int GetConstructorMemberSubIndex() const
     345    {
     346        return ConstructorMemberSubIndex;
     347    }
    374348
    375349    //デストラクタ メソッドを取得
     
    382356    {
    383357        this->DestructorMemberSubIndex = destructorMemberSubIndex;
     358    }
     359    int GetDestructorMemberSubIndex() const
     360    {
     361        return DestructorMemberSubIndex;
    384362    }
    385363
Note: See TracChangeset for help on using the changeset viewer.