Ignore:
Timestamp:
Oct 4, 2007, 2:50:09 AM (17 years ago)
Author:
dai
Message:

System.Collections.Generic.List.RemoveAtメソッドを追加
デリゲート型に対する"-"演算子を追加

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Include/Classes/System/Delegate.ab

    r340 r352  
    1818        This.methodPtr = methodPtr
    1919    End Sub
     20
     21    Function IsEqual( sd As _SimpleDelegate ) As Boolean
     22        Return ( This.hasThisPtr = sd.hasThisPtr and ObjPtr(This.object) = ObjPtr(sd.object) and This.methodPtr = sd.methodPtr )
     23    End Function
    2024End Class
    2125
     
    2832        For i=0 To ELM(dg.simpleDelegates.Count)
    2933            simpleDelegates.Add( dg.simpleDelegates[i] )
     34        Next
     35    End Sub
     36
     37    Sub _Delete( dg As DelegateBase )
     38        Dim i As Long
     39        For i=0 To ELM(This.simpleDelegates.Count)
     40            Dim i2 As Long
     41            Dim isExist = False
     42            For i2=0 To ELM(dg.simpleDelegates.Count)
     43                If This.simpleDelegates[i].IsEqual( dg.simpleDelegates[i2] ) Then
     44                    isExist = True
     45                End If
     46            Next
     47            If isExist Then
     48                This.simpleDelegates.RemoveAt( i )
     49            End If
    3050        Next
    3151    End Sub
Note: See TracChangeset for help on using the changeset viewer.