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

TLazFifoQueue.PushItem

Pushes an item of the specified type onto the tail of the queue.

Declaration

Source position: lazcollections.pas line 71

public function TLazFifoQueue.PushItem(

  const AItem: T

):Boolean; virtual;

Arguments

AItem

  

Item added to the tail of the queue.

Function result

True if the specified item was added to the queue, or False when the queue is full.

Description

Pushitem is a Boolean function used to add the value in AItem to the tail of the queue. The return value is True if the queue was not full when the method was called. No actions are performed in the method when a slot is not available in the internal storage for the queue.

PushItem stores the value in AItem at the next element in the internal array, and increments the value in the TotalItemsPushed property.

Use PopItem to remove the item at the head of the queue.

See also

TLazFifoQueue.IsFull

  

Indicates if all of the internal storage slots have been used in the queue storage.

TLazFifoQueue.QueueSize

  

Size (or depth) for the queue.

TLazFifoQueue.TotalItemsPushed

  

Total number of entries that have been pushed onto the queue.

TLazFifoQueue.TotalItemsPopped

  

Total number of entries that have been popped off of the queue.

TLazFifoQueue.PopItem

  

Pops an item of the specified type off of the head of the queue.


Version 4.0 Generated 2025-05-03 Home