[Overview][Constants][Types][Classes][Index] Reference for unit 'fgl' (#rtl)

TFPGList

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Generic list

Declaration

Source position: fgl.pp line 122

type generic TFPGList <T>= class(TFPSList)

public

Type

  TFPGListEnumeratorSpec = TFPGListEnumeratorSpec;

  constructor Create;

  

Instantiate a new list

  class function ItemIsManaged; override;

  function Add();

  

Add new item of type T to the list.

  function Extract();

  

Extract an item from the list

  property First: T; [rw]

  

First non-empty item

  function GetEnumerator;

  

Return a list enumerator for T.

  function IndexOf();

  

Index of item

  procedure Insert();

  

Insert a new item in the list

  property Last: T; [rw]

  

Last non-empty item

  procedure Assign();

  

Copy elements from Source list

  procedure AddList();

  

Adds the elements from another list

  function Remove();

  

Remove an item from the list.

  procedure Sort();

  

Sort the list

  property Items []: T; default; [rw]

  

Indexed access to items in the list

  property List: PTypeList; [r]

  

Internal list object

end;

Inheritance

TFPGList

  

Generic list

|

TFPSList

  

Basic list of memory blocks

|

TObject

  

Base class of all classes.

Description

TFPGList can be used to specialize a list for any type T that does not require reference counting (such as interfaced objects). It will specialize to a list with the same methods as TFPSList or classes.TFPList

See also

TFPSList

  

Basic list of memory blocks

classes.TFPList

  

Class to manage collections of pointers.


Documentation generated on: May 14 2021