Ignore:
Timestamp:
Sep 7, 2012, 6:45:53 AM (12 years ago)
Author:
chronos
Message:
  • Upraveno: Aktualizace balíčku TemplateGenerics na novější verzi. Se starou nešel projekt správně přeložit.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Packages/TemplateGenerics/Specialized/SpecializedList.pas

    r84 r90  
    9595  procedure AddStream(Stream: TStream);
    9696  procedure AddStreamPart(Stream: TStream; ItemCount: TGListIndex);
     97  procedure WriteBuffer(var Buffer; Count: Integer);
     98  procedure ReadBuffer(var Buffer; Count: Integer);
    9799end;
    98100
     
    146148TListMethod = class(TListMethodBase)
    147149  procedure CallAll;
    148   procedure CallNotifyEvents(Sender: TObject);
    149 end;
     150end;
     151
     152// TListNotifyEventBase<Integer, TNotifyEvent>
     153{$DEFINE TGListIndex := Integer}
     154{$DEFINE TGListItem := TNotifyEvent}
     155{$DEFINE TGList := TListNotifyEventBase}
     156{$DEFINE TGListSortCompare := TListNotifyEventSortCompare}
     157{$DEFINE TGListToStringConverter := TListNotifyEventToStringConverter}
     158{$DEFINE TGListFromStringConverter := TListNotifyEventFromStringConverter}
     159{$DEFINE TGListItemArray := TListNotifyEventItemArray}
     160{$DEFINE INTERFACE}
     161{$I 'GenericList.inc'}
     162
     163// TListNotifyEvent<Integer, TNotifyEvent>
     164TListNotifyEvent = class(TListNotifyEventBase)
     165  procedure CallAll(Sender: TObject);
     166end;
     167
     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
    150187
    151188function StrToStr(Value: string): string;
     
    267304{$I 'GenericList.inc'}
    268305
     306// TListNotifyEventBase<Integer, TNotifyEvent>
     307{$DEFINE TGListIndex := Integer}
     308{$DEFINE TGListItem := TNotifyEvent}
     309{$DEFINE TGList := TListNotifyEventBase}
     310{$DEFINE TGListSortCompare := TListNotifyEventSortCompare}
     311{$DEFINE TGListToStringConverter := TListNotifyEventToStringConverter}
     312{$DEFINE TGListFromStringConverter := TListNotifyEventFromStringConverter}
     313{$DEFINE TGListItemArray := TListNotifyEventItemArray}
     314{$DEFINE IMPLEMENTATION}
     315{$I 'GenericList.inc'}
     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
    269329
    270330function StrToStr(Value: string): string;
     
    272332  Result := Value;
    273333end;
     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
    274348
    275349{ TListChar }
     
    332406end;
    333407
    334 procedure TListMethod.CallNotifyEvents(Sender: TObject);
     408procedure TListNotifyEvent.CallAll(Sender: TObject);
    335409var
    336410  I: TGListIndex;
     
    417491end;
    418492
     493procedure TListByte.WriteBuffer(var Buffer; Count: Integer);
     494begin
     495
     496end;
     497
     498procedure TListByte.ReadBuffer(var Buffer; Count: Integer);
     499begin
     500
     501end;
     502
    419503end.
Note: See TracChangeset for help on using the changeset viewer.