kiobuffer.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
#ifndef KIOBUFFER_H
00026
#define KIOBUFFER_H
00027
00028
#include <qcstring.h>
00029
00030
#include <kdelibs_export.h>
00031
00032
class QIODevice;
00033
00045 class KIOBufferBase
00046 {
00047
public:
00051 KIOBufferBase()
00052 { }
00053
00057 KIOBufferBase(
const KIOBufferBase& )
00058 { }
00059
00063 virtual ~KIOBufferBase()
00064 { }
00065
00069 KIOBufferBase&
operator=(
const KIOBufferBase& )
00070 {
return *
this; }
00071
00075
virtual bool canReadLine() const = 0;
00076
00080 virtual
QCString readLine() = 0;
00081
00088 virtual Q_LONG length() const = 0;
00089
00093 inline
bool isEmpty()
const
00094
{
return length() == 0; }
00095
00102
virtual Q_LONG
size() const = 0;
00103
00107 inline
bool isFull()
const
00108
{
return size() != -1 &&
size() ==
length(); }
00109
00117
virtual bool setSize(Q_LONG size) = 0;
00118
00126
virtual Q_LONG feedBuffer(
const char *data, Q_LONG len) = 0;
00127
00136
virtual Q_LONG consumeBuffer(
char *data, Q_LONG maxlen,
bool discard =
true) = 0;
00137
00141
virtual void clear() = 0;
00142 };
00143
00144
#endif
This file is part of the documentation for kdecore Library Version 3.4.0.