System.Contnrs.TOrderedList.PushItem

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

procedure PushItem(AItem: Pointer); virtual; abstract;

C++

virtual void __fastcall PushItem(void * AItem) = 0 ;

Properties

Type Visibility Source Unit Parent
procedure
function
protected
System.Contnrs.pas
System.Contnrs.hpp
System.Contnrs TOrderedList

Description

Adds an item to the list.

The protected PushItem method provides the underlying implementation for the Push method. In TOrderedList, PushItem has no implementation (it is abstract or, in C++ terminology, pure virtual).

Descendant classes override this method to add items to the list specified by the List property. Each descendant class adds items so as to maintain the list in reverse output order. In TStack, items are added to the end of the list (so that the list is last-in first-out). In TQueue, items are added to the beginning (so that the list is first-in first-out).

See Also