Qt 4.8
Classes | Functions
qscriptcontextinfo.cpp File Reference
#include "config.h"
#include "qscriptcontextinfo.h"
#include "qscriptcontext_p.h"
#include "qscriptengine.h"
#include "qscriptengine_p.h"
#include "../bridge/qscriptqobject_p.h"
#include <QtCore/qdatastream.h>
#include <QtCore/qmetaobject.h>
#include "CodeBlock.h"
#include "JSFunction.h"

Go to the source code of this file.

Classes

class  QScriptContextInfoPrivate
 

Functions

QDataStreamoperator<< (QDataStream &out, const QScriptContextInfo &info)
 
Q_SCRIPT_EXPORT QDataStreamoperator>> (QDataStream &in, QScriptContextInfo &info)
 

Function Documentation

◆ operator<<()

QDataStream& operator<< ( QDataStream out,
const QScriptContextInfo info 
)

Definition at line 499 of file qscriptcontextinfo.cpp.

500 {
501  out << info.scriptId();
502  out << (qint32)info.lineNumber();
503  out << (qint32)info.columnNumber();
504 
505  out << (quint32)info.functionType();
506  out << (qint32)info.functionStartLineNumber();
507  out << (qint32)info.functionEndLineNumber();
508  out << (qint32)info.functionMetaIndex();
509 
510  out << info.fileName();
511  out << info.functionName();
512  out << info.functionParameterNames();
513 
514  return out;
515 }
int qint32
Definition: qglobal.h:937
int functionEndLineNumber() const
Returns the line number where the definition of the called function ends, or -1 if the line number is...
QT_DEPRECATED int columnNumber() const
int functionMetaIndex() const
Returns the meta index of the called function, or -1 if the meta index is not available.
QString fileName() const
Returns the name of the file where the code being executed was defined, if available; otherwise retur...
int lineNumber() const
Returns the line number corresponding to the statement being executed, or -1 if the line number is no...
int functionStartLineNumber() const
Returns the line number where the definition of the called function starts, or -1 if the line number ...
QStringList functionParameterNames() const
Returns the names of the formal parameters of the called function, or an empty QStringList if the par...
unsigned int quint32
Definition: qglobal.h:938
FunctionType functionType() const
Returns the type of the called function.
qint64 scriptId() const
Returns the ID of the script where the code being executed was defined, or -1 if the ID is not availa...
QString functionName() const
Returns the name of the called function, or an empty string if the name is not available.

◆ operator>>()

Q_SCRIPT_EXPORT QDataStream& operator>> ( QDataStream in,
QScriptContextInfo info 
)

Definition at line 528 of file qscriptcontextinfo.cpp.

529 {
530  if (!info.d_ptr) {
531  info.d_ptr = new QScriptContextInfoPrivate();
532  }
533 
534  in >> info.d_ptr->scriptId;
535 
536  qint32 line;
537  in >> line;
538  info.d_ptr->lineNumber = line;
539 
540  qint32 column;
541  in >> column;
542  info.d_ptr->columnNumber = column;
543 
544  quint32 ftype;
545  in >> ftype;
547 
548  qint32 startLine;
549  in >> startLine;
550  info.d_ptr->functionStartLineNumber = startLine;
551 
552  qint32 endLine;
553  in >> endLine;
554  info.d_ptr->functionEndLineNumber = endLine;
555 
556  qint32 metaIndex;
557  in >> metaIndex;
558  info.d_ptr->functionMetaIndex = metaIndex;
559 
560  in >> info.d_ptr->fileName;
561  in >> info.d_ptr->functionName;
562  in >> info.d_ptr->parameterNames;
563 
564  return in;
565 }
int qint32
Definition: qglobal.h:937
FunctionType
This enum specifies the type of function being called.
QExplicitlySharedDataPointer< QScriptContextInfoPrivate > d_ptr
QScriptContextInfo::FunctionType functionType
unsigned int quint32
Definition: qglobal.h:938