Home Mail an Joachim Pimiskern Impressum

TJPQueue

TJPQueue is a class for Borland Delphi that implements a queue or FIFO (first in first out). Such a data structure is for example necessary for breadth first search.

Status: Freeware; modify and use it at your own risk. I'd appreciate it if you left a comment in the source files about the original author, Joachim Pimiskern.

Download

Installation

Simply use the unit jpqueue. It is not necessary to install something into the VCL.

Usage

uses
  jpqueue;
...
var
  q: TJPQueue;
  p: pointer;
  status: boolean;
begin
  ...
  q := TJPQueue.Create;
  try
    ...
    q.Add(p); // Add an entry to the queue
    ...
    status := q.Get(p); // Retrieve an entry. TRUE iif successful
    ...
  finally
    q.Free;
  end;
  ...
end;

Home Mail an Joachim Pimiskern Impressum