// QueType.h
// Class is templated; items are in dynamically allocated array.

template<class ItemType>
class QueType
{
public: 
    QueType();

    QueType(int max);

    ~QueType();

    void MakeEmpty();

    bool IsEmpty() const;

    bool IsFull() const;

    void Enqueue(ItemType newItem);
    // Function: Adds newItem to the rear of the queue.
    // Pre:  Queue is not full.
    // Post: newItem is at the rear of the queue.

    void Dequeue(ItemType& item);
    // Function: Removes front item from the queue and returns it in item.
    // Pre:  Queue is not empty.
    // Post: Front element has been removed from the queue.
    //       item is a copy of the removed element.

    void View() const;  
    //display the contents of the queue for CMIS240 educational purposes
    //remove this function from here and QueType.cpp if ansiscreen.h won't work
    //on your system (eg. NT).

private:
    int front;          //index of last item dequeued
    int rear;           //index of last item enqueued
    ItemType* items;    //pointer to dynamically allocated array of ItemTypes
    int maxQue;         //size of array
};

#include "QueType.cpp"
