Ignore:
Timestamp:
Sep 8, 2012, 9:28:39 PM (12 years ago)
Author:
chronos
Message:
  • Updated: Component versions.
  • Added: Missing forms.
Location:
trunk
Files:
2 added
7 edited

Legend:

Unmodified
Added
Removed
  • trunk

    • Property svn:ignore
      •  

        old new  
        33backup
        44tunneler.exe
         5heaptrclog.trc
  • trunk/Components/TemplateGenerics

    • Property svn:ignore set to
      lib
  • trunk/Components/TemplateGenerics/Specialized/SpecializedBitmap.pas

    r29 r30  
    66
    77uses
    8   Classes, SysUtils, Graphics;
     8  Classes, SysUtils,
     9  Graphics, FPImage;
    910
    1011type
     
    2627{$I 'GenericBitmap.inc'}
    2728
     29// TBitmapTFPColor<Integer, Integer, TFPColor>
     30{$DEFINE TGBitmapIndexX := Integer}
     31{$DEFINE TGBitmapIndexY := Integer}
     32{$DEFINE TGBitmapItem := TFPColor}
     33{$DEFINE TGBitmapIndex := TBitmapTFPColorIndex}
     34{$DEFINE TGBitmapRow := TBitmapTFPColorRow}
     35{$DEFINE TGBitmapMatrix := TBitmapTFPColorMatrix}
     36{$DEFINE TGBitmap := TBitmapTFPColor}
     37{$DEFINE TGBitmapSortCompare := TBitmapTFPColorSortCompare}
     38{$DEFINE TGBitmapToStringConverter := TBitmapTFPColorToStringConverter}
     39{$DEFINE TGBitmapFromStringConverter := TBitmapTFPColorFromStringConverter}
     40{$DEFINE TGBitmapMerge := TBitmapTFPColorMerge}
     41{$DEFINE INTERFACE}
     42{$I 'GenericBitmap.inc'}
    2843
    2944implementation
     
    4762{$I 'GenericBitmap.inc'}
    4863
     64// TBitmapTFPColor<Integer, Integer, TFPColor>
     65{$DEFINE TGBitmapIndexX := Integer}
     66{$DEFINE TGBitmapIndexY := Integer}
     67{$DEFINE TGBitmapItem := TFPColor}
     68{$DEFINE TGBitmapIndex := TBitmapTFPColorIndex}
     69{$DEFINE TGBitmapRow := TBitmapTFPColorRow}
     70{$DEFINE TGBitmapMatrix := TBitmapTFPColorMatrix}
     71{$DEFINE TGBitmap := TBitmapTFPColor}
     72{$DEFINE TGBitmapSortCompare := TBitmapTFPColorSortCompare}
     73{$DEFINE TGBitmapToStringConverter := TBitmapTFPColorToStringConverter}
     74{$DEFINE TGBitmapFromStringConverter := TBitmapTFPColorFromStringConverter}
     75{$DEFINE TGBitmapMerge := TBitmapTFPColorMerge}
     76{$DEFINE IMPLEMENTATION}
     77{$I 'GenericBitmap.inc'}
     78
    4979end.
    5080
  • trunk/Components/TemplateGenerics/Specialized/SpecializedDictionary.pas

    r29 r30  
    1717{$DEFINE TGPairValue := string}
    1818{$DEFINE TGDictionary := TDictionaryStringString}
    19 {$DEFINE TGDictionaryList := TDictionaryList}
    20 {$DEFINE TGDictionarySortCompare := TDictionarySortCompareInteger}
    21 {$DEFINE TGDictionaryToStringConverter := TDictionaryToStringConverterInteger}
    22 {$DEFINE TGDictionaryFromStringConverter := TDictionaryFromStringConverterInteger}
    23 {$DEFINE TGDictionaryItemArray := TDictionaryStringItemArray}
     19{$DEFINE TGDictionaryList := TDictionaryStringStringList}
     20{$DEFINE TGDictionarySortCompare := TDictionaryStringStringSortCompare}
     21{$DEFINE TGDictionaryToStringConverter := TDictionaryStringStringToStringConverter}
     22{$DEFINE TGDictionaryFromStringConverter := TDictionaryStringStringFromStringConverter}
     23{$DEFINE TGDictionaryItemArray := TDictionaryStringStringItemArray}
    2424{$DEFINE INTERFACE}
    2525{$I 'GenericDictionary.inc'}
    2626
     27// TDictionaryIntegerString<Integer, TPair<Integer, string>>
     28{$DEFINE TGDictionaryIndex := Integer}
     29{$DEFINE TGPair := TPairIntegerString}
     30{$DEFINE TGPairKey := Integer}
     31{$DEFINE TGPairValue := string}
     32{$DEFINE TGDictionary := TDictionaryIntegerString}
     33{$DEFINE TGDictionaryList := TDictionaryIntegerStringList}
     34{$DEFINE TGDictionarySortCompare := TDictionaryIntegerStringSortCompare}
     35{$DEFINE TGDictionaryToStringConverter := TDictionaryIntegerStringToStringConverter}
     36{$DEFINE TGDictionaryFromStringConverter := TDictionaryIntegerStringFromStringConverter}
     37{$DEFINE TGDictionaryItemArray := TDictionaryIntegerStringItemArray}
     38{$DEFINE INTERFACE}
     39{$I 'GenericDictionary.inc'}
     40
     41
    2742implementation
     43
     44{$DEFINE IMPLEMENTATION_USES}
     45{$I '..\Generic\GenericDictionary.inc'}
     46
    2847
    2948// TDictionaryStringString<Integer, TPair<string, string>>
     
    3352{$DEFINE TGPairValue := string}
    3453{$DEFINE TGDictionary := TDictionaryStringString}
    35 {$DEFINE TGDictionaryList := TDictionaryList}
    36 {$DEFINE TGDictionarySortCompare := TDictionarySortCompareInteger}
    37 {$DEFINE TGDictionaryToStringConverter := TDictionaryToStringConverterInteger}
    38 {$DEFINE TGDictionaryFromStringConverter := TDictionaryFromStringConverterInteger}
    39 {$DEFINE TGDictionaryItemArray := TDictionaryStringItemArray}
     54{$DEFINE TGDictionaryList := TDictionaryStringStringList}
     55{$DEFINE TGDictionarySortCompare := TDictionaryStringStringSortCompare}
     56{$DEFINE TGDictionaryToStringConverter := TDictionaryStringStringToStringConverter}
     57{$DEFINE TGDictionaryFromStringConverter := TDictionaryStringStringFromStringConverter}
     58{$DEFINE TGDictionaryItemArray := TDictionaryStringStringItemArray}
    4059{$DEFINE IMPLEMENTATION}
    4160{$I 'GenericDictionary.inc'}
    4261
     62// TDictionaryIntegerString<Integer, TPair<Integer, string>>
     63{$DEFINE TGDictionaryIndex := Integer}
     64{$DEFINE TGPair := TPairIntegerString}
     65{$DEFINE TGPairKey := Integer}
     66{$DEFINE TGPairValue := string}
     67{$DEFINE TGDictionary := TDictionaryIntegerString}
     68{$DEFINE TGDictionaryList := TDictionaryIntegerStringList}
     69{$DEFINE TGDictionarySortCompare := TDictionaryIntegerStringSortCompare}
     70{$DEFINE TGDictionaryToStringConverter := TDictionaryIntegerStringToStringConverter}
     71{$DEFINE TGDictionaryFromStringConverter := TDictionaryIntegerStringFromStringConverter}
     72{$DEFINE TGDictionaryItemArray := TDictionaryIntegerStringItemArray}
     73{$DEFINE IMPLEMENTATION}
     74{$I 'GenericDictionary.inc'}
     75
     76
    4377end.
  • trunk/Components/TemplateGenerics/Specialized/SpecializedList.pas

    r29 r30  
    8080{$DEFINE TGListIndex := Integer}
    8181{$DEFINE TGListItem := Byte}
    82 {$DEFINE TGList := TListByte}
     82{$DEFINE TGList := TListByteBase}
    8383{$DEFINE TGListSortCompare := TListByteSortCompare}
    8484{$DEFINE TGListToStringConverter := TListByteToStringConverter}
     
    8787{$DEFINE INTERFACE}
    8888{$I 'GenericList.inc'}
     89
     90TListByte = class(TListByteBase)
     91  procedure WriteToStream(Stream: TStream);
     92  procedure WriteToStreamPart(Stream: TStream; ItemIndex, ItemCount: TGListIndex);
     93  procedure ReplaceStream(Stream: TStream);
     94  procedure ReplaceStreamPart(Stream: TStream; ItemIndex, ItemCount: TGListIndex);
     95  procedure AddStream(Stream: TStream);
     96  procedure AddStreamPart(Stream: TStream; ItemCount: TGListIndex);
     97  procedure WriteBuffer(var Buffer; Count: Integer);
     98  procedure ReadBuffer(var Buffer; Count: Integer);
     99end;
    89100
    90101// TListChar<Integer, Char>
     
    137148TListMethod = class(TListMethodBase)
    138149  procedure CallAll;
    139   procedure CallNotifyEvents(Sender: TObject);
    140 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
    141187
    142188function StrToStr(Value: string): string;
     
    216262{$DEFINE TGListIndex := Integer}
    217263{$DEFINE TGListItem := Byte}
    218 {$DEFINE TGList := TListByte}
     264{$DEFINE TGList := TListByteBase}
    219265{$DEFINE TGListSortCompare := TListByteSortCompare}
    220266{$DEFINE TGListToStringConverter := TListByteToStringConverter}
     
    258304{$I 'GenericList.inc'}
    259305
     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
    260329
    261330function StrToStr(Value: string): string;
     
    263332  Result := Value;
    264333end;
     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
    265348
    266349{ TListChar }
     
    323406end;
    324407
    325 procedure TListMethod.CallNotifyEvents(Sender: TObject);
     408procedure TListNotifyEvent.CallAll(Sender: TObject);
    326409var
    327410  I: TGListIndex;
     
    334417end;
    335418
     419{ TListByte }
     420
     421procedure TListByte.WriteToStream(Stream: TStream);
     422var
     423  I: Integer;
     424begin
     425  Stream.Position := 0;
     426  I := 0;
     427  while I < Count do begin
     428    Stream.WriteByte(Items[I]);
     429    I := I + 1;
     430  end;
     431end;
     432
     433procedure TListByte.WriteToStreamPart(Stream: TStream; ItemIndex, ItemCount: Integer);
     434var
     435  I: Integer;
     436begin
     437  I := ItemIndex;
     438  while I < ItemCount do begin
     439    Stream.WriteByte(Items[I]);
     440    I := I + 1;
     441  end;
     442end;
     443
     444procedure TListByte.ReplaceStream(Stream: TStream);
     445var
     446  I: Integer;
     447begin
     448  Stream.Position := 0;
     449  I := 0;
     450  while I < Count do begin
     451    Items[I] := Stream.ReadByte;
     452    I := I + 1;
     453  end;
     454end;
     455
     456procedure TListByte.ReplaceStreamPart(Stream: TStream; ItemIndex,
     457  ItemCount: Integer);
     458var
     459  I: Integer;
     460begin
     461  I := ItemIndex;
     462  while I < ItemCount do begin
     463    Items[I] := Stream.ReadByte;
     464    I := I + 1;
     465  end;
     466end;
     467
     468procedure TListByte.AddStream(Stream: TStream);
     469var
     470  I: Integer;
     471begin
     472  Stream.Position := 0;
     473  I := Count;
     474  Count := Count + Stream.Size;
     475  while I < Count do begin
     476    Items[I] := Stream.ReadByte;
     477    I := I + 1;
     478  end;
     479end;
     480
     481procedure TListByte.AddStreamPart(Stream: TStream; ItemCount: Integer);
     482var
     483  I: Integer;
     484begin
     485  I := Count;
     486  Count := Count + ItemCount;
     487  while I < Count do begin
     488    Items[I] := Stream.ReadByte;
     489    I := I + 1;
     490  end;
     491end;
     492
     493procedure TListByte.WriteBuffer(var Buffer; Count: Integer);
     494begin
     495
     496end;
     497
     498procedure TListByte.ReadBuffer(var Buffer; Count: Integer);
     499begin
     500
     501end;
     502
    336503end.
  • trunk/Components/TemplateGenerics/Specialized/SpecializedMatrix.pas

    r29 r30  
    11unit SpecializedMatrix;
    22
    3 {$mode objfpc}{$H+}
     3{$mode Delphi}{$H+}
    44
    55interface
  • trunk/Components/TemplateGenerics/Specialized/SpecializedPoint.pas

    r29 r30  
    11unit SpecializedPoint;
    22
    3 {$mode objfpc}{$H+}
     3{$mode Delphi}{$H+}
    44
    55interface
     
    1111
    1212type
    13   TPoint2DIndex = (piX, piY);
    14 
    15 // TPoint2D<TPoint2DIndex, Integer>
    16 {$DEFINE TGPointIndex := TPoint2DIndex}
     13// TPoint<Integer>
    1714{$DEFINE TGPointType := Integer}
    18 {$DEFINE TGPoint := TPoint2D}
     15{$DEFINE TGPoint := TPoint}
    1916{$DEFINE INTERFACE}
    2017{$I 'GenericPoint.inc'}
     18
     19// TSmallPoint<SmallInt>
     20{$DEFINE TGPointType := SmallInt}
     21{$DEFINE TGPoint := TSmallPoint}
     22{$DEFINE INTERFACE}
     23{$I 'GenericPoint.inc'}
     24
     25// TPointSingle<Single>
     26{$DEFINE TGPointType := Single}
     27{$DEFINE TGPoint := TPointSingle}
     28{$DEFINE INTERFACE}
     29{$I 'GenericPoint.inc'}
     30
     31// TPointDouble<Double>
     32{$DEFINE TGPointType := Double}
     33{$DEFINE TGPoint := TPointDouble}
     34{$DEFINE INTERFACE}
     35{$I 'GenericPoint.inc'}
     36
    2137implementation
    2238
    23 // TPoint2D<TPoint2DIndex, Integer>
    24 {$DEFINE TGPointIndex := T2DPointIndex}
     39// TPoint<Integer>
    2540{$DEFINE TGPointType := Integer}
    26 {$DEFINE TGPoint := TPoint2D}
     41{$DEFINE TGPoint := TPoint}
    2742{$DEFINE IMPLEMENTATION}
    2843{$I 'GenericPoint.inc'}
    2944
     45// TSmallPoint<SmallInt>
     46{$DEFINE TGPointType := SmallInt}
     47{$DEFINE TGPoint := TSmallPoint}
     48{$DEFINE IMPLEMENTATION}
     49{$I 'GenericPoint.inc'}
     50
     51// TPointSingle<Single>
     52{$DEFINE TGPointType := Single}
     53{$DEFINE TGPoint := TPointSingle}
     54{$DEFINE IMPLEMENTATION}
     55{$I 'GenericPoint.inc'}
     56
     57// TPointDouble<Double>
     58{$DEFINE TGPointType := Double}
     59{$DEFINE TGPoint := TPointDouble}
     60{$DEFINE IMPLEMENTATION}
     61{$I 'GenericPoint.inc'}
    3062end.
    3163
Note: See TracChangeset for help on using the changeset viewer.