Kross
Kross::Script Class Reference
Base class for interpreter dependent functionality each script provides. More...
#include <script.h>
Public Slots | |
| 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 | |
| Script (Interpreter *interpreter, Action *action) | |
| virtual | ~Script () |
Detailed Description
Base class for interpreter dependent functionality each script provides.
Each Action holds a pointer to a class that implements the Script functionality for the defined Interpreter .
Definition at line 43 of file core/script.h.
Constructor & Destructor Documentation
| Script::Script | ( | Interpreter * | interpreter, | |
| Action * | action | |||
| ) |
Constructor.
- Parameters:
-
interpreter The Interpreter instance that was used to created this Script instance. Action The Action instance this script is associated with.
Definition at line 41 of file core/script.cpp.
| Script::~Script | ( | ) | [virtual] |
Destructor.
Definition at line 51 of file core/script.cpp.
Member Function Documentation
| Action * Script::action | ( | ) | const [slot] |
Definition at line 61 of file core/script.cpp.
| virtual QVariant Kross::Script::callFunction | ( | const QString & | name, | |
| const QVariantList & | args = QVariantList() | |||
| ) | [pure virtual, slot] |
Call a function in the script.
- Parameters:
-
name The name of the function which should be called. args The optional list of arguments.
Implemented in Kross::KjsScript, and Kross::EcmaScript.
| virtual QVariant Kross::Script::evaluate | ( | const QByteArray & | code | ) | [pure virtual, slot] |
Evaluate some scripting code.
- Parameters:
-
code The scripting code to evaluate.
- Returns:
- The return value of the evaluation.
Implemented in Kross::KjsScript, and Kross::EcmaScript.
| virtual void Kross::Script::execute | ( | ) | [pure virtual, slot] |
Execute the script.
Implemented in Kross::KjsScript, and Kross::EcmaScript.
| virtual QStringList Kross::Script::functionNames | ( | ) | [pure virtual, slot] |
- Returns:
- the list of functionnames.
Implemented in Kross::KjsScript, and Kross::EcmaScript.
| Interpreter * Script::interpreter | ( | ) | const [slot] |
- Returns:
- the Interpreter instance that was used to created this Script .
Definition at line 56 of file core/script.cpp.
The documentation for this class was generated from the following files:
KDE 4.3 API Reference