40 #ifndef QT_NO_DATASTREAM 172 #if defined(CHECK_STATE) 173 #undef CHECK_STREAM_PRECOND 174 #define CHECK_STREAM_PRECOND if ( !dev ) { \ 175 qWarning( "QDataStream: No device" ); \ 178 #define CHECK_STREAM_PRECOND 410 if ( buf[n] ==
'\n' || n > 38 )
437 i = (buf[2] & 0x07)+((buf[1] & 0x07) << 3)+((buf[0] & 0x07) << 6);
547 if ( buf[n] ==
'\n' || n > 78 )
647 if ( len == 0 ||
eof() ) {
701 if (
printable && (i ==
'\\' || !isprint(i)) ) {
704 buf[1] =
'0' + ((i >> 6) & 0x07);
705 buf[2] =
'0' + ((i >> 3) & 0x07);
706 buf[3] =
'0' + (i & 0x07);
732 sprintf( buf,
"%d\n", i );
763 sprintf( buf,
"%d\n", i );
795 sprintf( buf,
"%ld\n", i );
841 sprintf( buf,
"%g\n", (
double)f );
871 sprintf( buf,
"%g\n", f );
942 register char *
p = (
char *)s;
951 #endif // QT_NO_DATASTREAM QDataStream & operator>>(Q_INT8 &i)
QDataStream & operator<<(Q_INT8 i)
static constexpr double g
Q_EXPORT bool qSysInfo(int *wordSize, bool *bigEndian)
QIODevice * device() const
static bool systemBigEndian
virtual int readBlock(char *data, uint maxlen)=0
The QBuffer class is an I/O device that operates on a QByteArray.
static const int DefaultStreamVersion
virtual int writeBlock(const char *data, uint len)=0
Q_EXPORT uint qstrlen(const char *str)
QDataStream & writeBytes(const char *, uint len)
#define CHECK_STREAM_PRECOND
QDataStream & readRawBytes(char *, uint len)
static double read_double_ascii(QDataStream *s)
QDataStream & readBytes(char *&, uint &len)
static Q_INT32 read_int_ascii(QDataStream *s)
void setDevice(QIODevice *)
The QDataStream class provides serialization of binary data to a QIODevice.
static int systemWordSize
The QIODevice class is the base class of I/O devices.
QDataStream & writeRawBytes(const char *, uint len)