Object Priority Queue

🔗 Store Page

This plugin provides a blueprint type for storing Objects in a queue. The queue is a priority queue, meaning that each Objects is inserted with a corresponding priority, and Objects with a lower Priority value will be removed first.

This data structure can be used to implement event queues, where events must occur in a specific order, or for prioritizing any other kind of object or action.

Blueprint Functions

Make Priority Queue


Instantiate a new Object Priority Queue.



Get the number of items in the queue.



Test if the queue contains a particular object.



Adds an object to the queue with a given priority. If the object already exists in the queue, the priority is updated. Objects are ordered in the queue according to increasing priority.

The ordering of the priorities are not guaranteed to be stable; i.e. if two objects are enqueued with equal priority, there is no guarantee which order they will be dequeued.



Remove an object from the queue. The object with the lowest priority in the queue will be returned. If the queue is empty, an invalid object will be returned.

To check if the queue is empty, you can test the value of Num or Next.



Peek at the front of the priority queue to see which one would be dequeued next. If the queue is empty, Next will return an invalid Object.



Clear all items from the queue and leave it empty.