Changeset 340 for trunk/bin/SubOperation
- Timestamp:
- Sep 28, 2007, 3:32:25 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bin/SubOperation/templates/delegate_class.tab
r338 r340 1 Class Delegate #name# 2 Inherits System.DelegateBase 1 #namespace_begin# 2 Class Delegate #name# 3 Inherits System.DelegateBase 3 4 4 Public 5 Sub Callback() 6 End Sub 7 Sub Callback( sd As System._SimpleDelegate ) 8 Add( sd ) 9 End Sub 10 Sub Call(#params#) 11 Dim i As Long 12 For i = 0 To ELM(simpleDelegates.Count) 13 Dim sd = simpleDelegates[i] 14 __call sd.methodPtr, sd.object, #params# 15 Next 16 End Sub 17 End Class 5 Public 6 Sub #name#() 7 End Sub 8 Sub #name#( dg As #name# ) 9 Add( dg ) 10 End Sub 11 12 #call_method_begin# 13 'Sub Call(...) 14 Dim i As Long 15 For i = 0 To ELM(simpleDelegates.Count) 16 Dim sd = simpleDelegates[i] 17 #result# __delegate_dynamicmethod_call(sd.methodPtr, sd.object, #params#) 18 Next 19 'End Sub 20 #call_method_end# 21 22 Sub Add( dg As #name# ) 23 _Add( dg ) 24 End Sub 25 26 Function Operator+ ( dg As #name# ) As #name# 27 Dim result = New #name#( This ) 28 result._Add( dg ) 29 Return result 30 End Function 31 32 Static Function _CreateDelegate( object As Object, methodPtr As VoidPtr ) As #name# 33 Dim dg = New #name# 34 dg.simpleDelegates.Add( New System._SimpleDelegate( object, methodPtr ) ) 35 Return dg 36 End Function 37 End Class 38 #namespace_end#
Note:
See TracChangeset
for help on using the changeset viewer.