API:System.Generics.Collections.TObjectQueue.Dequeue
Delphi
procedure Dequeue;
C++
HIDESBASE void __fastcall Dequeue();
Properties
| Type | Visibility | Source | Unit | Parent |
|---|---|---|---|---|
procedure function |
public | System.Generics.Collections.pas System.Generics.Collections.hpp |
System.Generics.Collections | TObjectQueue |
Description
Removes the item from the beginning of the queue.
System.Generics.Collections.TObjectQueue.Dequeue inherits from System.Generics.Collections.TQueue.Dequeue. All content below this line refers to System.Generics.Collections.TQueue.Dequeue.
Removes the item from the beginning of the queue.
Dequeue removes and returns the beginning element of the queue. Count is decremented by 1. If Count is already 0, an error is raised.
An OnNotify event occurs indicating an item was removed from the queue. Dequeue is the same as Extract except for the event code indicating an element was removed rather than extracted.
Dequeue functions similarly to Peek except that Dequeue removes an element from the queue.
Dequeue is the same as Extract except for the event code indicating an element was removed rather than extracted. Extract is a more generic method, common to all collections, whereas Dequeue is specialized for TQueue. You can use either of the two functions to obtain and remove the item at the beginning of the queue.
This is a O(1) operation.
See Also
Code Examples