Kross
Kross::EcmaScript Class Reference
The EcmaScript class implements a Kross::Script to handle a single script. More...
#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 Member Functions | |
EcmaScript (Kross::Interpreter *interpreter, Kross::Action *action) | |
virtual | ~EcmaScript () |
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 166 of file qts/script.cpp.
EcmaScript::~EcmaScript | ( | ) | [virtual] |
Destructor.
Definition at line 171 of file qts/script.cpp.
Member Function Documentation
QVariant EcmaScript::callFunction | ( | const QString & | name, | |
const QVariantList & | args = QVariantList() | |||
) | [virtual, slot] |
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.
Implements Kross::Script.
Definition at line 226 of file qts/script.cpp.
QObject * EcmaScript::engine | ( | ) | const [slot] |
- Returns:
- the internal used QScriptEngine instance.
Definition at line 268 of file qts/script.cpp.
QVariant EcmaScript::evaluate | ( | const QByteArray & | code | ) | [virtual, slot] |
Evaluate some scripting code.
- Parameters:
-
code The scripting code to evaluate.
- Returns:
- The return value of the evaluation.
Implements Kross::Script.
Definition at line 253 of file qts/script.cpp.
void EcmaScript::execute | ( | ) | [virtual, slot] |
QStringList EcmaScript::functionNames | ( | ) | [virtual, slot] |
- Returns:
- a list of function-names.
Implements Kross::Script.
Definition at line 209 of file qts/script.cpp.
The documentation for this class was generated from the following files: