//---------------------------------------------------------------------- // SPECIFICATION FILE (cqueue.h) // This module exports an ADT for a queue of characters. //---------------------------------------------------------------------- #ifndef cqueue_h #define cqueue_h 1 #include "bool.h" const int QMAX_LENG = 101; class CharQueue { // ABSTRACTLY: a sequence of char values public: Boolean IsEmpty() const; // POST: FCTVAL == (sequence is empty) Boolean IsFull() const; // POST: FCTVAL == true if no more // items can be stored, false otherwise void Enqueue( char newItem ); // PRE: the sequence isn't full // MODIFIES: self // POST: newItem is the last in the // the sequence, others unchanged char Front() const; // PRE: the sequence isn't empty // POST: FCTVAL == first item in // the sequence void Dequeue(); // PRE: the sequence isn't empty // MODIFIES: self // POST: the sequence is tail of // the sequence in self CharQueue(); // MODIFIES: self // POST: the sequence is empty #include "cqueue.pri" }; #endif