From: Erik B. <eb...@us...> - 2007-01-19 18:02:37
|
Update of /cvsroot/gexperts/gexperts/unstable/Comps In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv5436/Comps Modified Files: GpLists.pas Log Message: Update to official fixed version 1.23a Index: GpLists.pas =================================================================== RCS file: /cvsroot/gexperts/gexperts/unstable/Comps/GpLists.pas,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- GpLists.pas 19 Jan 2007 07:53:44 -0000 1.4 +++ GpLists.pas 19 Jan 2007 18:02:33 -0000 1.5 @@ -30,10 +30,15 @@ Author : Primoz Gabrijelcic Creation date : 2002-07-04 - Last modification : 2006-09-29 - Version : 1.22a + Last modification : 2007-01-19 + Version : 1.23a </pre>*)(* History: + 1.23a: 2007-01-19 + - Compiles with Delphi 6 again. Big thanks to Tao Lin and + Erik Berry for reporting, diagnosing and fixing the problem. + 1.23: 2006-12-06 + - Added ValuesIdx to the TGpObjectMap class. 1.22a: 2006-09-29 - Fixed nasty bug in TGpIntegerObjectList.AddObject and TGpInt64ObjectList.AddObject. @@ -470,6 +475,7 @@ omList: TGpIntegerObjectList; protected function GetIndexedItem(idxItem: integer): TObject; + function GetIndexedValue(idxValue: integer): TObject; function GetItems(item: TObject): TObject; virtual; procedure SetItems(item: TObject; const value: TObject); virtual; public @@ -481,6 +487,7 @@ procedure Find(value: TObject; compareFunc: TGpObjectMapCompare; var item: TObject); virtual; property Items[idxItem: integer]: TObject read GetIndexedItem; + property ValuesIdx[idxValue: integer]: TObject read GetIndexedValue; property Values[item: TObject]: TObject read GetItems write SetItems; default; end; { TGpObjectMap } @@ -519,8 +526,7 @@ dlloNext : TGpDoublyLinkedListObject; dlloPrevious: TGpDoublyLinkedListObject; protected - procedure LinkAfter(list: TGpDoublyLinkedList; - obj: TGpDoublyLinkedListObject); + procedure LinkAfter(list: TGpDoublyLinkedList; obj: TGpDoublyLinkedListObject); procedure Unlink; public destructor Destroy; override; @@ -1544,7 +1550,7 @@ function TGpIntegerObjectList.Add(item: integer): integer; begin - Result := AddObject(item, nil); + Result := AddObject(item, nil); end; { TGpIntegerObjectList.Add } function TGpIntegerObjectList.AddObject(item: integer; @@ -1555,7 +1561,7 @@ iolObjects.Insert(Result, obj) else Objects[Result] := obj; -end; { TGpIntegerObjectList.AddObject } +end; { TGpIntegerObjectList.AddObject } procedure TGpIntegerObjectList.Clear; begin @@ -2262,6 +2268,11 @@ Result := TObject(omList[idxItem]); end; { TGpObjectMap.GetIndexedItem } +function TGpObjectMap.GetIndexedValue(idxValue: integer): TObject; +begin + Result := omList.Objects[idxValue]; +end; { TGpObjectMap.GetIndexedObject } + function TGpObjectMap.GetItems(item: TObject): TObject; var idxItem: integer; @@ -2432,6 +2443,8 @@ dlloPrevious := nil; end; { TGpDoublyLinkedListObject.Unlink } +{ TGpDoublyLinkedList } + constructor TGpDoublyLinkedList.Create(multithreaded: boolean); begin inherited Create; @@ -2451,8 +2464,6 @@ inherited; end; { TGpDoublyLinkedList.Destroy } -{ TGpDoublyLinkedList } - {:Returns number of items in the list. @since 2003-10-28 } @@ -2607,4 +2618,3 @@ end. - |