Changeset 355 for trunk/Include/Classes/System
- Timestamp:
- Oct 13, 2007, 2:11:22 PM (17 years ago)
- Location:
- trunk/Include/Classes/System/Collections
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Include/Classes/System/Collections/ArrayList.ab
r309 r355 2 2 3 3 #require <Classes/System/Collections/misc.ab> 4 5 Namespace System 6 Namespace Collections 4 7 5 8 Class ArrayList … … 351 354 End Class 352 355 353 /* 354 Class ArrayList_Element 355 Public 356 Sub ArrayList_Element() 357 Init(0) 358 End Sub 359 Sub ArrayList_Element(c As Long) 360 Init(c) 361 End Sub 362 363 Sub ~ArrayList_Element() 364 free(Elm) 365 End Sub 366 367 Sub Init(c As Long) 368 If c > 0 Then 369 Elm = malloc(SizeOf (*Object) * c) 370 If Elm = 0 Then 371 ' OutOfMemoryException 372 Debug 373 End If 374 Else 375 Elm = 0 376 End If 377 Size = 0 378 Capacity = c 379 End Sub 380 381 Sub Swap(ByRef x As ArrayList_Element) 382 Dim tmpElm = x.Elm 383 x.Elm = This.Elm 384 This.Elm = tmpElm 385 386 Dim tmpSize = x.Size 387 x.Size = This.Size 388 This.Size = x.Size 389 390 Dim tmpCap = x.Capacity 391 x.Capacity = This.Capacity 392 This.Capacity = tmpCap 393 End Sub 394 395 Elm As **Object 396 Size As Long 397 Capacity As Long 398 End Class 399 */ 356 End Namespace 'Collections 357 End Namespace 'System -
trunk/Include/Classes/System/Collections/misc.ab
r195 r355 3 3 #ifndef __SYSTEM_COLLECTIONS_MISC_AB__ 4 4 #define __SYSTEM_COLLECTIONS_MISC_AB__ 5 6 Namespace System 7 Namespace Collections 5 8 6 9 Interface ICollection … … 114 117 End Class 115 118 119 End Namespace 'Collections 120 End Namespace 'System 121 116 122 #endif '__SYSTEM_COLLECTIONS_MISC_AB__
Note:
See TracChangeset
for help on using the changeset viewer.