13 #include "generalmod.h" 68 Formula(
bool inputsareseries=
true,
const char* txt=0);
69 Formula(
bool inputsareseries,
const SpecVarSet&,
71 Formula(
const Formula&);
73 Formula& operator =(
const Formula&);
77 void setText(
const char*);
81 bool isOK()
const {
return expr_; }
82 bool isBad()
const {
return !expr_
83 && !text_.isEmpty(); }
86 const char*
text()
const {
return text_; }
89 {
return inps_[iinp].varname_; }
91 {
return inps_[iinp].isConst();}
93 {
return inps_[iinp].isSpec(); }
94 int specIdx(
int)
const;
96 {
return inps_[iinp].shifts_; }
98 {
return inps_[iinp].shftRg(); }
104 void setInputDef(
int,
const char*);
107 { outputunit_ = uom; }
109 void clearInputDefs();
115 {
return inps_[iinp].inpdef_; }
117 {
return inps_[iinp].unit_; }
118 double getConstVal(
int)
const;
123 int nrValues2Provide()
const;
124 void startNewSeries()
const;
125 float getValue(
const float*,
bool internal_units=
true)
const;
126 double getValue(
const double*,
bool internal_units=
true)
const;
137 int nrConsts()
const;
138 const char* userDispText()
const;
139 int nrExternalInputs()
const;
154 : varname_(nm), unit_(0), type_(t) {}
156 {
return varname_ ==
id.varname_; }
165 bool isConst()
const {
return type_ == Const; }
166 bool isSpec()
const {
return type_ == Spec; }
187 int varNameIdx(
const char* varnm)
const;
#define mExpClass(module)
Definition: commondefs.h:157
void usePar(const IOPar &iop, ODPolygon< T > &poly, const char *inpkey)
Definition: polygon.h:200
Definition: uistring.h:88
Set of special variables for Math Formulae/Expressions.
Definition: mathspecvars.h:45
Generalized set of parameters of the keyword-value type.
Definition: iopar.h:53
void fillPar(IOPar &iop, const ODPolygon< T > &poly, const char *inpkey)
Definition: polygon.h:187
Parsed Math expression.
Definition: mathexpression.h:31
OD::String with its own variable length buffer. The buffer has a guaranteed minimum size...
Definition: bufstring.h:38
BufferString errmsg_
Definition: horizontracker.h:117
Unit of Measure.
Definition: unitofmeasure.h:33