API reference
GDPriorityQueue
Queue that pops the smallest priority number first, and insertion order among equals.
Methods
push(value: Variant, priority: float = 0.0) -> voidpop() -> Variantpeek() -> Variantsize() -> intis_empty() -> bool
push
push(value: Variant, priority: float = 0.0) -> voidInsert a value with its priority.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
value | Variant | Required | Value to store, serialize, validate or pass to the operation described above. |
priority | float | 0.0 | Priority used to order entries in the queue. |
Return value
void
No value is returned.
Errors
This call has no Err return slot. Its return type and documented sentinel values determine how to inspect the result.
pop
pop() -> VariantReturn null when empty.
Parameters
No parameters.
Return value
Variant
Errors
This call has no Err return slot. Its return type and documented sentinel values determine how to inspect the result.
peek
peek() -> VariantReturn the next value without removing it.
Parameters
No parameters.
Return value
Variant
Errors
This call has no Err return slot. Its return type and documented sentinel values determine how to inspect the result.
size
size() -> intReturn the retained element count.
Parameters
No parameters.
Return value
int
Errors
This call has no Err return slot. Its return type and documented sentinel values determine how to inspect the result.
is_empty
is_empty() -> boolReport whether the container is empty.
Parameters
No parameters.
Return value
bool
Errors
This call has no Err return slot. Its return type and documented sentinel values determine how to inspect the result.