Ignore:
Timestamp:
Aug 7, 2012, 2:42:58 PM (12 years ago)
Author:
chronos
Message:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Generics/TemplateGenerics/Specialized/SpecializedList.pas

    r367 r398  
    166166end;
    167167
     168
     169TBaseEvent = 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>
     183TListSimpleEvent = class(TListSimpleEventBase)
     184  procedure CallAll;
     185end;
     186
     187
    168188function StrToStr(Value: string): string;
    169189
     
    295315{$I 'GenericList.inc'}
    296316
     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
    297329
    298330function StrToStr(Value: string): string;
     
    300332  Result := Value;
    301333end;
     334
     335{ TListSimpleEvent }
     336
     337procedure TListSimpleEvent.CallAll;
     338var
     339  I: TGListIndex;
     340begin
     341  I := 0;
     342  while (I < Count) do begin
     343    TBaseEvent(Items[I])();
     344    I := I + 1;
     345  end;
     346end;
     347
    302348
    303349{ TListChar }
Note: See TracChangeset for help on using the changeset viewer.