Skip to content

IInterfaceList

Interface for maintaining a list of interfaces.

Declaration

Source position: classesh.inc line 2805

type

  IInterfaceList = interface
  ['{285DEA8A-B865-11D1-AAA7-00C04FB17A72}']
    function Get : IUnknown;
    function GetCapacity : Integer;
    function GetCount : Integer;
    procedure Put;
    procedure SetCapacity;
    procedure SetCount;
    procedure Clear;
    procedure Delete;
    procedure Exchange;
    function First : IUnknown;
    function IndexOf : Integer;
    function Add : Integer;
    procedure Insert;
    function Last : IUnknown;
    function Remove : Integer;
    procedure Lock;
    procedure Unlock;
    property Capacity: Integer; {rw}
    property Count: Integer; {rw}
    property Items[index : Integer]: IUnknown; {rw}
  end;

Description

IInterfaceList is an interface for maintaining a list of interfaces, strongly resembling the standard TList class. It offers the same list of public methods as TList, with the exception that it uses interfaces instead of pointers.

All interfaces in the list should descend from IUnknown.

More detailed descriptions of how the various methods behave can be found in the TList reference.

Properties

Member Visibility Description
Capacity default Capacity of the list.
Count default Current number of elements in the list.
Items default Provides Index-based, sequential, access to the interfaces in the list.

Methods

Member Visibility Description
Add default Add an interface to the list.
Clear default Clear the list.
Delete default Remove an interface from the list.
Exchange default Exchange 2 interfaces in the list.
First default Return the first non-empty interface in the list.
Get default Retrieve an interface pointer from the list.
GetCapacity default Return the capacity of the list.
GetCount default Return the current number of elements in the list.
IndexOf default Return the index of an interface.
Insert default Insert an interface in the list.
Last default Returns the last non-nil interface in the list.
Lock default Lock the list.
Put default Write an item to the list.
Remove default Remove an interface from the list.
SetCapacity default Set the capacity of the list.
SetCount default Set the number of items in the list.
Unlock default Unlock the list.

See also

Name Description
TList Class to manage collections of pointers.