Skip to content

TFPListEnumerator

Implements IEnumerator for the TFPList class.

Declaration

Source position: classesh.inc line 494

type

  TFPListEnumerator = class
  public
    constructor Create;
    function GetCurrent : Pointer;
    function MoveNext : Boolean;
    property Current: Pointer; {r}
  end;

Description

TFPListEnumerator implements the #rtl.system.IEnumerator interface for the TFPList class, so the TFPList class can be used in a for ... in loop. It is returned by the TFPList.GetEnumerator method of TFPList.

Properties

Member Visibility Description
Current read only public Current pointer in the list.

Methods

Member Visibility Description
Create public Initialize a new instance of TFPListEnumerator.
GetCurrent public Return the current pointer in the list.
MoveNext public Move the position of the enumerator to the next position in the list.

See also

Name Description
TFPList Class to manage collections of pointers.
TFPList.GetEnumerator Create an IEnumerator instance.
#rtl.system.IEnumerator Enumerator support interface.