Kross
#include <script.h>
Public Slots | |
virtual QVariant | callFunction (const QString &name, const QVariantList &args=QVariantList()) |
QObject * | engine () const |
virtual QVariant | evaluate (const QByteArray &code) |
virtual void | execute () |
virtual QStringList | functionNames () |
Public Slots inherited from Kross::Script | |
Action * | action () const |
virtual QVariant | callFunction (const QString &name, const QVariantList &args=QVariantList())=0 |
virtual QVariant | evaluate (const QByteArray &code)=0 |
virtual void | execute ()=0 |
virtual QStringList | functionNames ()=0 |
Interpreter * | interpreter () const |
Public Member Functions | |
EcmaScript (Kross::Interpreter *interpreter, Kross::Action *action) | |
virtual | ~EcmaScript () |
Public Member Functions inherited from Kross::Script | |
Script (Interpreter *interpreter, Action *action) | |
virtual | ~Script () |
Public Member Functions inherited from Kross::ErrorInterface | |
ErrorInterface () | |
void | clearError () |
long | errorLineNo () const |
const QString | errorMessage () const |
const QString | errorTrace () const |
bool | hadError () const |
void | setError (const QString &errormessage, const QString &tracemessage=QString(), long lineno=-1) |
void | setError (ErrorInterface *error) |
Detailed Description
The EcmaScript class implements a Kross::Script to handle a single script.
Each script and script file will have its own EcmaScript instance as container for a Ecma QtScript that is managed by the Kross::Action class.
Definition at line 38 of file qts/script.h.
Constructor & Destructor Documentation
EcmaScript::EcmaScript | ( | Kross::Interpreter * | interpreter, |
Kross::Action * | action | ||
) |
Constructor.
- Parameters
-
interpreter The EcmaInterpreter instance this script belongs to. action The Kross::Action instance that contains details about the script and that decorates this script.
Definition at line 167 of file qts/script.cpp.
|
virtual |
Destructor.
Definition at line 172 of file qts/script.cpp.
Member Function Documentation
|
virtualslot |
Execute a function.
- Parameters
-
name The name of the function that should be called. args The optional arguments for the function.
- Returns
- The return value of the function.
Definition at line 227 of file qts/script.cpp.
|
slot |
- Returns
- the internal used QScriptEngine instance.
Definition at line 269 of file qts/script.cpp.
|
virtualslot |
Evaluate some scripting code.
- Parameters
-
code The scripting code to evaluate.
- Returns
- The return value of the evaluation.
Definition at line 254 of file qts/script.cpp.
|
virtualslot |
Executes the script.
Definition at line 178 of file qts/script.cpp.
|
virtualslot |
- Returns
- a list of function-names.
Definition at line 210 of file qts/script.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:49:54 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.