Queue Manipulation Routines

The queue manipulation routines are used by applications to keep track of ordered lists of related objects. An application may want to use a queue to keep track of a large group of related objects, especially if the objects must be kept in some sort of order.

The queue may be comprised of objects of any data type, e.g., a raw data type such as integers, or a user-defined structure. The queue routines work with pointers to objects; thus, any data type may be stored in a queue by using a pointer to the object. Each element in a single queue must be of the same data type.

Each queue may be created to keep its objects in ascending, descending, FIFO, or LIFO order, and each may either allow or disallow duplicate objects. Each queue is identified by a queue number which is assigned at creation time. The queue routines keep track of the order, allowance of duplicates, number of objects, and last accessed position in each queue. An application may work with up to MAXQUEUES queues at one time, and each queue is independent of all other queues created by the same application (thus they may keep their objects in differing orders, and some may allow duplicates while some may not).

A program can access the queue manipulation routines by linking the following object library:

    $ADAPSLIB/queue.a