ACQ2XX_API
CommandBuffer.h
Go to the documentation of this file.
00001 /*
00002  * CommandBuffer.h
00003  *
00004  *  Created on: Jul 24, 2010
00005  *      Author: pgm
00006  */
00007 
00008 #ifndef COMMANDBUFFER_H_
00009 #define COMMANDBUFFER_H_
00010 
00011 class CommandBuffer {
00012 
00013 protected:
00014         CommandBuffer() {}
00015 public:
00016         virtual ~CommandBuffer() {}
00017 
00018         virtual void getNext(char* ubuf, int _maxlen) = 0;
00019         virtual void dump(const char *user) {}
00020 
00021         virtual int writeBack(char *ubuf) {
00022                 return -1;
00023         }
00024 
00025         static CommandBuffer* create(
00026                         const char* fname, int _maxlen = 80, int maxq=4);
00027 
00028         virtual bool hasDataAvailable(void) = 0;
00029 };
00030 #endif /* COMMANDBUFFER_H_ */