Unit 'fgl' Package
[Overview][Constants][Types][Classes][Index] [#rtl]

TFPGInterfacedObjectList

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

Generic interfaced object list.

Declaration

Source position: fgl.pp line 202

type generic TFPGInterfacedObjectList <T>= class(TFPSList)

public

  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.

  procedure AddList();

  

Adds the elements from another 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.

end;

Inheritance

TFPGInterfacedObjectList

  

Generic interfaced object list.

|

TFPSList

  

Basic list of memory blocks.

|

TObject

  

Base class of all classes.

Description

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

TFPSList

  

Basic list of memory blocks.

classes.TFPList

  

Class to manage collections of pointers.


Documentation generated on: Jul 24 2023