Changeset 398 for Generics/TemplateGenerics/Specialized/SpecializedList.pas
- Timestamp:
- Aug 7, 2012, 2:42:58 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Generics/TemplateGenerics/Specialized/SpecializedList.pas
r367 r398 166 166 end; 167 167 168 169 TBaseEvent = procedure of object; 170 171 // TListSimpleEventBase<Integer, TBaseEvent> 172 {$DEFINE TGListIndex := Integer} 173 {$DEFINE TGListItem := TBaseEvent} 174 {$DEFINE TGList := TListSimpleEventBase} 175 {$DEFINE TGListSortCompare := TListSimpleEventSortCompare} 176 {$DEFINE TGListToStringConverter := TListSimpleEventToStringConverter} 177 {$DEFINE TGListFromStringConverter := TListSimpleEventFromStringConverter} 178 {$DEFINE TGListItemArray := TListSimpleEventItemArray} 179 {$DEFINE INTERFACE} 180 {$I 'GenericList.inc'} 181 182 // TListSimpleEvent<Integer, TSimpleEvent> 183 TListSimpleEvent = class(TListSimpleEventBase) 184 procedure CallAll; 185 end; 186 187 168 188 function StrToStr(Value: string): string; 169 189 … … 295 315 {$I 'GenericList.inc'} 296 316 317 // TListSimpleEventBase<Integer, TBaseEvent> 318 {$DEFINE TGListIndex := Integer} 319 {$DEFINE TGListItem := TBaseEvent} 320 {$DEFINE TGList := TListSimpleEventBase} 321 {$DEFINE TGListSortCompare := TListSimpleEventSortCompare} 322 {$DEFINE TGListToStringConverter := TListSimpleEventToStringConverter} 323 {$DEFINE TGListFromStringConverter := TListSimpleEventFromStringConverter} 324 {$DEFINE TGListItemArray := TListSimpleEventItemArray} 325 {$DEFINE IMPLEMENTATION} 326 {$I 'GenericList.inc'} 327 328 297 329 298 330 function StrToStr(Value: string): string; … … 300 332 Result := Value; 301 333 end; 334 335 { TListSimpleEvent } 336 337 procedure TListSimpleEvent.CallAll; 338 var 339 I: TGListIndex; 340 begin 341 I := 0; 342 while (I < Count) do begin 343 TBaseEvent(Items[I])(); 344 I := I + 1; 345 end; 346 end; 347 302 348 303 349 { TListChar }
Note:
See TracChangeset
for help on using the changeset viewer.