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

Kross

Kross::Script

Kross::Script Class Reference

Base class for interpreter dependent functionality each script provides. More...

#include <script.h>

Inheritance diagram for Kross::Script:

Inheritance graph
[legend]

List of all members.


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]

Returns:
the Action instance associated with this Script .

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