queue - /* File: queue.h * -* This interface provides the...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
/* File: queue.h * ------------------------------------------------- * This interface provides the functions for the queue * ADT. It uses the generic data type library. */ #include "gend.h" #ifndef _QUEUE_H #define _QUEUE_H #define MAX_QUEUE 1000 #define true 1 #define false 0 typedef gend QueueItemType; typedef int bool; typedef struct _queueCDT *Queue; /* * Function: CreateQueue * Usage: Q = CreateQueue(); * ------------------------- * This function creates a new queue instance. */ Queue CreateQueue(void); /* * Function: DestroyQueue * Usage: DestroyQueue(Q); * ------------------------- * This function frees memory allocated for a queue instance. */ void DestroyQueue(Queue Q); /* * Function: EmptyQueue * Usage: b = EmptyQueue(Q); * ------------------------- * This function returns true if Q is empty and * false if Q contains at least one item. */ bool EmptyQueue(Queue Q); /* * Function: QueueSize * Usage: s = QueueSize(Q); * ------------------------- * This function returns the number of items that are
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 2

queue - /* File: queue.h * -* This interface provides the...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online