28 #include <tqcstring.h>
30 #include <kdelibs_export.h>
102 virtual TQ_LONG
size()
const = 0;
126 virtual TQ_LONG
feedBuffer(
const char *data, TQ_LONG len) = 0;
136 virtual TQ_LONG
consumeBuffer(
char *data, TQ_LONG maxlen,
bool discard =
true) = 0;
base for I/O buffer implementation
virtual TQ_LONG consumeBuffer(char *data, TQ_LONG maxlen, bool discard=true)=0
Consumes data from the beginning of the buffer.
virtual void clear()=0
Clears the buffer.
virtual TQ_LONG length() const =0
Returns the number of bytes in the buffer.
virtual bool canReadLine() const =0
Returns true if a line can be read from the buffer.
bool isFull() const
Returns true if the buffer is full (i.e., cannot receive more data)
KIOBufferBase()
Default constructor.
bool isEmpty() const
Returns true if the buffer is empty of data.
virtual bool setSize(TQ_LONG size)=0
Sets the size of the buffer, if allowed.
virtual TQ_LONG feedBuffer(const char *data, TQ_LONG len)=0
Adds data to the end of the buffer.
virtual TQ_LONG size() const =0
Retrieves the buffer size.
virtual TQCString readLine()=0
Reads a line from the buffer and discards it.
virtual ~KIOBufferBase()
Virtual destructor.
KIOBufferBase(const KIOBufferBase &)
Copy constructor.
KIOBufferBase & operator=(const KIOBufferBase &)
Assignment operator.