43 #if !defined(QT_NO_DATASTREAM) || defined(QT_BOOTSTRAPPED)
247 #undef CHECK_STREAM_PRECOND
249 #define CHECK_STREAM_PRECOND(retVal) \
251 qWarning("QDataStream: No device"); \
255 #define CHECK_STREAM_PRECOND(retVal) \
261 #define CHECK_STREAM_WRITE_PRECOND(retVal) \
262 CHECK_STREAM_PRECOND(retVal) \
263 if (q_status != Ok) \
266 #define CHECK_STREAM_TRANSACTION_PRECOND(retVal) \
267 if (!d || d->transactionDepth == 0) { \
268 qWarning("QDataStream: No transaction in progress"); \
320 #ifndef QT_NO_QOBJECT
321 buf->blockSignals(
true);
343 #ifndef QT_NO_QOBJECT
411 return dev ? dev->
atEnd() :
true;
675 return q_status ==
Ok;
765 int QDataStream::readBlock(
char *
data,
int len)
772 if (readResult !=
len)
806 if (readBlock(&
c, 1) == 1)
831 if (readBlock(
reinterpret_cast<char *
>(&
i), 2) != 2) {
861 if (readBlock(
reinterpret_cast<char *
>(&
i), 4) != 4) {
895 if (readBlock(
reinterpret_cast<char *
>(&
i), 8) != 8) {
940 if (readBlock(
reinterpret_cast<char *
>(&
f), 4) != 4) {
977 if (readBlock(
reinterpret_cast<char *
>(&
f), 8) != 8) {
1070 const quint32 Step = 1024 * 1024;
1072 char *prevBuf =
nullptr;
1073 char *curBuf =
nullptr;
1078 curBuf =
new char[allocated +
blockSize + 1];
1080 memcpy(curBuf, prevBuf, allocated);
1088 }
while (allocated <
len);
1108 return readBlock(
s,
len);
1282 if (dev->
write((
char *)&
x.val2,
sizeof(
float)) !=
sizeof(
float))
1287 if (dev->
write((
char *)&
g,
sizeof(
float)) !=
sizeof(
float))
1312 if (dev->
write((
char *)&
f,
sizeof(
double)) !=
sizeof(
double))
1321 if (dev->
write((
char *)&
x.val2,
sizeof(
double)) !=
sizeof(
double))
1429 const int skipResult = dev->
skip(
len);
1430 if (skipResult !=
len)
small capitals from c petite p scientific f u
small capitals from c petite p scientific i
[1]
The QBuffer class provides a QIODevice interface for a QByteArray.
The QByteArray class provides an array of bytes.
The QDataStream class provides serialization of binary data to a QIODevice.
QDataStream & operator>>(char &i)
void setFloatingPointPrecision(FloatingPointPrecision precision)
int readRawData(char *, int len)
@ Qt_DefaultCompiledVersion
QDataStream & readBytes(char *&, uint &len)
bool isDeviceTransactionStarted() const
int writeRawData(const char *, int len)
void rollbackTransaction()
QDataStream & writeBytes(const char *, uint len)
void setDevice(QIODevice *)
FloatingPointPrecision floatingPointPrecision() const
void setStatus(Status status)
QDataStream & operator<<(char i)
void setByteOrder(ByteOrder)
QDataStream::FloatingPointPrecision floatingPointPrecision
The QIODevice class is the base interface class of all I/O devices in Qt.
void rollbackTransaction()
qint64 write(const char *data, qint64 len)
qint64 skip(qint64 maxSize)
bool isTransactionStarted() const
virtual bool atEnd() const
qint64 read(char *data, qint64 maxlen)
bool blockSignals(bool b) noexcept
void reset(T *other=nullptr) noexcept(noexcept(Cleanup::cleanup(std::declval< T * >())))
size_t qstrlen(const char *str)
#define CHECK_STREAM_WRITE_PRECOND(retVal)
#define CHECK_STREAM_PRECOND(retVal)
#define CHECK_STREAM_TRANSACTION_PRECOND(retVal)
constexpr T qbswap(T source)
unsigned long long quint64
QT_BEGIN_NAMESPACE typedef signed char qint8
GLsizei const GLfloat * v
[13]
GLint GLint GLint GLint GLint x
[0]
GLboolean GLboolean GLboolean GLboolean a
[7]
GLenum GLuint GLenum GLsizei const GLchar * buf
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
GLenum GLint GLint * precision