OpendTect
7.0
|
Parsed Math expression. More...
Public Types | |
enum | VarType { Variable , Constant , Recursive } |
Public Member Functions | |
virtual | ~Expression () |
virtual Expression * | clone () const =0 |
void | dump (BufferString &str) const |
int | firstOccurVarName (const char *) const |
virtual const char * | fullVariableExpression (int) const |
int | getConstIdx (int varidx) const |
VarType | getType (int varidx) const |
virtual double | getValue () const =0 |
int | indexOfUnVarName (const char *nm) const |
bool | isRecursive () const |
int | nrLevels () const |
int | nrUniqueVarNames () const |
virtual int | nrVariables () const |
virtual void | setVariableValue (int, double) |
const char * | type () const |
const char * | uniqueVarName (int idx) const |
Protected Member Functions | |
Expression (int nrinputs) | |
void | addIfOK (const char *) |
void | copyInput (Expression *target) const |
void | doDump (BufferString &, int nrtabs) const |
virtual void | dumpSpecifics (BufferString &, int nrtabs) const |
int | nrInputs () const |
bool | setInput (int, Expression *) |
Protected Attributes | |
ObjectSet< Expression > | inputs_ |
bool | isrecursive_ |
ObjectSet< TypeSet< int > > | variablenr_ |
ObjectSet< TypeSet< int > > | variableobj_ |
BufferStringSet | varnms_ |
Friends | |
class | ExpressionParser |
Parsed Math expression.
A Expression can be queried about its variables with getNrVariables(), and each variable's name can be queried with getVariableStr( int ).
When a calculations should be done, all variables must be set with setVariable( int, double ). Then, the calculation can be done with getValue().
|
virtual |
|
protected |
|
protected |
|
pure virtual |
|
protected |
|
protected |
|
inline |
|
inlineprotectedvirtual |
int Math::Expression::firstOccurVarName | ( | const char * | ) | const |
|
virtual |
int Math::Expression::getConstIdx | ( | int | varidx | ) | const |
VarType Math::Expression::getType | ( | int | varidx | ) | const |
|
pure virtual |
|
inline |
|
inline |
|
inlineprotected |
int Math::Expression::nrLevels | ( | ) | const |
|
inline |
|
virtual |
|
protected |
|
virtual |
const char* Math::Expression::type | ( | ) | const |
|
inline |
|
friend |
|
protected |
|
protected |
|
protected |
Generated at for the OpendTect seismic interpretation project. Copyright (C): dGB Beheer B.V. 1995-2024