home *** CD-ROM | disk | FTP | other *** search
- /*
- File: StringQueue.h
-
- Author: Bruce Kritt
-
- Description:
- */
-
- struct StringCell
- {
- String* info;
- StringCell* next;
- };
-
- class StringQueue
- {
- private:
- // attributes
-
- StringCell* back;
- int length;
- public:
- // constructors
-
- StringQueue(void):back(0),length(0){ }
- StringQueue(StringQueue& copy);
-
- // destructor
-
- ~StringQueue();
-
- // public services
-
- int Length(void) const {return length;}
- int Empty(void) const {return (Length() == 0);}
-
- String Front(void) const;
- String Back(void) const;
-
- void Enqueue(String string);
- String Dequeue(void);
- void Rotate(void){if (Length() > 1) back = back->next;}
-
- }; // end class StringQueue
-