Qt 4.8
|
The QScriptProgram class encapsulates a Qt Script program. More...
#include <qscriptprogram.h>
Public Functions | |
QString | fileName () const |
Returns the filename associated with this program. More... | |
int | firstLineNumber () const |
Returns the line number associated with this program. More... | |
bool | isNull () const |
Returns true if this QScriptProgram is null; otherwise returns false. More... | |
bool | operator!= (const QScriptProgram &other) const |
Returns true if this QScriptProgram is not equal to other; otherwise returns false. More... | |
QScriptProgram & | operator= (const QScriptProgram &other) |
Assigns the other value to this QScriptProgram. More... | |
bool | operator== (const QScriptProgram &other) const |
Returns true if this QScriptProgram is equal to other; otherwise returns false. More... | |
QScriptProgram () | |
Constructs a null QScriptProgram. More... | |
QScriptProgram (const QString &sourceCode, const QString fileName=QString(), int firstLineNumber=1) | |
Constructs a new QScriptProgram with the given sourceCode, fileName and firstLineNumber. More... | |
QScriptProgram (const QScriptProgram &other) | |
Constructs a new QScriptProgram that is a copy of other. More... | |
QString | sourceCode () const |
Returns the source code of this program. More... | |
~QScriptProgram () | |
Destroys this QScriptProgram. More... | |
Properties | |
QExplicitlySharedDataPointer< QScriptProgramPrivate > | d_ptr |
The QScriptProgram class encapsulates a Qt Script program.
QScriptProgram retains the compiled representation of the script if possible. Thus, QScriptProgram can be used to evaluate the same script multiple times more efficiently.
Definition at line 38 of file qscriptprogram.h.
QScriptProgram::QScriptProgram | ( | ) |
Constructs a null QScriptProgram.
Definition at line 113 of file qscriptprogram.cpp.
QScriptProgram::QScriptProgram | ( | const QString & | sourceCode, |
const QString | fileName = QString() , |
||
int | firstLineNumber = 1 |
||
) |
Constructs a new QScriptProgram with the given sourceCode, fileName and firstLineNumber.
Definition at line 122 of file qscriptprogram.cpp.
QScriptProgram::QScriptProgram | ( | const QScriptProgram & | other | ) |
Constructs a new QScriptProgram that is a copy of other.
Definition at line 132 of file qscriptprogram.cpp.
QScriptProgram::~QScriptProgram | ( | ) |
QString QScriptProgram::fileName | ( | ) | const |
Returns the filename associated with this program.
Definition at line 177 of file qscriptprogram.cpp.
Referenced by operator==().
int QScriptProgram::firstLineNumber | ( | ) | const |
Returns the line number associated with this program.
Definition at line 188 of file qscriptprogram.cpp.
Referenced by operator==().
bool QScriptProgram::isNull | ( | ) | const |
Returns true if this QScriptProgram is null; otherwise returns false.
Definition at line 157 of file qscriptprogram.cpp.
bool QScriptProgram::operator!= | ( | const QScriptProgram & | other | ) | const |
Returns true if this QScriptProgram is not equal to other; otherwise returns false.
Definition at line 214 of file qscriptprogram.cpp.
QScriptProgram & QScriptProgram::operator= | ( | const QScriptProgram & | other | ) |
Assigns the other value to this QScriptProgram.
Definition at line 147 of file qscriptprogram.cpp.
bool QScriptProgram::operator== | ( | const QScriptProgram & | other | ) | const |
Returns true if this QScriptProgram is equal to other; otherwise returns false.
Definition at line 200 of file qscriptprogram.cpp.
Referenced by operator!=().
QString QScriptProgram::sourceCode | ( | ) | const |
Returns the source code of this program.
Definition at line 166 of file qscriptprogram.cpp.
Referenced by operator==().
|
private |
Definition at line 60 of file qscriptprogram.h.
Referenced by operator=().