- Timestamp:
- Dec 23, 2010, 9:50:33 AM (14 years ago)
- Location:
- Generics/TemplateGenerics
- Files:
-
- 4 added
- 2 deleted
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
Generics/TemplateGenerics/Generic/GenericList.inc
r91 r101 26 26 procedure AddArray(Values: array of TGListItem); 27 27 procedure AddList(List: TGList); 28 procedure Assign( List: TGList);28 procedure Assign(Source: TGList); virtual; 29 29 procedure Clear; virtual; 30 30 procedure Contract; … … 126 126 end; 127 127 128 procedure TGList.Assign( List: TGList);128 procedure TGList.Assign(Source: TGList); 129 129 var 130 130 I: Integer; 131 131 begin 132 Count := List.Count;132 Count := Source.Count; 133 133 I := 0; 134 134 while I < Count do begin 135 Items[I] := List[I];135 Items[I] := Source[I]; 136 136 I := I + 1; 137 137 end; -
Generics/TemplateGenerics/Specialized/SpecializedList.pas
r92 r101 52 52 53 53 // TListString<Integer, string> 54 {$DEFINE TGList Index := Integer}55 {$DEFINE TGList Item := string}56 {$DEFINE TGList := TListString}57 {$DEFINE TGListS ortCompare := TListStringSortCompare}58 {$DEFINE TGList ToStringConverter := TListStringToStringConverter}59 {$DEFINE TGList FromStringConverter := TListStringFromStringConverter}60 {$DEFINE INTERFACE} 61 {$I 'GenericList .inc'}54 {$DEFINE TGListStringIndex := Integer} 55 {$DEFINE TGListStringItem := string} 56 {$DEFINE TGListString := TListString} 57 {$DEFINE TGListStringSortCompare := TListStringSortCompare} 58 {$DEFINE TGListStringToStringConverter := TListStringToStringConverter} 59 {$DEFINE TGListStringFromStringConverter := TListStringFromStringConverter} 60 {$DEFINE INTERFACE} 61 {$I 'GenericListString.inc'} 62 62 63 63 // TListByte<Integer, Byte> … … 80 80 {$DEFINE INTERFACE} 81 81 {$I 'GenericList.inc'} 82 83 // TListObject<Integer, TObject> 84 {$DEFINE TGListObjectIndex := Integer} 85 {$DEFINE TGListObjectItem := TObject} 86 {$DEFINE TGListObjectList := TObjectListListObject} 87 {$DEFINE TGListObject := TListObject} 88 {$DEFINE TGListObjectSortCompare := TObjectListSortCompareObject} 89 {$DEFINE TGListObjectToStringConverter := TObjectListToStringConverterObject} 90 {$DEFINE TGListObjectFromStringConverter := TObjectListFromStringConverterObject} 91 {$DEFINE INTERFACE} 92 {$I 'GenericListObject.inc'} 93 82 94 83 95 { TListChar } … … 140 152 141 153 // TListString<Integer, string> 142 {$DEFINE TGList Index := Integer}143 {$DEFINE TGList Item := string}144 {$DEFINE TGList := TListString}145 {$DEFINE TGListS ortCompare := TListStringSortCompare}146 {$DEFINE TGList ToStringConverter := TListStringToStringConverter}147 {$DEFINE TGList FromStringConverter := TListStringFromStringConverter}148 {$DEFINE IMPLEMENTATION} 149 {$I 'GenericList .inc'}154 {$DEFINE TGListStringIndex := Integer} 155 {$DEFINE TGListStringItem := string} 156 {$DEFINE TGListString := TListString} 157 {$DEFINE TGListStringSortCompare := TListStringSortCompare} 158 {$DEFINE TGListStringToStringConverter := TListStringToStringConverter} 159 {$DEFINE TGListStringFromStringConverter := TListStringFromStringConverter} 160 {$DEFINE IMPLEMENTATION} 161 {$I 'GenericListString.inc'} 150 162 151 163 // TListByte<Integer, Byte> … … 169 181 {$I 'GenericList.inc'} 170 182 183 // TListObject<Integer, TObject> 184 {$DEFINE TGListObjectIndex := Integer} 185 {$DEFINE TGListObjectItem := TObject} 186 {$DEFINE TGListObjectList := TObjectListListObject} 187 {$DEFINE TGListObject := TListObject} 188 {$DEFINE TGListObjectSortCompare := TObjectListSortCompareObject} 189 {$DEFINE TGListObjectToStringConverter := TObjectListToStringConverterObject} 190 {$DEFINE TGListObjectFromStringConverter := TObjectListFromStringConverterObject} 191 {$DEFINE IMPLEMENTATION} 192 {$I 'GenericListObject.inc'} 193 194 171 195 172 196 function StrToStr(Value: string): string; -
Generics/TemplateGenerics/TemplateGenerics.lpk
r91 r101 33 33 </Item3> 34 34 <Item4> 35 <Filename Value="Generic\Generic ObjectList.inc"/>35 <Filename Value="Generic\GenericListObject.inc"/> 36 36 <Type Value="Include"/> 37 37 </Item4> … … 81 81 </Item15> 82 82 <Item16> 83 <Filename Value="Specialized\SpecializedObjectList.pas"/> 84 <UnitName Value="SpecializedObjectList"/> 83 <Filename Value="Generic\GenericListString.inc"/> 85 84 </Item16> 86 85 </Files> -
Generics/TemplateGenerics/TemplateGenerics.pas
r91 r101 9 9 uses 10 10 SpecializedList, SpecializedDictionary, SpecializedStack, SpecializedTree, 11 SpecializedQueue, SpecializedSet, SpecializedObjectList,LazarusPackageIntf;11 SpecializedQueue, SpecializedSet, LazarusPackageIntf; 12 12 13 13 implementation
Note:
See TracChangeset
for help on using the changeset viewer.