Online documentation for LIFOQueue

Generated 2006-03-17

Allows a user to add and remove items from a queue.

Summary

LIFOQueue is a component that allows any number of items of data to be stored, ready for use by other components. LIFO stands for Last In First Out, which refers to the order in which data which has been added to a LIFOQueue can be retrieved. Items of data are added into a FIFOQueue component one at a time, and are retrieved from the component in the reverse order to which they were added (ie the most recently added item of data is always the first available for retrieval, then the second most recently added item etc). In computer science, a LIFO queue is also known as a stack.

Note that it is also possible to randomize the order of data items in a LIFOQueue.

Usage

To add an item of data, provide the item of data using the newObject property. The item of data will be added to those held in the queue property. The topOfQueue property (which always records the next item available for retrieval from the queue) will also change if the new item of data is being added to an empty queue.

To retrieve the next item of available data from the queue, supply any value to the triggerDiscardTopOfQueue property. This will trigger an item of data to be removed from the queue property. The item of data which has just been retrieved from the queue will appeare on property lastDiscardedObject.

To randomize the order of items in the queue, provide any value to the triggerRandomizeQueue property.

To clear the queue of data, provide any value to the triggerDiscardQueue property.