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