/***************************************************************************
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.

Enhancements: 1991 by David Orme
	*  General cleanup.
			- I/O now takes advantage of C++ overloading.
			- Serial port I/O functionality now only in Serial class.
			- Modem functionality now only in Modem class.
	*  Possible to easily implement file Xfr prots now.
	*  CCITT CRC-16 class added							-- 2-20-1991
	*  BIOS Timer class added								-- 2-22-1991
	*  Optional timeout on all input routines added	-- 2-25-1991

***************************************************************************/

// 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

