Changeset 340 for trunk/Include
- Timestamp:
- Sep 28, 2007, 3:32:25 AM (17 years ago)
- Location:
- trunk/Include/Classes/System
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Include/Classes/System/Collections/Generic/List.ab
r305 r340 97 97 size++ 98 98 End Sub 99 100 /*! 101 @brief List内で最初に出現する値を削除する 102 @author Daisuke Yamamoto 103 @date 2007/09/28 104 @return 値が削除されたときはTrue、されなかったときはFlaseが返る 105 */ 106 Function Remove( item As T ) As Boolean 107 Dim index = IndexOf( item ) 108 If index = -1 Then 109 Return False 110 End If 111 memmove( items + index*SizeOf(VoidPtr), items + (index+1)*SizeOf(VoidPtr), (size-(index+1))*SizeOf(VoidPtr) ) 112 Realloc( size - 1 ) 113 Return True 114 End Function 99 115 End Class 100 116 -
trunk/Include/Classes/System/Delegate.ab
r338 r340 1 1 Namespace System 2 2 3 3 4 Class _SimpleDelegate 4 5 Public 6 hasThisPtr As Boolean 5 7 object As Object 6 8 methodPtr As VoidPtr 7 9 8 10 Sub _SimpleDelegate( object As Object, methodPtr As VoidPtr ) 11 This.hasThisPtr = True 9 12 This.object = object 13 This.methodPtr = methodPtr 14 End Sub 15 Sub _SimpleDelegate( methodPtr As VoidPtr ) 16 This.hasThisPtr = False 17 This.object = Nothing 10 18 This.methodPtr = methodPtr 11 19 End Sub … … 16 24 simpleDelegates As System.Collections.Generic.List<_SimpleDelegate> 17 25 26 Sub _Add( dg As DelegateBase ) 27 Dim i As Long 28 For i=0 To ELM(dg.simpleDelegates.Count) 29 simpleDelegates.Add( dg.simpleDelegates[i] ) 30 Next 31 End Sub 32 18 33 Public 19 34 Sub DelegateBase() 20 35 simpleDelegates = New System.Collections.Generic.List<_SimpleDelegate>() 21 36 End Sub 22 Sub Add( sd As System._SimpleDelegate ) 23 simpleDelegates.Add( sd ) 24 End Sub 37 38 /* 39 Sub Operator + ( sd As System._SimpleDelegate ) 40 Add( sd ) 41 End Sub*/ 25 42 Public 26 43 End Class … … 28 45 29 46 End Namespace 47 48 49 Function _System_CreateSimpleDynamicDelegate( object As Object, methodPtr As VoidPtr ) As System._SimpleDelegate 50 Return New System._SimpleDelegate( object, methodPtr ) 51 End Function 52 Function _System_CreateSimpleStaticDelegate( methodPtr As VoidPtr ) As System._SimpleDelegate 53 Return New System._SimpleDelegate( methodPtr ) 54 End Function -
trunk/Include/Classes/System/Runtime/InteropServices/GCHandle.ab
r282 r340 1 1 ' Classes/System/Runtime/InteropServices/GCHandle.ab 2 3 #require <Classes/System/Collections/ArrayList.ab>4 2 5 3 Namespace System … … 69 67 handle As VoidPtr 70 68 71 Static allocated As /*System.Collections.*/ArrayList69 Static allocated = New System.Collections.Generic.List<Object> 72 70 End Class 73 71
Note:
See TracChangeset
for help on using the changeset viewer.