![]() |
OpendTect
6.3
|
Parses a string with a mathematical expression. More...
Protected Member Functions | |
| Expression * | parse (const char *) const |
| bool | findOuterParens (char *, int, Expression *&) const |
| bool | findOuterAbs (char *, int, Expression *&) const |
| bool | findQMarkOper (char *, int, Expression *&) const |
| bool | findAndOrOr (char *, int, Expression *&) const |
| bool | findInequality (char *, int, Expression *&) const |
| bool | findPlusAndMinus (char *, int, Expression *&) const |
| bool | findOtherOper (BufferString &, int, Expression *&) const |
| bool | findVariable (char *, int, Expression *&) const |
| bool | findMathFunction (BufferString &, int, Expression *&) const |
| bool | findStatsFunction (BufferString &, int, Expression *&) const |
Protected Attributes | |
| BufferString | inp_ |
| const bool | inputsareseries_ |
| uiString | errmsg_ |
| bool | abswarn_ |
Private Member Functions | |
| mODTextTranslationClass (ExpressionParser) public | |
| void | setInput (const char *s) |
| Expression * | parse () const |
| const uiString | errMsg () const |
| bool | foundOldAbs () const |
| uiString | sParse2ArgStr () const |
Static Private Member Functions | |
| static BufferString | varNameOf (const char *fullvarnm, int *shift=0) |
| static Expression::VarType | varTypeOf (const char *) |
| static int | constIdxOf (const char *) |
Parses a string with a mathematical expression.
The expression can consist of constants, variables, operators and standard mathematical functions. A constant can be any number like 3, -5, 3e-5, or pi. Everything that does not start with a digit and is not an operator is treated as a variable. An operator can be either:
+, -, *, /, ^, >, <, <=, >=, ==, !=, &&, ||, cond ? true stat : false stat, or |abs|
A mathematical function can be either:
sin(), cos(), tan(), ln(), log(), exp() or sqrt ().
If the parser returns null, it couldn't parse the expression. Then, errmsg_ should contain info.
|
staticprivate |
|
inlineprivate |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
inlineprivate |
|
inlineprivate |
|
private |
|
protected |
|
inlineprivate |
|
inlineprivate |
|
staticprivate |
|
staticprivate |
|
mutableprotected |
|
mutableprotected |
|
protected |
|
protected |
Generated at for the OpendTect seismic interpretation project. Copyright (C): dGB Beheer B. V. 2017