| Class TQueue (unit SandQue) |
TObject
Next element
| Constructors |
constructor Create;----------------------- TQueue -----------------------
| Functions |
function Dequeue(var Itm: Pointer): Boolean;
destructor Destroy;
procedure Enqueue(Itm: Pointer);
function Peek(Idx: Word; var Itm: Pointer): Boolean;| Properties |
| Events |
| Variables |
Size : Longint;
Bottom : PQueueElem;
Current : PQueueElem;
Position : Word;
Top : PQueueElem;| Constructors |
constructor Create;We want to be able to store a LOT of grains
----------------------- TQueue -----------------------
| Functions |
function Dequeue(var Itm: Pointer): Boolean;We need a record for the user item
destructor Destroy;Queue is empty
procedure Enqueue(Itm: Pointer);Remove any remaining elements before destroying the queue. Note that user items are NOT disposed as TQueue doesn't know their types. Therefore user should always empty the queue himself and dispose the items before destroying the queue.
function Peek(Idx: Word; var Itm: Pointer): Boolean;Same as: if Top <> NIL
| Properties |
| Events |
| Variables |
Size : Longint;
Bottom : PQueueElem;
Current : PQueueElem;
Position : Word;
Top : PQueueElem;