gdDocumentation0.8.0

API reference

GDPriorityQueue

Queue that pops the smallest priority number first, and insertion order among equals.

Methods

push

push(value: Variant, priority: float = 0.0) -> void

Insert a value with its priority.

Parameters

NameTypeDefaultDescription
valueVariantRequiredValue to store, serialize, validate or pass to the operation described above.
priorityfloat0.0Priority 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() -> Variant

Return 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() -> Variant

Return 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() -> int

Return 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() -> bool

Report 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.