28 #ifndef TABLES_EXPRUNITNODE_H
29 #define TABLES_EXPRUNITNODE_H
32 #include <casacore/casa/aips.h>
33 #include <casacore/tables/TaQL/ExprNodeRep.h>
34 #include <casacore/tables/TaQL/ExprNodeArray.h>
Unit for array values in a table select expression tree.
virtual MArray< DComplex > getArrayDComplex(const TableExprId &id)
The default implementation of getArrayDComplex does getArrayDouble and converts the result.
virtual Double getUnitFactor() const
Get the unit conversion factor.
~TableExprNodeArrayUnit()
virtual MArray< Double > getArrayDouble(const TableExprId &id)
The default implementation of getArrayDouble does getArrayInt and converts the result.
TableExprNodeArrayUnit(const TENShPtr &child, const Unit &unit)
Abstract base class for a node having 0, 1, or 2 child nodes.
Abstract base class for a node in a table column expression tree.
const Unit & unit() const
Get the unit.
virtual Double getUnitFactor() const
Get the unit factor.
static TENShPtr useUnit(const TENShPtr &node, const Unit &unit)
Create a new node if unit conversion is needed.
static void adaptUnit(TENShPtr &node, const Unit &unit)
Use useUnit to see if a conversion is needed.
virtual Double getDouble(const TableExprId &id)
static Unit adaptUnits(TENShPtr &node1, TENShPtr &node2, TENShPtr &node3)
Find the unit to be used and adapt the nodes to it.
virtual DComplex getDComplex(const TableExprId &id)
static Double set(TableExprNodeRep &parent, const TENShPtr &child, const Unit &unit)
Calculate the conversion factor and return it.
TableExprNodeUnit(const TENShPtr &child, const Unit &unit)
Construct from the given child node and unit.
std::complex< Double > DComplex
this file contains all the compiler specific defines