29 #ifndef SCIMATH_FUNCEXPRESSION_H 30 #define SCIMATH_FUNCEXPRESSION_H 33 #include <casacore/casa/aips.h> 34 #include <casacore/casa/BasicSL/String.h> 35 #include <casacore/scimath/Functionals/FuncExprData.h> 36 #include <casacore/casa/stdvector.h> 39 #include <casacore/casa/iosfwd.h> 43 template <
class T>
class Vector;
107 const vector<FuncExprData::ExprOperator> &
getCode()
const;
119 void print(ostream &os)
const;
128 vector<FuncExprData::ExprOperator>
code_p;
130 vector<FuncExprData::ExprOperator>
rps_p;
FuncExpression & operator=(const FuncExpression &other)
Make this object a (deep) copy of other.
A 1-D Specialization of the Array class.
Bool compTerm(MUString &prg)
Compile a term (in prg, which will be adjusted)
vector< Double > exec_p
Executing stack.
void initState()
Initialise the state.
const vector< FuncExprData::ExprOperator > & getCode() const
Get the executable program.
ostream & operator<<(ostream &os, const IComplex &)
Show on ostream.
Pointed String class to aid analysis of quantity strings.
void print(ostream &os) const
Print the stack information (mainly for debugging)
const vector< FuncExprData::ExprOperator > & getCode()
Get reference to the compiled program.
String error_p
The latest error message.
Bool exec(Double &res) const
Execute the program.
FuncExprData::ExprCompState state_p
The current state of the compilation.
The operator description: code; priority; # of arguments; # of arguments used up (or produced for fun...
vector< Double > const_p
The current constant stack.
Bool compStmt(MUString &prg)
Compile a statement (in prg, which will be adjusted)
bool Bool
Define the standard types used by Casacore.
Bool setCode(const FuncExprData::ExprOperator &oper)
Save an executable code.
Bool create(const String &prog)
Create an executable program.
const vector< Double > & getConst()
Get reference to compiled constants.
FuncExprData exd
The expression data /// later into a singleton.
uInt getNpar() const
Get the number of parameters in executable program.
An expression executable as function.
vector< FuncExprData::ExprOperator > rps_p
The reverse Polish work stack (a vector, since deque did not work on gcc)
uInt npar_p
The number of parameters in code.
Bool compExpr(MUString &prg)
Compile an expression (in prg, which will be adjusted)
String: the storage and methods of handling collections of characters.
const String & errorMessage()
Get the current error message.
FuncExpression()
Construct an empty executable expression.
vector< FuncExprData::ExprOperator > code_p
The executable code stack (a vector, since it is a re-usable stack)
Bool setOp(FuncExprData::ExprOperator &oper)
Save an operation on compilation RP stack.
~FuncExpression()
Destructor.
uInt ndim_p
The number of dimensions of expression.
this file contains all the compiler specific defines
uInt getNdim() const
Get the number of dimensions of executable program.
The compilation state descriptor.
Bool setVal(const Double &val)
Save a value on constant stack.
Data and enumerations for functional expressions.