TODO.
More...
#include <muParserScript.h>
|
int | codeLines () |
|
bool | compile (bool asFunction=true) |
|
double * | defineVariable (const char *name, double val=0.0) |
|
QVariant | eval () |
|
double | evalSingleLine () |
|
QString | evalSingleLineToString (const QLocale &locale, char f, int prec) |
|
bool | exec () |
|
bool | setDouble (double val, const char *name) |
|
bool | setInt (int val, const char *name) |
|
bool | setQObject (QObject *val, const char *name) |
|
virtual bool | compile (bool for_eval=true) |
| Compile the Code. Return true if the implementation doesn't support compilation. More...
|
|
virtual QVariant | eval () |
| Evaluate the Code, returning QVariant() on an error / exception. More...
|
|
virtual bool | exec () |
| Execute the Code, returning false on an error / exception. More...
|
|
virtual bool | setDouble (double, const char *) |
|
virtual bool | setInt (int, const char *) |
|
virtual bool | setQObject (const QObject *, const char *) |
|
|
double * | addVariable (const char *name) |
|
double * | addVariableR (const char *name) |
|
double | avg (const QString &arg, int start=0, int end=-1) |
|
double | cell (int row, int col) |
|
double | col (const QString &arg) |
|
double | max (const QString &arg, int start=0, int end=-1) |
|
double | min (const QString &arg, int start=0, int end=-1) |
|
double | sum (const QString &arg, int start=0, int end=-1) |
|
double | tableCell (int col, int row) |
|
double | tablecol (const QString &arg) |
|
|
static QString | compileColArg (const QString &in) |
|
static double * | mu_addVariable (const char *name, void *) |
|
static double * | mu_addVariableR (const char *name) |
|
static double * | mu_addVariableR (const char *name, void *) |
|
static double | mu_avg (const char *arg, double start=1, double end=-1) |
|
static double | mu_cell (double row, double col) |
|
static double | mu_col (const char *arg) |
|
static double | mu_max (const char *arg, double start=1, double end=-1) |
|
static double | mu_min (const char *arg, double start=1, double end=-1) |
|
static double | mu_sum (const char *arg, double start=1, double end=-1) |
|
static double | mu_tableCell (double col, double row) |
|
static double | mu_tablecol (const char *arg) |
|
muParserScript::muParserScript |
( |
ScriptingEnv * |
env, |
|
|
const QString & |
code, |
|
|
QObject * |
context = 0 , |
|
|
const QString & |
name = "<input>" |
|
) |
| |
References MyParser::addGSLConstants(), Script::Context, Script::error(), mu_addVariable(), mu_addVariableR(), mu_avg(), mu_cell(), mu_col(), mu_max(), mu_min(), mu_sum(), mu_tableCell(), mu_tablecol(), parser, Script::print(), rparser, rvariables, and variables.
double * muParserScript::addVariable |
( |
const char * |
name | ) |
|
|
private |
double * muParserScript::addVariableR |
( |
const char * |
name | ) |
|
|
private |
double muParserScript::avg |
( |
const QString & |
arg, |
|
|
int |
start = 0 , |
|
|
int |
end = -1 |
|
) |
| |
|
private |
double muParserScript::cell |
( |
int |
row, |
|
|
int |
col |
|
) |
| |
|
private |
int muParserScript::codeLines |
( |
| ) |
|
|
inlineslot |
double muParserScript::col |
( |
const QString & |
arg | ) |
|
|
private |
References Table::cell(), Table::colNames(), Script::Context, Table::numCols(), Table::numRows(), rparser, rvariables, Table::text(), and variables.
Referenced by avg(), max(), min(), mu_col(), sum(), and tablecol().
bool muParserScript::compile |
( |
bool |
asFunction = true | ) |
|
|
slot |
References Script::Code, compileColArg(), Script::compiled, current, Script::emit_error(), Script::isCompiled, muCode, and parser.
Referenced by Matrix::canCalculate(), eval(), exec(), Table::extractData(), MatrixData::MatrixData(), MatrixModel::muParserCalculate(), and Table::muParserCalculate().
QString muParserScript::compileColArg |
( |
const QString & |
in | ) |
|
|
staticprivate |
double * muParserScript::defineVariable |
( |
const char * |
name, |
|
|
double |
val = 0.0 |
|
) |
| |
|
slot |
QVariant muParserScript::eval |
( |
| ) |
|
|
slot |
References compile(), Script::compiled, current, Script::emit_error(), Script::isCompiled, muCode, and parser.
Referenced by Matrix::canCalculate(), Table::extractData(), MatrixData::MatrixData(), MatrixModel::muParserCalculate(), Table::muParserCalculate(), and MatrixData::value().
double muParserScript::evalSingleLine |
( |
| ) |
|
|
slot |
QString muParserScript::evalSingleLineToString |
( |
const QLocale & |
locale, |
|
|
char |
f, |
|
|
int |
prec |
|
) |
| |
|
slot |
bool muParserScript::exec |
( |
| ) |
|
|
slot |
double muParserScript::max |
( |
const QString & |
arg, |
|
|
int |
start = 0 , |
|
|
int |
end = -1 |
|
) |
| |
|
private |
double muParserScript::min |
( |
const QString & |
arg, |
|
|
int |
start = 0 , |
|
|
int |
end = -1 |
|
) |
| |
|
private |
static double* muParserScript::mu_addVariable |
( |
const char * |
name, |
|
|
void * |
|
|
) |
| |
|
inlinestaticprivate |
static double* muParserScript::mu_addVariableR |
( |
const char * |
name | ) |
|
|
inlinestaticprivate |
static double* muParserScript::mu_addVariableR |
( |
const char * |
name, |
|
|
void * |
|
|
) |
| |
|
inlinestaticprivate |
static double muParserScript::mu_avg |
( |
const char * |
arg, |
|
|
double |
start = 1 , |
|
|
double |
end = -1 |
|
) |
| |
|
inlinestaticprivate |
static double muParserScript::mu_cell |
( |
double |
row, |
|
|
double |
col |
|
) |
| |
|
inlinestaticprivate |
static double muParserScript::mu_col |
( |
const char * |
arg | ) |
|
|
inlinestaticprivate |
static double muParserScript::mu_max |
( |
const char * |
arg, |
|
|
double |
start = 1 , |
|
|
double |
end = -1 |
|
) |
| |
|
inlinestaticprivate |
static double muParserScript::mu_min |
( |
const char * |
arg, |
|
|
double |
start = 1 , |
|
|
double |
end = -1 |
|
) |
| |
|
inlinestaticprivate |
static double muParserScript::mu_sum |
( |
const char * |
arg, |
|
|
double |
start = 1 , |
|
|
double |
end = -1 |
|
) |
| |
|
inlinestaticprivate |
static double muParserScript::mu_tableCell |
( |
double |
col, |
|
|
double |
row |
|
) |
| |
|
inlinestaticprivate |
static double muParserScript::mu_tablecol |
( |
const char * |
arg | ) |
|
|
inlinestaticprivate |
bool muParserScript::setDouble |
( |
double |
val, |
|
|
const char * |
name |
|
) |
| |
|
slot |
bool muParserScript::setInt |
( |
int |
val, |
|
|
const char * |
name |
|
) |
| |
|
slot |
bool muParserScript::setQObject |
( |
QObject * |
val, |
|
|
const char * |
name |
|
) |
| |
|
slot |
double muParserScript::sum |
( |
const QString & |
arg, |
|
|
int |
start = 0 , |
|
|
int |
end = -1 |
|
) |
| |
|
private |
double muParserScript::tableCell |
( |
int |
col, |
|
|
int |
row |
|
) |
| |
|
private |
double muParserScript::tablecol |
( |
const QString & |
arg | ) |
|
|
private |
References ScriptingEnv::application(), Table::cell(), col(), Table::colIndex(), Script::Context, MdiSubWindow::name(), Table::numCols(), Table::numRows(), rparser, rvariables, Script::scriptingEnv(), ApplicationWindow::table(), Table::text(), and variables.
Referenced by mu_tablecol().
Referenced by compile(), eval(), exec(), mu_addVariable(), mu_addVariableR(), mu_avg(), mu_cell(), mu_col(), mu_max(), mu_min(), mu_sum(), mu_tableCell(), and mu_tablecol().
QStringList muParserScript::muCode |
|
private |
Q3AsciiDict<double> muParserScript::rvariables |
|
private |
Q3AsciiDict<double> muParserScript::variables |
|
private |
The documentation for this class was generated from the following files: