15 #include "generalmod.h" 69 Formula(
bool inputsareseries=
true,
const char* txt=0);
70 Formula(
bool inputsareseries,
const SpecVarSet&,
72 Formula(
const Formula&);
74 Formula& operator =(
const Formula&);
78 void setText(
const char*);
82 bool isOK()
const {
return expr_; }
83 bool isBad()
const {
return !expr_
84 && !text_.isEmpty(); }
87 const char*
text()
const {
return text_; }
90 {
return inps_[iinp].varname_; }
92 {
return inps_[iinp].isConst();}
94 {
return inps_[iinp].isSpec(); }
95 int specIdx(
int)
const;
97 {
return inps_[iinp].shifts_; }
99 {
return inps_[iinp].shftRg(); }
105 void setInputDef(
int,
const char*);
108 { outputunit_ = uom; }
110 void clearInputDefs();
116 {
return inps_[iinp].inpdef_; }
118 {
return inps_[iinp].unit_; }
119 double getConstVal(
int)
const;
124 int nrValues2Provide()
const;
125 void startNewSeries()
const;
126 float getValue(
const float*,
bool internal_units=
true)
const;
127 double getValue(
const double*,
bool internal_units=
true)
const;
138 int nrConsts()
const;
139 const char* userDispText()
const;
140 int nrExternalInputs()
const;
155 : varname_(nm), unit_(0), type_(t) {}
157 {
return varname_ ==
id.varname_; }
166 bool isConst()
const {
return type_ == Const; }
167 bool isSpec()
const {
return type_ == Spec; }
188 int varNameIdx(
const char* varnm)
const;
#define mExpClass(module)
Definition: commondefs.h:160
void usePar(const IOPar &iop, ODPolygon< T > &poly, const char *inpkey)
Definition: polygon.h:188
Set of special variables for Math Formulae/Expressions.
Definition: mathspecvars.h:47
Generalized set of parameters of the keyword-value type.
Definition: iopar.h:47
void fillPar(IOPar &iop, const ODPolygon< T > &poly, const char *inpkey)
Definition: polygon.h:175
Parsed Math expression.
Definition: mathexpression.h:32
OD::String with its own variable length buffer. The buffer has a guaranteed minimum size...
Definition: bufstring.h:40
BufferString errmsg_
Definition: horizontracker.h:119
Unit of Measure.
Definition: unitofmeasure.h:35