scriptcontainer.cpp
152TQVariant ScriptContainer::getOption(const TQString name, TQVariant defaultvalue, bool /*recursive*/)
156 Kross::Api::InterpreterInfo* info = Kross::Api::Manager::scriptManager()->getInterpreterInfo( d->interpretername );
162 Kross::Api::InterpreterInfo* info = Kross::Api::Manager::scriptManager()->getInterpreterInfo( d->interpretername );
167 } else krosswarning( TQString("Kross::Api::ScriptContainer::setOption(%1, %2): No such option").arg(name).arg(value.toString()) );
168 } else krosswarning( TQString("Kross::Api::ScriptContainer::setOption(%1, %2): No such interpreterinfo").arg(name).arg(value.toString()) );
205 setException( new Exception(i18n("No functionname defined for ScriptContainer::callFunction().")) );
252 setException( new Exception(i18n("Failed to determinate interpreter for scriptfile '%1'").arg(d->scriptfile)) );
274 setException( new Exception(i18n("Failed to create script for interpreter '%1'").arg(d->interpretername)) );
Common exception class used for representing exceptions in Kross.
Definition exception.h:39
While the Interpreter is the implemented interpreter this class is used to provide some abstract info...
Definition interpreter.h:42
bool hasOption(const TQString &key)
Definition interpreter.cpp:72
const TQVariant getOptionValue(const TQString name, TQVariant defaultvalue=TQVariant())
Definition interpreter.cpp:82
virtual Script * createScript(ScriptContainer *scriptcontainer)=0
Create and return a new interpreter dependend Script instance.
This class implements Module for the global Manager singleton and local ScriptContainer instances.
Definition mainmodule.h:54
void setException(Exception::Ptr exception)
Set the Exception this module throwed.
Definition mainmodule.cpp:66
const TQString getInterpreternameForFile(const TQString &file)
Definition manager.cpp:142
InterpreterInfo * getInterpreterInfo(const TQString &interpretername)
Definition manager.cpp:137
Interpreter * getInterpreter(const TQString &interpretername)
Return the Interpreter instance defined by the interpretername.
Definition manager.cpp:167
void setFile(const TQString &scriptfile)
Set the filename which will be executed on execute.
Definition scriptcontainer.cpp:141
void setName(const TQString &name)
Set the name this ScriptContainer is reachable as.
Definition scriptcontainer.cpp:109
const TQString getName() const
Definition scriptcontainer.cpp:104
TDESharedPtr< Object > callFunction(const TQString &functionname, TDESharedPtr< List > arguments=0)
Call a function in the script container.
Definition scriptcontainer.cpp:195
TQStringVariantMap & getOptions()
Definition scriptcontainer.cpp:147
TQVariant getOption(const TQString name, TQVariant defaultvalue=TQVariant(), bool recursive=false)
Definition scriptcontainer.cpp:152
TQString getInterpreterName() const
Definition scriptcontainer.cpp:125
TQString getCode() const
Return the scriptcode this ScriptContainer holds.
Definition scriptcontainer.cpp:114
bool setOption(const TQString name, const TQVariant &value)
Set the Interpreter::Option value.
Definition scriptcontainer.cpp:160
void setInterpreterName(const TQString &interpretername)
Set the name of the interpreter used on execute.
Definition scriptcontainer.cpp:130
TDESharedPtr< Object > classInstance(const TQString &classname)
Create and return a new class instance.
Definition scriptcontainer.cpp:224
void setCode(const TQString &code)
Set the scriptcode this ScriptContainer holds.
Definition scriptcontainer.cpp:119
void finalize()
Finalize the Script instance and free's any cached or still running executions.
Definition scriptcontainer.cpp:287
const TQStringList getFunctionNames()
Return a list of functionnames the with setCode defined scriptcode spends.
Definition scriptcontainer.cpp:190
Base class for interpreter dependend functionality each script provides.
Definition script.h:46
const char * name(StdAction id)
The Kross scripting bridge to embed scripting functionality into an application.
Definition callable.h:31
