Qt 4.8
Classes | Typedefs | Functions
qscriptscriptdata_p.h File Reference
#include <QtCore/qobjectdefs.h>
#include <QtCore/private/qscopedpointer_p.h>
#include <QtCore/qdatetime.h>
#include <QtCore/qmap.h>

Go to the source code of this file.

Classes

class  QScriptScriptData
 The QScriptScriptData class holds data associated with a script. More...
 

Typedefs

typedef QMap< qint64, QScriptScriptDataQScriptScriptMap
 

Functions

Q_AUTOTEST_EXPORT QDataStreamoperator<< (QDataStream &, const QScriptScriptData &)
 
Q_AUTOTEST_EXPORT QDataStreamoperator>> (QDataStream &, QScriptScriptData &)
 

Typedef Documentation

◆ QScriptScriptMap

Definition at line 99 of file qscriptscriptdata_p.h.

Function Documentation

◆ operator<<()

Q_AUTOTEST_EXPORT QDataStream& operator<< ( QDataStream ,
const QScriptScriptData  
)

Definition at line 185 of file qscriptscriptdata.cpp.

186 {
187  const QScriptScriptDataPrivate *d = data.d_ptr.data();
188  if (d) {
189  out << d->contents;
190  out << d->fileName;
191  out << qint32(d->baseLineNumber);
192  } else {
193  out << QString();
194  out << QString();
195  out << qint32(0);
196  }
197  return out;
198 }
double d
Definition: qnumeric_p.h:62
int qint32
Definition: qglobal.h:937
The QString class provides a Unicode character string.
Definition: qstring.h:83
static const char * data(const QByteArray &arr)

◆ operator>>()

Definition at line 200 of file qscriptscriptdata.cpp.

201 {
202  if (!data.d_ptr) {
203  data.d_ptr.reset(new QScriptScriptDataPrivate());
204  data.d_ptr->ref.ref();
205  }
206  QScriptScriptDataPrivate *d = data.d_ptr.data();
207  in >> d->contents;
208  in >> d->fileName;
209  qint32 ln;
210  in >> ln;
211  d->baseLineNumber = ln;
212  return in;
213 }
double d
Definition: qnumeric_p.h:62
int qint32
Definition: qglobal.h:937
static const char * data(const QByteArray &arr)