Qt 4.8
Classes | Functions
qscriptdebuggervalue.cpp File Reference
#include "qscriptdebuggervalue_p.h"
#include <QtScript/qscriptvalue.h>
#include <QtScript/qscriptengine.h>
#include <QtCore/qdatastream.h>
#include <QtCore/qdebug.h>

Go to the source code of this file.

Classes

class  QScriptDebuggerValuePrivate
 

Function Documentation

◆ operator<<()

QDataStream& operator<< ( QDataStream out,
const QScriptDebuggerValue value 
)
related

Definition at line 345 of file qscriptdebuggervalue.cpp.

346 {
347  out << (quint32)value.type();
348  switch (value.type()) {
352  break;
354  out << value.booleanValue();
355  break;
357  out << value.stringValue();
358  break;
360  out << value.numberValue();
361  break;
363  out << value.objectId();
364  break;
365  }
366  return out;
367 }
QString stringValue() const
Returns this value as a string.
ValueType type() const
Returns the type of this value.
double numberValue() const
Returns this value as a number.
bool booleanValue() const
Returns this value as a boolean.
unsigned int quint32
Definition: qglobal.h:938
qint64 objectId() const
Returns this value as an object ID.

◆ operator>>()

QDataStream& operator>> ( QDataStream in,
QScriptDebuggerValue value 
)
related

Definition at line 379 of file qscriptdebuggervalue.cpp.

380 {
381  quint32 type;
382  in >> type;
383  switch (QScriptDebuggerValue::ValueType(type)) {
387  break;
389  bool b;
390  in >> b;
391  value = QScriptDebuggerValue(b);
392  } break;
394  QString s;
395  in >> s;
396  value = QScriptDebuggerValue(s);
397  } break;
399  double d;
400  in >> d;
401  value = QScriptDebuggerValue(d);
402  } break;
404  qint64 id;
405  in >> id;
406  value = QScriptDebuggerValue(id);
407  } break;
409  default:
410  value = QScriptDebuggerValue();
411  break;
412  }
413  return in;
414 }
double d
Definition: qnumeric_p.h:62
int type
Definition: qmetatype.cpp:239
The QString class provides a Unicode character string.
Definition: qstring.h:83
__int64 qint64
Definition: qglobal.h:942
The QScriptDebuggerValue class represents a script value.
unsigned int quint32
Definition: qglobal.h:938