home *** CD-ROM | disk | FTP | other *** search
- /***************************************************************************
- These C++ classes are copyright 1990, by William Herrera.
- All those who put this code or its derivatives in a commercial product MUST
- mention this copyright in their documentation for users of the products in
- which this code or its derivative classes are used. Otherwise, this code
- may be freely distributed and freely used for any purpose.
- ***************************************************************************/
-
- // file charqueu.hpp class declaration for the CharQueue class.
-
- #ifndef CHARQUEU_HPP
- #define CHARQUEU_HPP 1
-
- #include <bool.h> // enum boolean { false, true }; if you don't have
-
- class CharQueue
- {
- protected:
- char * queue_buffer;
- unsigned int size;
- unsigned int count;
- unsigned int add_position;
- unsigned int get_position;
- public:
- CharQueue(unsigned int bufsize = 1000);
- ~CharQueue();
- int Add(char ch);
- int Get();
- int Peek();
- void Purge();
- unsigned int GetCount();
- boolean IsFull();
- boolean IsEmpty();
- };
-
- #endif
-
- // end of file CharQueu.hpp
-
-