Ignore:
Timestamp:
Apr 1, 2007, 2:27:00 AM (18 years ago)
Author:
dai
Message:

TypeInfoの修正。

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Include/Classes/System/TypeInfo.ab

    r196 r198  
    4242    Inherits TypeInfo
    4343
     44    strNamespace As String
    4445    name As String
    45     strNamespace As String
    4646
    4747    baseType As TypeInfo
     
    5151
    5252    Sub TypeBaseImpl()
     53        strNamespace = ""
    5354        name = ""
    54         strNamespace = ""
    5555        baseType = Nothing
    5656    End Sub
    5757
    58     Sub TypeBaseImpl( name As String, strNamespace As String )
     58    Sub TypeBaseImpl( strNamespace As String, name As String )
     59        This.strNamespace = strNamespace
    5960        This.name = name
     61        This.baseType = Nothing
     62    End Sub
     63
     64    Sub TypeBaseImpl( strNamespace As String, name As String, baseType As TypeInfo )
    6065        This.strNamespace = strNamespace
    61         This.baseType = Nothing
    62     End Sub
    63 
    64     Sub TypeBaseImpl( name As String, strNamespace As String, baseType As TypeInfo )
    6566        This.name = name
     67        This.baseType = baseType
     68    End Sub
     69
     70    /*
     71    Sub TypeBaseImpl( strNamespace As String, name As String, baseType As Type, interfaces As ... )
    6672        This.strNamespace = strNamespace
     73        This.name = name
    6774        This.baseType = baseType
    68     End Sub
    69 
    70     /*
    71     Sub TypeBaseImpl( name As String, strNamespace As String, baseType As Type, interfaces As ... )
    72         TypeBaseImpl( name, strNamespace, baseType )
     75        This.interfaces = interfaces
    7376    End Sub
    7477    */
     
    139142Public
    140143    Sub _System_TypeForValueType( name As String )
    141         TypeInfo( name, "" )
     144        TypeInfo( "", name )
    142145    End Sub
    143146
     
    151154    Inherits TypeBaseImpl
    152155Public
    153     Sub _System_TypeForClass( name As String, strNamespace As String, baseType As TypeInfo )
    154         TypeBaseImpl( name, strNamespace, baseType )
     156    Sub _System_TypeForClass( strNamespace As String, name As String, baseType As TypeInfo )
     157        TypeBaseImpl( strNamespace, name, baseType )
    155158    End Sub
    156159    Sub ~_System_TypeForClass()
     
    159162        Return True
    160163    End Function
     164
     165    Sub SetBaseType( baseType As TypeInfo )
     166        This.baseType = baseType
     167    End Sub
    161168End Class
    162169
     
    232239        ' このメソッドの実装はコンパイラが自動生成する
    233240
     241#generate InitializeUserTypes
     242
    234243        '例:
    235         'obj.Add( New _System_TypeForClass( "String", "", obj.Search( "Object" ) ) )
     244        'obj.Add( New _System_TypeForClass( "System", "String" ) )
     245        'obj.Search( "String" ).SetBaseType( Search( "Object" ) )
    236246    End Sub
    237247
Note: See TracChangeset for help on using the changeset viewer.