TDynamicDataQueue.Push function
Adds the specified content to the FIFO queue.
Declaration
function Push(const Buffer; Count: Integer): Integer
function Push(AStream: TStream; Count: Integer): IntegerArguments
Buffer | Untyped buffer with the arbitrary item data added in the method. |
Count | Number of bytes needed for the item data added in the method. |
AStream | TStream instance where the byte values for the item data is stored. |
Function result
Number of bytes added to the internal queue storage in the method.
Description
Push is an overloaded
Integer function used to add the
specified item data to the bottom of the FIFO queue. Overloaded variants are
provided to supply item data as a sequence of arbitrary byte values, either
from an untyped buffer or from a
TStream instance.
AStream is already positioned at the start of
the data for the new item. It does not reposition the stream instance.
Push calls the PushInternal method to perform the actions needed
to enqueue the specified item data.
The return value contains the number of bytes added for the new item data to the internal storage for the ring queue.
Use Pop to dequeue an item from the top of the queue. Use
Top to get the item data for the next item without removing it
from the queue. Use Size to get the number of bytes allocated for
items in the internal storage in the FIFO queue.
See also
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
