Răsfoiți Sursa

* Added Exchange to TCollection. Bug ID #15517

git-svn-id: trunk@15012 -
michael 15 ani în urmă
părinte
comite
f29973cc71
2 a modificat fișierele cu 7 adăugiri și 0 ștergeri
  1. 1 0
      rtl/objpas/classes/classesh.inc
  2. 6 0
      rtl/objpas/classes/collect.inc

+ 1 - 0
rtl/objpas/classes/classesh.inc

@@ -505,6 +505,7 @@ type
     function GetNamePath: string; override;
     function Insert(Index: Integer): TCollectionItem;
     function FindItemID(ID: Integer): TCollectionItem;
+    procedure Exchange(Const Index1, index2: integer);
     procedure Sort(Const Compare : TCollectionSortCompare);
     property Count: Integer read GetCount;
     property ItemClass: TCollectionItemClass read FItemClass;

+ 6 - 0
rtl/objpas/classes/collect.inc

@@ -389,6 +389,12 @@ begin
   end;
 end;
 
+procedure TCollection.Exchange(Const Index1, index2: integer);
+
+begin
+  FItems.Exchange(Index1,Index2);
+end;
+
 
 {****************************************************************************}
 {*                             TOwnedCollection                             *}