System.Generics.Collections.TQueue.Enqueue
Delphi
procedure Enqueue(const Value: T); inline;
C++
void __fastcall Enqueue(const T Value);
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
procedure function |
public | System.Generics.Collections.pas System.Generics.Collections.hpp |
System.Generics.Collections | TQueue |
Description
Add item to end of queue.
Enqueue adds the given item Value to the end of the queue. You can enqueue nil. Count is incremented by 1. If Count is at capacity, the queue size is automatically increased.
An OnNotify event occurs indicating an item was added to the queue.
This is an O(1) operation, unless the capacity must increase. In this case, it is O(n), where n is Count.
See Also
Code Examples