|
@@ -166,6 +166,18 @@ type
|
|
{$IFNDEF FPC_TESTGENERICS}
|
|
{$IFNDEF FPC_TESTGENERICS}
|
|
|
|
|
|
TListAssignOp = (laCopy, laAnd, laOr, laXor, laSrcUnique, laDestUnique);
|
|
TListAssignOp = (laCopy, laAnd, laOr, laXor, laSrcUnique, laDestUnique);
|
|
|
|
+ TFPList = class;
|
|
|
|
+
|
|
|
|
+ TFPListEnumerator = class
|
|
|
|
+ private
|
|
|
|
+ FList: TFPList;
|
|
|
|
+ FPosition: Integer;
|
|
|
|
+ public
|
|
|
|
+ constructor Create(AList: TFPList);
|
|
|
|
+ function GetCurrent: Pointer;
|
|
|
|
+ function MoveNext: Boolean;
|
|
|
|
+ property Current: Pointer read GetCurrent;
|
|
|
|
+ end;
|
|
|
|
|
|
TFPList = class(TObject)
|
|
TFPList = class(TObject)
|
|
private
|
|
private
|
|
@@ -197,6 +209,7 @@ type
|
|
function Expand: TFPList; {$ifdef CLASSESINLINE} inline; {$endif CLASSESINLINE}
|
|
function Expand: TFPList; {$ifdef CLASSESINLINE} inline; {$endif CLASSESINLINE}
|
|
function Extract(Item: Pointer): Pointer;
|
|
function Extract(Item: Pointer): Pointer;
|
|
function First: Pointer;
|
|
function First: Pointer;
|
|
|
|
+ function GetEnumerator: TFPListEnumerator;
|
|
function IndexOf(Item: Pointer): Integer;
|
|
function IndexOf(Item: Pointer): Integer;
|
|
procedure Insert(Index: Integer; Item: Pointer); {$ifdef CLASSESINLINE} inline; {$endif CLASSESINLINE}
|
|
procedure Insert(Index: Integer; Item: Pointer); {$ifdef CLASSESINLINE} inline; {$endif CLASSESINLINE}
|
|
function Last: Pointer;
|
|
function Last: Pointer;
|
|
@@ -228,8 +241,20 @@ type
|
|
{$endif}
|
|
{$endif}
|
|
|
|
|
|
{ TList class}
|
|
{ TList class}
|
|
|
|
+
|
|
TListNotification = (lnAdded, lnExtracted, lnDeleted);
|
|
TListNotification = (lnAdded, lnExtracted, lnDeleted);
|
|
|
|
+ TList = class;
|
|
|
|
|
|
|
|
+ TListEnumerator = class
|
|
|
|
+ private
|
|
|
|
+ FList: TList;
|
|
|
|
+ FPosition: Integer;
|
|
|
|
+ public
|
|
|
|
+ constructor Create(AList: TList);
|
|
|
|
+ function GetCurrent: Pointer;
|
|
|
|
+ function MoveNext: Boolean;
|
|
|
|
+ property Current: Pointer read GetCurrent;
|
|
|
|
+ end;
|
|
|
|
|
|
TList = class(TObject)
|
|
TList = class(TObject)
|
|
private
|
|
private
|
|
@@ -264,6 +289,7 @@ type
|
|
function Expand: TList;
|
|
function Expand: TList;
|
|
function Extract(item: Pointer): Pointer;
|
|
function Extract(item: Pointer): Pointer;
|
|
function First: Pointer;
|
|
function First: Pointer;
|
|
|
|
+ function GetEnumerator: TListEnumerator;
|
|
function IndexOf(Item: Pointer): Integer;
|
|
function IndexOf(Item: Pointer): Integer;
|
|
procedure Insert(Index: Integer; Item: Pointer);
|
|
procedure Insert(Index: Integer; Item: Pointer);
|
|
function Last: Pointer;
|
|
function Last: Pointer;
|
|
@@ -424,6 +450,17 @@ type
|
|
property DisplayName: string read GetDisplayName write SetDisplayName;
|
|
property DisplayName: string read GetDisplayName write SetDisplayName;
|
|
end;
|
|
end;
|
|
|
|
|
|
|
|
+ TCollectionEnumerator = class
|
|
|
|
+ private
|
|
|
|
+ FCollection: TCollection;
|
|
|
|
+ FPosition: Integer;
|
|
|
|
+ public
|
|
|
|
+ constructor Create(ACollection: TCollection);
|
|
|
|
+ function GetCurrent: TCollectionItem;
|
|
|
|
+ function MoveNext: Boolean;
|
|
|
|
+ property Current: TCollectionItem read GetCurrent;
|
|
|
|
+ end;
|
|
|
|
+
|
|
TCollectionItemClass = class of TCollectionItem;
|
|
TCollectionItemClass = class of TCollectionItem;
|
|
TCollectionNotification = (cnAdded, cnExtracting, cnDeleting);
|
|
TCollectionNotification = (cnAdded, cnExtracting, cnDeleting);
|
|
TCollectionSortCompare = function (Item1, Item2: TCollectionItem): Integer;
|
|
TCollectionSortCompare = function (Item1, Item2: TCollectionItem): Integer;
|
|
@@ -463,6 +500,7 @@ type
|
|
procedure Clear;
|
|
procedure Clear;
|
|
procedure EndUpdate; virtual;
|
|
procedure EndUpdate; virtual;
|
|
procedure Delete(Index: Integer);
|
|
procedure Delete(Index: Integer);
|
|
|
|
+ function GetEnumerator: TCollectionEnumerator;
|
|
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;
|
|
@@ -492,6 +530,19 @@ type
|
|
procedure ReleaseStrings;
|
|
procedure ReleaseStrings;
|
|
end;
|
|
end;
|
|
|
|
|
|
|
|
+{ TStringsEnumerator class }
|
|
|
|
+
|
|
|
|
+ TStringsEnumerator = class
|
|
|
|
+ private
|
|
|
|
+ FStrings: TStrings;
|
|
|
|
+ FPosition: Integer;
|
|
|
|
+ public
|
|
|
|
+ constructor Create(AStrings: TStrings);
|
|
|
|
+ function GetCurrent: String;
|
|
|
|
+ function MoveNext: Boolean;
|
|
|
|
+ property Current: String read GetCurrent;
|
|
|
|
+ end;
|
|
|
|
+
|
|
{ TStrings class }
|
|
{ TStrings class }
|
|
|
|
|
|
TStrings = class(TPersistent)
|
|
TStrings = class(TPersistent)
|
|
@@ -551,6 +602,7 @@ type
|
|
procedure EndUpdate;
|
|
procedure EndUpdate;
|
|
function Equals(TheStrings: TStrings): Boolean;
|
|
function Equals(TheStrings: TStrings): Boolean;
|
|
procedure Exchange(Index1, Index2: Integer); virtual;
|
|
procedure Exchange(Index1, Index2: Integer); virtual;
|
|
|
|
+ function GetEnumerator: TStringsEnumerator;
|
|
function GetText: PChar; virtual;
|
|
function GetText: PChar; virtual;
|
|
function IndexOf(const S: string): Integer; virtual;
|
|
function IndexOf(const S: string): Integer; virtual;
|
|
function IndexOfName(const Name: string): Integer; virtual;
|
|
function IndexOfName(const Name: string): Integer; virtual;
|
|
@@ -1481,6 +1533,17 @@ type
|
|
procedure Notification(AnObject: TPersistent; Operation: TOperation);
|
|
procedure Notification(AnObject: TPersistent; Operation: TOperation);
|
|
end;
|
|
end;
|
|
|
|
|
|
|
|
+ TComponentEnumerator = class
|
|
|
|
+ private
|
|
|
|
+ FComponent: TComponent;
|
|
|
|
+ FPosition: Integer;
|
|
|
|
+ public
|
|
|
|
+ constructor Create(AComponent: TComponent);
|
|
|
|
+ function GetCurrent: TComponent;
|
|
|
|
+ function MoveNext: Boolean;
|
|
|
|
+ property Current: TComponent read GetCurrent;
|
|
|
|
+ end;
|
|
|
|
+
|
|
TBasicAction = class;
|
|
TBasicAction = class;
|
|
|
|
|
|
{ TComponent }
|
|
{ TComponent }
|
|
@@ -1565,6 +1628,7 @@ type
|
|
procedure FreeNotification(AComponent: TComponent);
|
|
procedure FreeNotification(AComponent: TComponent);
|
|
procedure RemoveFreeNotification(AComponent: TComponent);
|
|
procedure RemoveFreeNotification(AComponent: TComponent);
|
|
procedure FreeOnRelease;
|
|
procedure FreeOnRelease;
|
|
|
|
+ function GetEnumerator: TComponentEnumerator;
|
|
function GetNamePath: string; override;
|
|
function GetNamePath: string; override;
|
|
function GetParentComponent: TComponent; dynamic;
|
|
function GetParentComponent: TComponent; dynamic;
|
|
function HasParent: Boolean; dynamic;
|
|
function HasParent: Boolean; dynamic;
|
|
@@ -1672,6 +1736,19 @@ type
|
|
property Items[index : Integer] : IUnknown read Get write Put;default;
|
|
property Items[index : Integer] : IUnknown read Get write Put;default;
|
|
end;
|
|
end;
|
|
|
|
|
|
|
|
+ TInterfaceList = class;
|
|
|
|
+
|
|
|
|
+ TInterfaceListEnumerator = class
|
|
|
|
+ private
|
|
|
|
+ FList: TInterfaceList;
|
|
|
|
+ FPosition: Integer;
|
|
|
|
+ public
|
|
|
|
+ constructor Create(AList: TInterfaceList);
|
|
|
|
+ function GetCurrent: IUnknown;
|
|
|
|
+ function MoveNext: Boolean;
|
|
|
|
+ property Current: IUnknown read GetCurrent;
|
|
|
|
+ end;
|
|
|
|
+
|
|
TInterfaceList = class(TInterfacedObject,IInterfaceList)
|
|
TInterfaceList = class(TInterfacedObject,IInterfaceList)
|
|
private
|
|
private
|
|
FList : TThreadList;
|
|
FList : TThreadList;
|
|
@@ -1690,6 +1767,7 @@ type
|
|
procedure Delete(index : Integer);
|
|
procedure Delete(index : Integer);
|
|
procedure Exchange(index1,index2 : Integer);
|
|
procedure Exchange(index1,index2 : Integer);
|
|
function First : IUnknown;
|
|
function First : IUnknown;
|
|
|
|
+ function GetEnumerator: TInterfaceListEnumerator;
|
|
function IndexOf(item : IUnknown) : Integer;
|
|
function IndexOf(item : IUnknown) : Integer;
|
|
function Add(item : IUnknown) : Integer;
|
|
function Add(item : IUnknown) : Integer;
|
|
procedure Insert(i : Integer;item : IUnknown);
|
|
procedure Insert(i : Integer;item : IUnknown);
|