• Skip to content
  • Skip to link menu
KDE 4.2 API Reference
  • KDE API Reference
  • kdelibs
  • Sitemap
  • Contact Us
 

Kross

Kross::EcmaScript

Kross::EcmaScript Class Reference

The EcmaScript class implements a Kross::Script to handle a single script. More...

#include <script.h>

Inheritance diagram for Kross::EcmaScript:

Inheritance graph
[legend]

List of all members.


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]

Executes the script.

Implements Kross::Script.

Definition at line 177 of file qts/script.cpp.

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:
  • qts/script.h
  • qts/script.cpp

Kross

Skip menu "Kross"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • Kross
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.5.7
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal