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


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

Generic interfaced object list


Source position: fgl.pp line 188

type generic TFPGInterfacedObjectList <T>= class(TFPSList) end;


  constructor Create;


Instantiate a new interfaced object list.

  function Add();


Add new object of class T to the list.

  function Extract();


Extract an item from the list

  property First: T; [rw]


First non-nil object

  function GetEnumerator;


Return a list enumerator for T

  function IndexOf();


Index of object

  procedure Insert();


Insert a new object in the list

  property Last: T; [rw]


Last non-Nil object

  procedure Assign();


Copy objects from Source list

  function Remove();


Remove an object from the list.

  procedure Sort();


Sort the objects in the list

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


Indexed access to objects in the list.

  property List: PTypeList; [r]


Internal list pointer




Generic interfaced object list



Basic list of memory blocks



Base class of all classes.


TFPGList can be used to specialize a list for any class type T that requires reference counting (all objects that implement IInterface or IUnknown)). It will specialize to a list with the same methods as TFPSList or classes.TFPList or TFPObjectList

Classes that implement IInterface or IUnknown require special care to maintain the reference count. The TFPGInterfacedObjectList list provides the necessary functionality to deal with this.

See also



Basic list of memory blocks



Class to manage collections of pointers.

Documentation generated on: Mar 17 2017