
#ifndef __PQUEUE
#define __PQUEUE

#include <iostream>
#include "heap.h"

template <class T>
class PQueue : protected Heap<T> {
 public:
  PQueue () : Heap<T> () { }
  PQueue (int Size) : Heap<T> (Size) { }
  ~PQueue () { }

  bool isEmpty () 
    { return Heap<T>::isEmpty (); }
  bool Enqueue (int prio, T& value) 
    { return Heap<T>::Insert (prio, value); }
  bool Dequeue (T& value) 
    { return Heap<T>::Delete (value); }

  friend ostream& operator << (ostream& out, const PQueue<T>& p)
    { out << (Heap<T>&)p; return out; }

};

#endif // __PQUEUE
