scidavis
2.3.0
About: SciDAVis is a free application for Scientific Data Analysis and Visualization (a fork off of QtiPlot). Fossies Dox: scidavis-2.3.0.tar.gz ("unofficial" and yet experimental doxygen-generated source code documentation) 
|
Go to the documentation of this file.
36 #include <QStringList>
38 #include <QStringList>
86 virtual bool compile(
bool for_eval=
true);
88 virtual QVariant
eval();
93 virtual bool setQObject(QObject*,
const char*) {
return false; }
94 virtual bool setInt(
int,
const char*) {
return false; }
95 virtual bool setDouble(
double,
const char*) {
return false; }
101 void error(
const QString & message,
const QString & scriptName,
int lineNumber);
void error(const QString &message, const QString &scriptName, int lineNumber)
signal an error condition / exception
virtual void setContext(QObject *context)
Set the context in which the code is to be executed.
Script(ScriptingEnv *env, const QString &code, QObject *context=0, const QString &name="<input>")
ScriptingEnv * scriptingEnv() const
void incref()
Increase the reference count. This should only be called by scripted and Script to avoid memory leaks...
enum Script::compileStatus compiled
virtual bool setDouble(double, const char *)
void decref()
Decrease the reference count. This should only be called by scripted and Script to avoid segfaults.
static ScriptingEnv * newEnv(ApplicationWindow *parent)
Return an instance of the first implementation we can find.
#define SCRIPTING_CHANGE_EVENT
const QString code() const
Return the code that will be executed when calling exec() or eval()
Interface for maintaining a reference to the current ScriptingEnv.
void setEmitErrors(bool yes)
Set whether errors / exceptions are to be emitted or silently ignored.
bool batchMode
true if running in batch - don't redirect stdio
bool emitErrors() const
Return whether errors / exceptions are to be emitted or silently ignored.
void scriptingChangeEvent(ScriptingChangeEvent *)
An interpreter for evaluating scripting code. Abstract.
ScriptingChangeEvent(ScriptingEnv *e)
A chunk of scripting code. Abstract.
const QObject * context() const
Return the context in which the code is to be executed.
notify an object that it should update its scripting environment (see class scripted)
static int numLanguages()
Return the number of available implementations.
void emit_error(const QString &message, int lineNumber)
scripted(ScriptingEnv *env)
void codeChanged()
This is emitted whenever the code to be executed by exec() and eval() is changed.
keeps a static list of available interpreters and instantiates them on demand
virtual QVariant eval()
Evaluate the Code, returning QVariant() on an error / exception.
virtual void setCode(const QString &code)
Set the code that will be executed when calling exec() or eval()
static QStringList languages()
Return the names of available implementations.
void print(const QString &output)
output generated by the code
virtual bool setQObject(QObject *, const char *)
const QString name() const
Like QObject::name, but with unicode support.
virtual bool setInt(int, const char *)
virtual void addCode(const QString &code)
Append to the code that will be executed when calling exec() or eval()
void setName(const QString &name)
Like QObject::setName, but with unicode support.
virtual bool exec()
Execute the Code, returning false on an error / exception.
virtual bool compile(bool for_eval=true)
Compile the Code. Return true if the implementation doesn't support compilation.