Changeset 84 for Generics/TemplateGenerics/Generic/GenericObjectList.inc
- Timestamp:
- Oct 31, 2010, 3:14:23 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Generics/TemplateGenerics/Generic/GenericObjectList.inc
r83 r84 1 1 {$IFDEF INTERFACE} 2 2 3 TListIndex = TObjectListIndex; 4 TListItem = TObjectListItem; 5 {$DEFINE INTERFACE} 6 {$INCLUDE 'GenericList.inc'} 3 {$DEFINE TGListIndex := TGObjectListIndex} 4 {$DEFINE TGListItem := TGObjectListItem} 5 {$DEFINE TGList := TGObjectListList} 6 {$DEFINE TGListSortCompare := TGObjectListSortCompare} 7 {$DEFINE TGListStringConverter := TObjectListStringConverter} 8 {$DEFINE INTERFACE} 9 {$INCLUDE 'GenericList.inc'} 7 10 8 11 // TGObjectList<TObjectListIndex, TObjectListItem> = class(TGList) 9 12 TGObjectList = class(TGList) 10 13 private 11 procedure Put(Index: T ListIndex; const AValue: TListItem); override;14 procedure Put(Index: TGListIndex; const AValue: TGListItem); override; 12 15 public 13 16 OwnsObjects: Boolean; 14 procedure Delete(Index: T ListIndex); override;17 procedure Delete(Index: TGObjectListIndex); override; 15 18 procedure Clear; override; 16 19 constructor Create; … … 23 26 {$IFDEF IMPLEMENTATION} 24 27 28 {$UNDEF IMPLEMENTATION} 29 {$DEFINE IMPLEMENTATION_USES} 30 {$INCLUDE '..\Generic\GenericList.inc'} 31 32 {$DEFINE TGListIndex := TGObjectListIndex} 33 {$DEFINE TGListItem := TGObjectListItem} 34 {$DEFINE TGList := TGObjectListList} 35 {$DEFINE TGListSortCompare := TGObjectListSortCompare} 36 {$DEFINE TGListStringConverter := TObjectListStringConverter} 25 37 {$DEFINE IMPLEMENTATION} 26 38 {$INCLUDE 'GenericList.inc'} … … 28 40 { TGObjectList } 29 41 30 procedure TGObjectList.Put(Index: T ObjectListIndex; const AValue: TObjectListItem);42 procedure TGObjectList.Put(Index: TGListIndex; const AValue: TGListItem); 31 43 begin 32 44 if OwnsObjects then FItems[Index].Free; … … 34 46 end; 35 47 36 procedure TGObjectList.Delete(Index: T ObjectListIndex);48 procedure TGObjectList.Delete(Index: TGObjectListIndex); 37 49 begin 38 50 if OwnsObjects then FItems[Index].Free; … … 42 54 procedure TGObjectList.Clear; 43 55 var 44 I: T ObjectListIndex;56 I: TGObjectListIndex; 45 57 begin 46 58 if OwnsObjects then begin … … 66 78 end; 67 79 80 {$UNDEF IMPLEMENTATION} 68 81 {$ENDIF}
Note:
See TracChangeset
for help on using the changeset viewer.