mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-12 12:05:57 +02:00
* Add TList<T>.list property for Delphi compatibility. Fixes #40642
This commit is contained in:
parent
a3b730b0f1
commit
aa4136ce52
@ -186,12 +186,13 @@ type
|
|||||||
protected
|
protected
|
||||||
type // bug #24282
|
type // bug #24282
|
||||||
TArrayHelperBugHack = TArrayHelper<T>;
|
TArrayHelperBugHack = TArrayHelper<T>;
|
||||||
|
TArrayOfT = array of T;
|
||||||
private
|
private
|
||||||
FOnNotify: TCollectionNotifyEvent<T>;
|
FOnNotify: TCollectionNotifyEvent<T>;
|
||||||
function GetCapacity: SizeInt; inline;
|
function GetCapacity: SizeInt; inline;
|
||||||
protected
|
protected
|
||||||
FLength: SizeInt;
|
FLength: SizeInt;
|
||||||
FItems: array of T;
|
FItems: TArrayOfT;
|
||||||
|
|
||||||
function PrepareAddingItem: SizeInt; virtual;
|
function PrepareAddingItem: SizeInt; virtual;
|
||||||
function PrepareAddingRange(ACount: SizeInt): SizeInt; virtual;
|
function PrepareAddingRange(ACount: SizeInt): SizeInt; virtual;
|
||||||
@ -204,6 +205,7 @@ type
|
|||||||
|
|
||||||
property Count: SizeInt read GetCount;
|
property Count: SizeInt read GetCount;
|
||||||
property Capacity: SizeInt read GetCapacity write SetCapacity;
|
property Capacity: SizeInt read GetCapacity write SetCapacity;
|
||||||
|
property List: TArrayOfT read FItems;
|
||||||
property OnNotify: TCollectionNotifyEvent<T> read FOnNotify write FOnNotify;
|
property OnNotify: TCollectionNotifyEvent<T> read FOnNotify write FOnNotify;
|
||||||
|
|
||||||
procedure TrimExcess; virtual; abstract;
|
procedure TrimExcess; virtual; abstract;
|
||||||
|
Loading…
Reference in New Issue
Block a user