56 #include "QtCore/qiodevice.h" 57 #include "QtCore/qbytearray.h" 58 #include "QtCore/qobjectdefs.h" 59 #include "QtCore/qstring.h" 60 #include "private/qringbuffer_p.h" 62 #include "private/qobject_p.h" 67 #ifndef QIODEVICE_BUFFERSIZE 68 #define QIODEVICE_BUFFERSIZE Q_INT64_C(16384) 108 memcpy(target,
first, r);
115 memcpy(target,
first, r);
139 char* eol =
static_cast<char*
>(memchr(
first,
'\n', r));
142 memcpy(target,
first, r);
166 memcpy(
first, block, size);
173 while (newCapacity < required)
178 char* newBuf =
new char[newCapacity];
179 memmove(newBuf + moveOffset,
first,
len);
202 #ifndef QT_NO_QOBJECT
225 virtual bool putCharHelper(
char c);
235 if (accessMode == Unset)
236 accessMode = q_func()->isSequential() ? Sequential : RandomAccess;
237 return accessMode == Sequential;
250 #endif // QIODEVICE_P_H
Q_DECL_CONSTEXPR const T & qMin(const T &a, const T &b)
#define QT_END_NAMESPACE
This macro expands to.
QIODevice::OpenMode openMode
The QByteArray class provides an array of bytes.
void makeSpace(size_t required, FreeSpacePos where)
QIODevicePrivateLinearBuffer buffer
int read(char *target, int size)
#define QIODEVICE_BUFFERSIZE
The QString class provides a Unicode character string.
Q_DECL_CONSTEXPR const T & qMax(const T &a, const T &b)
#define QT_BEGIN_NAMESPACE
This macro expands to.
static const char * data(const QByteArray &arr)
int peek(char *target, int size)
#define Q_DECLARE_PUBLIC(Class)
void ungetBlock(const char *block, int size)
bool isSequential() const
bool baseReadLineDataCalled
QIODevicePrivateLinearBuffer(int)
int readLine(char *target, int size)
The QIODevice class is the base interface class of all I/O devices in Qt.
~QIODevicePrivateLinearBuffer()