* Added Exchange to TCollection. Bug ID #15517

git-svn-id: trunk@15012 -
This commit is contained in:
michael 2010-03-14 10:25:32 +00:00
parent 2e544bd8de
commit f29973cc71
2 changed files with 7 additions and 0 deletions

View File

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

View File

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