Index

Package: Queue_Pack_Exceptions

Description

package Queue_Pack_Exceptions is
Uwe R. Zimmer, Australia, 2013

Types

List

type List is array (Marker'Range) of Element;

References:

queue_pack_exceptions.ads:10:9 (declaration)
queue_pack_exceptions.ads:14:19 (reference)

Queue_Type

type Queue_Type is record
      Top, Free : Marker  := Marker'First;
      Is_Empty  : Boolean := True;
      Elements  : List;
   end record;

Constants & Global variables

Queue_Size (Positive)

Queue_Size : constant Positive := 10;

References:

queue_pack_exceptions.ads:7:4 (declaration)
queue_pack_exceptions.ads:9:23 (reference)

Queueoverflow

Queueoverflow, Queueunderflow : exception;

Queueunderflow

Queueunderflow : exception;

Subprograms & Entries

Is_Empty

function Is_Empty 
(Queue: Queue_Type) return Boolean is (Queue.Is_Empty);

Is_Full

function Is_Full 
(Queue: Queue_Type) return Boolean is (not Queue.Is_Empty and then Queue.Top = Queue.Free);