Macros | Functions | Variables
qdatastream.cpp File Reference
#include "qdatastream.h"
#include "qbuffer.h"
#include <stdio.h>
#include <ctype.h>
#include <stdlib.h>

Go to the source code of this file.

Macros

#define CHECK_STREAM_PRECOND
 

Functions

static Q_INT32 read_int_ascii (QDataStream *s)
 
static double read_double_ascii (QDataStream *s)
 

Variables

static int systemWordSize = 0
 
static bool systemBigEndian
 
static const int DefaultStreamVersion = 3
 

Macro Definition Documentation

#define CHECK_STREAM_PRECOND
Value:
if ( !dev ) { \
qWarning( "QDataStream: No device" ); \
return *this; }
void qWarning(const char *msg,...)
Definition: qglobal.cpp:409

Definition at line 174 of file qdatastream.cpp.

Function Documentation

static double read_double_ascii ( QDataStream s)
static

Definition at line 541 of file qdatastream.cpp.

542 {
543  register int n = 0;
544  char buf[80];
545  while ( TRUE ) {
546  buf[n] = s->device()->getch();
547  if ( buf[n] == '\n' || n > 78 ) // $-terminator
548  break;
549  n++;
550  }
551  buf[n] = '\0';
552  return atof( buf );
553 }
QIODevice * device() const
Definition: qdatastream.h:123
virtual int getch()=0
std::void_t< T > n
UWORD32 buf[4]
Definition: md5.h:42
const bool TRUE
Definition: qglobal.h:371
static Q_INT32 read_int_ascii ( QDataStream s)
static

Definition at line 404 of file qdatastream.cpp.

405 {
406  register int n = 0;
407  char buf[40];
408  while ( TRUE ) {
409  buf[n] = s->device()->getch();
410  if ( buf[n] == '\n' || n > 38 ) // $-terminator
411  break;
412  n++;
413  }
414  buf[n] = '\0';
415  return (Q_INT32)atol( buf );
416 }
QIODevice * device() const
Definition: qdatastream.h:123
virtual int getch()=0
int Q_INT32
Definition: qglobal.h:419
std::void_t< T > n
UWORD32 buf[4]
Definition: md5.h:42
const bool TRUE
Definition: qglobal.h:371

Variable Documentation

const int DefaultStreamVersion = 3
static

Definition at line 184 of file qdatastream.cpp.

bool systemBigEndian
static

Definition at line 182 of file qdatastream.cpp.

int systemWordSize = 0
static

Definition at line 181 of file qdatastream.cpp.