lib
Kross::Api::ScriptContainer Class Reference
#include <scriptcontainer.h>
Inheritance diagram for Kross::Api::ScriptContainer:

Detailed Description
The ScriptContainer class is something like a single standalone scriptfile.Once you've such a ScriptContainer instance you're able to perform actions with it like to execute scripting code. The Manager takes care of handling the ScriptContainer instances application width.
The class ScriptAction provides a higher level class to work with a ScriptContainer instances.
Definition at line 51 of file scriptcontainer.h.
Public Types | |
typedef KSharedPtr< ScriptContainer > | Ptr |
Public Member Functions | |
virtual | ~ScriptContainer () |
const QString & | getName () const |
void | setName (const QString &name) |
const QString & | getCode () const |
void | setCode (const QString &code) |
const QString & | getInterpreterName () const |
void | setInterpreterName (const QString &interpretername) |
const QString & | getFile () const |
void | setFile (const QString &scriptfile) |
QMap< QString, QVariant > & | getOptions () |
const QVariant & | getOption (const QString name, QVariant defaultvalue=QVariant(), bool recursive=false) |
bool | setOption (const QString name, const QVariant &value) |
Object::Ptr | execute () |
const QStringList | getFunctionNames () |
KSharedPtr< Object > | callFunction (const QString &functionname, KSharedPtr< List > arguments=0) |
const QStringList | getClassNames () |
KSharedPtr< Object > | classInstance (const QString &classname) |
bool | initialize () |
void | finalize () |
Protected Member Functions | |
ScriptContainer (const QString &name=QString::null) | |
Friends | |
class | Manager |
Member Typedef Documentation
|
Shared pointer to implement reference-counting.
Reimplemented from Kross::Api::MainModule. Reimplemented in Kross::Api::ScriptAction. Definition at line 76 of file scriptcontainer.h. |
Constructor & Destructor Documentation
|
Constructor. The constructor is protected cause only with the ScriptManager it's possible to access ScriptContainer instances.
Definition at line 86 of file scriptcontainer.cpp. |
|
Destructor.
Definition at line 96 of file scriptcontainer.cpp. |
Member Function Documentation
|
Call a function in the script container.
|
|
Create and return a new class instance.
Definition at line 224 of file scriptcontainer.cpp. |
|
Execute the script container.
Definition at line 172 of file scriptcontainer.cpp. |
|
Finalize the Script instance and free's any cached or still running executions. Normaly it's not needed to call this function direct cause the ScriptContainer will take care of calling it if needed. Reimplemented in Kross::Api::ScriptAction. Definition at line 287 of file scriptcontainer.cpp. |
|
Return a list of classes.
Definition at line 219 of file scriptcontainer.cpp. |
|
Return the scriptcode this ScriptContainer holds.
Definition at line 114 of file scriptcontainer.cpp. |
|
Definition at line 136 of file scriptcontainer.cpp. |
|
Return a list of functionnames the with setCode defined scriptcode spends.
Definition at line 190 of file scriptcontainer.cpp. |
|
Definition at line 125 of file scriptcontainer.cpp. |
|
Reimplemented from Kross::Api::Object. Definition at line 104 of file scriptcontainer.cpp. |
|
Definition at line 152 of file scriptcontainer.cpp. |
|
Definition at line 147 of file scriptcontainer.cpp. |
|
Initialize the Script instance. Normaly it's not needed to call this function direct cause if will be internaly called if needed (e.g. on execute ). Definition at line 242 of file scriptcontainer.cpp. |
|
Set the scriptcode this ScriptContainer holds.
Definition at line 119 of file scriptcontainer.cpp. |
|
Set the filename which will be executed on execute.
The Definition at line 141 of file scriptcontainer.cpp. |
|
Set the name of the interpreter used on execute.
Reimplemented in Kross::Api::ScriptAction. Definition at line 130 of file scriptcontainer.cpp. |
|
Set the name this ScriptContainer is reachable as.
Definition at line 109 of file scriptcontainer.cpp. |
|
Set the Interpreter::Option value.
Definition at line 160 of file scriptcontainer.cpp. |
The documentation for this class was generated from the following files: