System.Contnrs.TQueue.PushItem

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

procedure PushItem(AItem: Pointer); override;

C++

virtual void __fastcall PushItem(void * AItem);

Properties

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

Description

Adds an item to the list.

System.Contnrs.TQueue.PushItem inherits from System.Contnrs.TOrderedList.PushItem. All content below this line refers to System.Contnrs.TOrderedList.PushItem.

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