Changeset 207
- Timestamp:
- Apr 7, 2007, 3:03:38 PM (18 years ago)
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
Include/Classes/System/Collections/ArrayList.ab
r203 r207 304 304 End Sub 305 305 306 /*Override*/ VirtualFunction ToString() As String306 /*Override*/ Override Function ToString() As String 307 307 Return "System.Collections.ArrayList" 308 308 End Function -
Include/Classes/System/DateTime.ab
r166 r207 272 272 End If 273 273 274 AddTicks.Ticks = ticks + value 275 AddTicks.Kind = Kind 274 Return New DateTime( ticks + value, Kind ) 276 275 End Function 277 276 … … 315 314 End If 316 315 317 AddYears.Ticks = ticks 318 AddYears.Kind = Kind 316 Return New DateTime( ticks, Kind ) 319 317 End Function 320 318 … … 363 361 .wDayOfWeek = DayOfWeek() As Word 364 362 End With 363 364 GetDateTimeFormats = New String() 365 365 366 366 Dim size As Long … … 481 481 ElseIf dateData = &H03 Then 482 482 Return DateTimeKind.Utc 483 Else 484 ' どれにも該当しなかったときはどうなるんでしょうか?? 485 Return DateTimeKind.Local 483 486 End If 484 487 End Function -
Include/Classes/System/Diagnostics/base.ab
r147 r207 12 12 ' コンストラクタ 13 13 Sub _System_TraceBase() 14 Dim defaultTraceListener As DefaultTraceListener15 listeners.Add( defaultTraceListener)14 listeners = New TraceListenerCollection 15 listeners.Add( New DefaultTraceListener() ) 16 16 17 17 indentLevel = 0 -
Include/Classes/System/Object.ab
r195 r207 1 1 Class Object 2 3 ' 実行時型情報4 typeInfo As TypeInfo5 2 6 3 Public … … 37 34 End Function 38 35 */ 36 37 38 '---------------------------------------------------------------- 39 ' 実行時型情報 40 '---------------------------------------------------------------- 41 42 Private 43 typeInfo As TypeInfo 44 45 Public 46 Sub _System_SetType( typeInfo As TypeInfo ) 47 If _System_TypeBase.IsReady() = False Then 48 Return 49 End If 50 51 This.typeInfo = typeInfo 52 End Sub 53 54 Function GetType() As TypeInfo 55 Return typeInfo 56 End Function 57 39 58 End Class 59 Dim aaa As Long -
Include/Classes/System/String.ab
r203 r207 345 345 Private 346 346 Static Function ConcatStrChar(text1 As *StrChar, text1Length As Long, text2 As *StrChar, text2Length As Long) As String 347 ConcatStrChar = New String() 347 348 With ConcatStrChar 348 349 .AllocStringBuffer(text1Length + text2Length) -
Include/Classes/System/TypeInfo.ab
r198 r207 10 10 11 11 Sub TypeInfo() 12 End Sub 13 Sub ~TypeInfo() 12 14 End Sub 13 15 … … 45 47 name As String 46 48 49 Protected 50 47 51 baseType As TypeInfo 48 52 'interfaces As f(^^;;; 49 50 Protected51 53 52 54 Sub TypeBaseImpl() … … 77 79 */ 78 80 81 Sub ~TypeBaseImpl() 82 End Sub 83 79 84 Public 80 85 … … 88 93 End Function 89 94 95 Sub SetBaseType( baseType As TypeInfo ) 96 This.baseType = baseType 97 End Sub 98 90 99 Override Function FullName() As String 91 100 Return strNamespace + "." + name … … 142 151 Public 143 152 Sub _System_TypeForValueType( name As String ) 144 Type Info( "", name )153 TypeBaseImpl( "", name ) 145 154 End Sub 146 155 … … 154 163 Inherits TypeBaseImpl 155 164 Public 156 Sub _System_TypeForClass( strNamespace As String, name As String , baseType As TypeInfo)157 TypeBaseImpl( strNamespace, name , baseType)165 Sub _System_TypeForClass( strNamespace As String, name As String ) 166 TypeBaseImpl( strNamespace, name ) 158 167 End Sub 159 168 Sub ~_System_TypeForClass() … … 162 171 Return True 163 172 End Function 164 165 Sub SetBaseType( baseType As TypeInfo )166 This.baseType = baseType167 End Sub168 173 End Class 169 174 … … 188 193 189 194 '-------------------------------------------------------------------- 190 ' プロセスに存在するすべての型を管理する (シングルトン クラス)195 ' プロセスに存在するすべての型を管理する 191 196 '-------------------------------------------------------------------- 192 197 Class _System_TypeBase 193 pTypes As *TypeInfo 194 count As Long 195 196 Sub _System_TypeBase() 197 pTypes = GC_malloc( 1 ) 198 count = 0 199 End Sub 200 Sub ~_System_TypeBase() 201 End Sub 202 203 Sub Add( typeInfo As TypeInfo ) 198 Static pTypes As *TypeBaseImpl 199 Static count As Long 200 Static isReady = False 201 202 Static Sub Add( typeInfo As TypeBaseImpl ) 204 203 pTypes = realloc( pTypes, ( count + 1 ) * SizeOf(*TypeInfo) ) 205 204 pTypes[count] = typeInfo … … 207 206 End Sub 208 207 209 Function Search( strNamespace As String, typeName As String ) As TypeInfo 208 Static Sub InitializeValueType() 209 ' 値型の追加 210 Add( New _System_TypeForValueType( "Byte" ) ) 211 Add( New _System_TypeForValueType( "SByte" ) ) 212 Add( New _System_TypeForValueType( "Word" ) ) 213 Add( New _System_TypeForValueType( "Integer" ) ) 214 Add( New _System_TypeForValueType( "DWord" ) ) 215 Add( New _System_TypeForValueType( "Long" ) ) 216 Add( New _System_TypeForValueType( "QWord" ) ) 217 Add( New _System_TypeForValueType( "Int64" ) ) 218 Add( New _System_TypeForValueType( "Boolean" ) ) 219 Add( New _System_TypeForValueType( "Single" ) ) 220 Add( New _System_TypeForValueType( "Double" ) ) 221 End Sub 222 223 Static Sub InitializeUserTypes() 224 ' このメソッドの実装はコンパイラが自動生成する 225 226 '例: 227 'Add( New _System_TypeForClass( "System", "String" ) ) 228 'Search( "String" ).SetBaseType( Search( "Object" ) ) 229 End Sub 230 231 Public 232 233 Static Sub Initialize() 234 pTypes = GC_malloc( 1 ) 235 count = 0 236 237 ' 値型を初期化 238 InitializeValueType() 239 240 isReady = True 241 ' Class / Interface / Enum / Delegate を初期化 242 InitializeUserTypes() 243 244 245 OutputDebugString( Ex"ready dynamic meta datas!\r\n" ) 246 End Sub 247 248 Static Sub _NextPointerForGC() 249 ' TODO: 実装 250 End Sub 251 252 Static Function Search( strNamespace As LPSTR, typeName As LPSTR ) As TypeBaseImpl 253 210 254 ' TODO: 名前空間に対応する 211 255 Dim i As Long … … 215 259 End If 216 260 Next 261 217 262 Return Nothing 218 263 End Function 219 264 220 ' シングルトン オブジェクト 221 Static obj As _System_TypeBase 222 223 Static Sub InitializeValueType() 224 ' 値型の追加 225 obj.Add( New _System_TypeForValueType( "Byte" ) ) 226 obj.Add( New _System_TypeForValueType( "SByte" ) ) 227 obj.Add( New _System_TypeForValueType( "Word" ) ) 228 obj.Add( New _System_TypeForValueType( "Integer" ) ) 229 obj.Add( New _System_TypeForValueType( "DWord" ) ) 230 obj.Add( New _System_TypeForValueType( "Long" ) ) 231 obj.Add( New _System_TypeForValueType( "QWord" ) ) 232 obj.Add( New _System_TypeForValueType( "Int64" ) ) 233 obj.Add( New _System_TypeForValueType( "Boolean" ) ) 234 obj.Add( New _System_TypeForValueType( "Single" ) ) 235 obj.Add( New _System_TypeForValueType( "Double" ) ) 236 End Sub 237 238 Static Sub InitializeUserTypes() 239 ' このメソッドの実装はコンパイラが自動生成する 240 241 #generate InitializeUserTypes 242 243 '例: 244 'obj.Add( New _System_TypeForClass( "System", "String" ) ) 245 'obj.Search( "String" ).SetBaseType( Search( "Object" ) ) 246 End Sub 247 248 Public 249 250 Static Sub _NextPointerForGC() 251 ' TODO: 実装 252 End Sub 253 254 Static Sub Initialize() 255 ' 値型を初期化 256 InitializeValueType() 257 258 ' Class / Interface / Enum / Delegate を初期化 259 InitializeUserTypes() 260 End Sub 261 End Class 265 Static Function IsReady() As Boolean 266 Return isReady 267 End Function 268 269 End Class 270 262 271 263 272 ' End Namespace ' System -
Include/basic.sbp
r179 r207 132 132 _System_pGC->Begin() 133 133 134 _System_TypeBase.Initialize() 135 134 136 'Initialize global variables 135 137 _System_InitDllGlobalVariables()
Note:
See TracChangeset
for help on using the changeset viewer.