Image of Navigational Map linked to Home / Contents / Search Queue Class

Peter Eliades - MDIS
Image of Line Break

We needed to implement a Queue recently and we thought what a good way to stay with classes.

As with the Stack class last issue, this queue class is a pretty trivial example. It has only four methods and one property -

* Methods:
Queue.Insert <Item>To insert item in queue
<Item>= Queue.RemoveTo remove item from queue
<Item>= Queue.ViewView but do not remove item from queue
Queue.ClearRemove all item from queue
* Properties:
Queue.SizeContains no. of items in queue

As you will see from the code the queue is self sizing so you will never run out of space.

It may be simple, but it's already served us well a few times. Reusability is King.......

If you wish to use it.... use it wisely. <g>

Downloadable zip file (7Kb).

Written by: Peter Eliades
August '96

Image of Arrow linked to Previous Article Image of Arrow linked to Next Article
Image of Line Break