[Overview][Types][Classes][Index] |
Gets the data for the first queue entry, but does not remove it from the queue.
Source position: dynqueue.pas line 69
public function TDynamicDataQueue.Top( |
var Buffer; |
Count: Integer |
):Integer; |
AStream: TStream; |
Count: Integer |
):Integer; |
Buffer |
|
Untyped buffer where the queue item is stored. |
Count |
|
Number of bytes for the item data. |
Number of bytes needed for item data in the queue.
AStream |
|
TStream instance where the item data is stored. |
Count |
|
Number of bytes for the item data. |
Top is an overloaded Integer function used to get the item data stored at the top of the FIFO queue without removing it from the queue internal storage. Overloaded variants are provided to get and store item data as a sequence of arbitrary byte values, either in an untyped buffer or in a TStream instance.
Please note: Top assumes that AStream is already positioned where the item data will be written. It does not reposition the stream instance. Be aware that writing to a stream can raise an exception.
Top calls the PopTopInternal method to perform the actions needed to get the data for the queue item from the top of FIFO queue.
The return value contains the number of bytes needed for the item data in the internal storage for the queue.
Use Push to enqueue a new item to the bottom of the FIFO queue. Use Pop to get and remove the item data at the top of the queue.
|
Adds the specified content to the FIFO queue. |
|
|
Removes an item from the top of the FIFO queue. |
|
|
Total memory required for item data stored in the queue. |
Version 4.0 | Generated 2025-05-03 | Home |