[Overview][Types][Classes][Index] Reference for unit 'ObjectLists' (#lazutils)

TObjectArray.List

Provides access to the list which implements the storage for the item/object associations in the class instance.

Declaration

Source position: objectlists.pas line 85

public property TObjectArray.List : P2Pointer
  read FList;

Description

List is a read-only P2Pointer property which provides access to the list which implements the storage for the class instance. It is organized as pointers to a sequence of T2Pointer records. To access the record, and its Item and Object properties, use a subscript in the range 0..Count-1. For example:

// type TMyObjStrsArr = specialize TObjectArray<TMyObject, TStrings>;
// var aObjArr: TMyObjStrsArr;
// var lFound: Boolean;

lFound := False;
for iPos := 0 to aObjArr.Count-1 do
begin
   lFound :=  (aObjArr.List[iPos].Item.Name = 'Foo');
   if lFound then break;
end;
Exit(lFound);

Content in the record can be accessed using the indexed Items and Objects properties as well.

See also

TObjectArray.Items

  

Provides indexed access to the TItem class instances stored in the List.

TObjectArray.Objects

  

Provides indexed access to the TObj class instances stored in the List.

T2Pointer

  

Record type with pointers to members in the association.

P2Pointer

  

Pointer to the T2Pointer record type.


Version 4.0 Generated 2025-05-03 Home