Class TCustomList

Unit

Declaration

type TCustomList<T> = class abstract(TEnumerableWithPointers<T>)

Description

More info: http://stackoverflow.com/questions/5232198/about-vectors-growth TODO: custom memory managers (as constraints) ˜approximation to golden ratio: n = n * 1.5 } {$DEFINE CUSTOM_LIST_CAPACITY_INC := Result * 2} // standard inc

Hierarchy

Overview

Internal Types

Public PT = ˆT;
Protected TArrayHelperBugHack = TArrayHelper<T>;

Fields

Private FOnNotify: TCollectionNotifyEvent<T>;
Protected FLength: SizeInt;
Protected FItems: array of T;

Methods

Private function GetCapacity: SizeInt; inline;
Protected function PrepareAddingItem: SizeInt; virtual;
Protected function PrepareAddingRange(ACount: SizeInt): SizeInt; virtual;
Protected procedure Notify(constref AValue: T; ACollectionNotification: TCollectionNotification); virtual;
Protected function DoRemove(AIndex: SizeInt; ACollectionNotification: TCollectionNotification): T; virtual;
Protected procedure SetCapacity(AValue: SizeInt); virtual; abstract;
Protected function GetCount: SizeInt; virtual;
Public function ToArray: TArray<T>; override; final;
Public procedure TrimExcess; virtual; abstract;

Properties

Public property Count: SizeInt read GetCount;
Public property Capacity: SizeInt read GetCapacity write SetCapacity;
Public property OnNotify: TCollectionNotifyEvent<T> read FOnNotify write FOnNotify;

Description

Internal Types

Public PT = ˆT;
 
Protected TArrayHelperBugHack = TArrayHelper<T>;

bug #24282

Fields

Private FOnNotify: TCollectionNotifyEvent<T>;
 
Protected FLength: SizeInt;
 
Protected FItems: array of T;
 

Methods

Private function GetCapacity: SizeInt; inline;
 
Protected function PrepareAddingItem: SizeInt; virtual;
 
Protected function PrepareAddingRange(ACount: SizeInt): SizeInt; virtual;
 
Protected procedure Notify(constref AValue: T; ACollectionNotification: TCollectionNotification); virtual;
 
Protected function DoRemove(AIndex: SizeInt; ACollectionNotification: TCollectionNotification): T; virtual;
 
Protected procedure SetCapacity(AValue: SizeInt); virtual; abstract;
 
Protected function GetCount: SizeInt; virtual;
 
Public function ToArray: TArray<T>; override; final;
 
Public procedure TrimExcess; virtual; abstract;
 

Properties

Public property Count: SizeInt read GetCount;
 
Public property Capacity: SizeInt read GetCapacity write SetCapacity;
 
Public property OnNotify: TCollectionNotifyEvent<T> read FOnNotify write FOnNotify;
 

Generated by PasDoc 0.15.0.