Ignore:
Timestamp:
Oct 13, 2007, 2:11:22 PM (17 years ago)
Author:
イグトランス (egtra)
Message:

FormatIntegerDを実装。
UnitTestの失敗時の表示を目立つようにした。
ArrayListを名前空間System.Collectionsに入れた。

Location:
trunk/Include/Classes/System/Collections
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Include/Classes/System/Collections/ArrayList.ab

    r309 r355  
    22
    33#require <Classes/System/Collections/misc.ab>
     4
     5Namespace System
     6Namespace Collections
    47
    58Class ArrayList
     
    351354End Class
    352355
    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 */
     356End Namespace 'Collections
     357End Namespace 'System
  • trunk/Include/Classes/System/Collections/misc.ab

    r195 r355  
    33#ifndef __SYSTEM_COLLECTIONS_MISC_AB__
    44#define __SYSTEM_COLLECTIONS_MISC_AB__
     5
     6Namespace System
     7Namespace Collections
    58
    69Interface ICollection
     
    114117End Class
    115118
     119End Namespace 'Collections
     120End Namespace 'System
     121
    116122#endif '__SYSTEM_COLLECTIONS_MISC_AB__
Note: See TracChangeset for help on using the changeset viewer.