casacore
|
Abstract base class for a node in a table column expression tree. More...
#include <ExprNodeRep.h>
Public Types | |
enum | NodeDataType { NTBool , NTInt , NTDouble , NTComplex , NTString , NTRegex , NTDate , NTReal , NTDouCom , NTNumeric , NTAny } |
Define the data types of a node. More... | |
enum | ValueType { VTScalar , VTArray , VTRecord , VTSetElem , VTSet , VTIndex } |
Define the value types. More... | |
enum | OperType { OtPlus , OtMinus , OtTimes , OtDivide , OtModulo , OtBitAnd , OtBitOr , OtBitXor , OtBitNegate , OtEQ , OtGE , OtGT , OtNE , OtIN , OtAND , OtOR , OtNOT , OtMIN , OtColumn , OtField , OtLiteral , OtFunc , OtSlice , OtUndef , OtRownr , OtRandom } |
Define the operator types. More... | |
enum | ArgType { NoArr , ArrArr , ArrSca , ScaArr } |
Define the value types of the 2 arguments when arrays are involved. More... | |
enum | ExprType { Constant , Variable } |
Define (sub-)expression type. More... | |
Public Member Functions | |
TableExprNodeRep (NodeDataType, ValueType, OperType, ArgType, ExprType, Int ndim, const IPosition &shape, const Table &table) | |
Construct a node. More... | |
TableExprNodeRep (NodeDataType, ValueType, OperType, const Table &) | |
This constructor is called from the derived TableExprNodeRep. More... | |
TableExprNodeRep (const TableExprNodeRep &) | |
Copy constructor. More... | |
virtual | ~TableExprNodeRep () |
The destructor deletes all the underlying TableExprNode objects. More... | |
virtual void | disableApplySelection () |
Do not apply the selection. More... | |
virtual void | applySelection (const Vector< rownr_t > &rownrs) |
Re-create the column object for a selection of rows. More... | |
virtual Double | getUnitFactor () const |
Get the unit conversion factor. More... | |
void | checkAggrFuncs () |
Throw an exception if an aggregate function is used in the expression node or its children. More... | |
virtual void | getAggrNodes (std::vector< TableExprNodeRep * > &aggr) |
Get the nodes representing an aggregate function. More... | |
virtual void | getColumnNodes (std::vector< TableExprNodeRep * > &cols) |
Get the nodes representing a table column. More... | |
virtual CountedPtr< TableExprGroupFuncBase > | makeGroupAggrFunc () |
Create the correct immediate aggregate function object. More... | |
virtual Bool | isLazyAggregate () const |
Is the aggregate function a lazy or an immediate one? The default implementation returns True (because all UDF aggregate functions have to be lazy). More... | |
virtual Bool | getBool (const TableExprId &id) |
Get a scalar value for this node in the given row. More... | |
virtual Int64 | getInt (const TableExprId &id) |
virtual Double | getDouble (const TableExprId &id) |
virtual DComplex | getDComplex (const TableExprId &id) |
virtual String | getString (const TableExprId &id) |
virtual TaqlRegex | getRegex (const TableExprId &id) |
virtual MVTime | getDate (const TableExprId &id) |
virtual MArray< Bool > | getArrayBool (const TableExprId &id) |
Get an array value for this node in the given row. More... | |
virtual MArray< Int64 > | getArrayInt (const TableExprId &id) |
virtual MArray< Double > | getArrayDouble (const TableExprId &id) |
virtual MArray< DComplex > | getArrayDComplex (const TableExprId &id) |
virtual MArray< String > | getArrayString (const TableExprId &id) |
virtual MArray< MVTime > | getArrayDate (const TableExprId &id) |
void | get (const TableExprId &id, Bool &value) |
General get functions for template purposes. More... | |
void | get (const TableExprId &id, Int64 &value) |
void | get (const TableExprId &id, Double &value) |
void | get (const TableExprId &id, DComplex &value) |
void | get (const TableExprId &id, MVTime &value) |
void | get (const TableExprId &id, String &value) |
void | get (const TableExprId &id, MArray< Bool > &value) |
void | get (const TableExprId &id, MArray< Int64 > &value) |
void | get (const TableExprId &id, MArray< Double > &value) |
void | get (const TableExprId &id, MArray< DComplex > &value) |
void | get (const TableExprId &id, MArray< MVTime > &value) |
void | get (const TableExprId &id, MArray< String > &value) |
MArray< Bool > | getBoolAS (const TableExprId &id) |
Get a value as an array, even it it is a scalar. More... | |
MArray< Int64 > | getIntAS (const TableExprId &id) |
MArray< Double > | getDoubleAS (const TableExprId &id) |
MArray< DComplex > | getDComplexAS (const TableExprId &id) |
MArray< String > | getStringAS (const TableExprId &id) |
MArray< MVTime > | getDateAS (const TableExprId &id) |
virtual Bool | hasBool (const TableExprId &id, Bool value) |
Does a value occur in an array or set? The default implementation tests if it is in an array. More... | |
virtual Bool | hasInt (const TableExprId &id, Int64 value) |
virtual Bool | hasDouble (const TableExprId &id, Double value) |
virtual Bool | hasDComplex (const TableExprId &id, const DComplex &value) |
virtual Bool | hasString (const TableExprId &id, const String &value) |
virtual Bool | hasDate (const TableExprId &id, const MVTime &value) |
virtual MArray< Bool > | hasArrayBool (const TableExprId &id, const MArray< Bool > &value) |
virtual MArray< Bool > | hasArrayInt (const TableExprId &id, const MArray< Int64 > &value) |
virtual MArray< Bool > | hasArrayDouble (const TableExprId &id, const MArray< Double > &value) |
virtual MArray< Bool > | hasArrayDComplex (const TableExprId &id, const MArray< DComplex > &value) |
virtual MArray< Bool > | hasArrayString (const TableExprId &id, const MArray< String > &value) |
virtual MArray< Bool > | hasArrayDate (const TableExprId &id, const MArray< MVTime > &value) |
rownr_t | nrow () const |
Get the number of rows in the table associated with this expression. More... | |
virtual Bool | getColumnDataType (DataType &) const |
Get the data type of the column. More... | |
virtual Array< Bool > | getColumnBool (const Vector< rownr_t > &rownrs) |
Get the value of the expression evaluated for the entire column. More... | |
virtual Array< uChar > | getColumnuChar (const Vector< rownr_t > &rownrs) |
virtual Array< Short > | getColumnShort (const Vector< rownr_t > &rownrs) |
virtual Array< uShort > | getColumnuShort (const Vector< rownr_t > &rownrs) |
virtual Array< Int > | getColumnInt (const Vector< rownr_t > &rownrs) |
virtual Array< uInt > | getColumnuInt (const Vector< rownr_t > &rownrs) |
virtual Array< Int64 > | getColumnInt64 (const Vector< rownr_t > &rownrs) |
virtual Array< Float > | getColumnFloat (const Vector< rownr_t > &rownrs) |
virtual Array< Double > | getColumnDouble (const Vector< rownr_t > &rownrs) |
virtual Array< Complex > | getColumnComplex (const Vector< rownr_t > &rownrs) |
virtual Array< DComplex > | getColumnDComplex (const Vector< rownr_t > &rownrs) |
virtual Array< String > | getColumnString (const Vector< rownr_t > &rownrs) |
virtual void | ranges (Block< TableExprRange > &) |
Convert the tree to a number of range vectors which at least select the same things. More... | |
NodeDataType | dataType () const |
Get the data type of the derived TableExprNode object. More... | |
Bool | isReal () const |
Is the data type real (i.e., integer or double)? More... | |
ValueType | valueType () const |
Get the value type. More... | |
void | setValueType (ValueType vtype) |
Set the value type. More... | |
OperType | operType () const |
Get the operator type. More... | |
ExprType | exprType () const |
Get the expression type. More... | |
Bool | isConstant () const |
Is the expression a constant? More... | |
const Unit & | unit () const |
Get the unit. More... | |
void | setUnit (const Unit &unit) |
Set the unit. More... | |
const Record & | attributes () const |
Get the attributes. More... | |
void | setAttributes (const Record &) |
Set the attributes. More... | |
Int | ndim () const |
Get the fixed dimensionality (same for all rows). More... | |
const IPosition & | shape () const |
Get the fixed shape (same for all rows). More... | |
const IPosition & | shape (const TableExprId &id) |
Get the shape for the given row. More... | |
virtual Bool | isDefined (const TableExprId &id) |
Is the value in the given row defined? The default implementation returns True. More... | |
virtual void | show (ostream &, uInt indent) const |
Show the expression tree. More... | |
Table & | table () |
Get table. More... | |
const Table & | table () const |
virtual void | adaptSetUnits (const Unit &) |
Let a set node convert itself to the given unit. More... | |
Static Public Member Functions | |
static TENShPtr | replaceConstNode (const TENShPtr &node) |
Replace a node with a constant expression by node with its value. More... | |
static void | createRange (Block< TableExprRange > &, TableExprNodeColumn *, Double start, Double end) |
Create a range object from a column and an interval. More... | |
static void | createRange (Block< TableExprRange > &) |
Create a empty range object. More... | |
static String | typeString (NodeDataType) |
Convert a NodeDataType to a string. More... | |
static String | typeString (ValueType) |
Convert a ValueType to a string. More... | |
Protected Member Functions | |
virtual const IPosition & | getShape (const TableExprId &id) |
Get the shape for the given row. More... | |
virtual void | convertConstChild () |
If one of the children is a constant, convert its data type to that of the other operand (if appropriate). More... | |
void | checkTablePtr (const TENShPtr &node) |
Check if this node uses the same table pointer. More... | |
void | fillExprType (const TENShPtr &node) |
Set expression type to Variable if node is Variable. More... | |
Static Protected Member Functions | |
static void | checkTablePtr (Table &table, const TENShPtr &node) |
static void | fillExprType (ExprType &, const TENShPtr &node) |
static TENShPtr | convertNode (const TENShPtr &thisNode, Bool convertConstType) |
If the node is constant, it is evaluated and replaced by the appropriate TableExprNodeConst object. More... | |
Protected Attributes | |
Table | table_p |
NodeDataType | dtype_p |
ValueType | vtype_p |
OperType | optype_p |
ArgType | argtype_p |
ExprType | exprtype_p |
Int | ndim_p |
IPosition | shape_p |
Unit | unit_p |
Record | attributes_p |
Private Member Functions | |
TableExprNodeRep & | operator= (const TableExprNodeRep &) |
A copy of a TableExprNodeRep cannot be made. More... | |
Abstract base class for a node in a table column expression tree.
Internal
TableExprNodeRep is the (abstract) REPresentation of a node in a table expression tree.
TableExprNodeRep is the base class for all nodes in a table expression tree. It is used by the handle class TableExprNode.
The objects of this class are reference-counted to make it possible that the same object is reused.
TableExprNodeRep and its derivations store a table select expression before actually evaluating it. It is also possible that the classes are used by the table expression parser defined in TableParse and TableGram.
For each operator a special derived class is implemented. Another approach could have been to store the operator as a flag and switch on that. However, that causes extra overhead and the C++ virtual function mechanism is designed for these purposes.
Definition at line 157 of file ExprNodeRep.h.
Define the value types of the 2 arguments when arrays are involved.
Enumerator | |
---|---|
NoArr | |
ArrArr | |
ArrSca | |
ScaArr |
Definition at line 196 of file ExprNodeRep.h.
Define (sub-)expression type.
Definition at line 201 of file ExprNodeRep.h.
Define the data types of a node.
Enumerator | |
---|---|
NTBool | |
NTInt | |
NTDouble | |
NTComplex | |
NTString | |
NTRegex | |
NTDate | |
NTReal | |
NTDouCom | |
NTNumeric | |
NTAny |
Definition at line 161 of file ExprNodeRep.h.
Define the operator types.
LE and LT are handled as GE and GT with swapped operands.
Definition at line 187 of file ExprNodeRep.h.
Define the value types.
Enumerator | |
---|---|
VTScalar | |
VTArray | |
VTRecord | |
VTSetElem | |
VTSet | |
VTIndex |
Definition at line 176 of file ExprNodeRep.h.
casacore::TableExprNodeRep::TableExprNodeRep | ( | NodeDataType | , |
ValueType | , | ||
OperType | , | ||
ArgType | , | ||
ExprType | , | ||
Int | ndim, | ||
const IPosition & | shape, | ||
const Table & | table | ||
) |
Construct a node.
casacore::TableExprNodeRep::TableExprNodeRep | ( | NodeDataType | , |
ValueType | , | ||
OperType | , | ||
const Table & | |||
) |
This constructor is called from the derived TableExprNodeRep.
casacore::TableExprNodeRep::TableExprNodeRep | ( | const TableExprNodeRep & | ) |
Copy constructor.
|
virtual |
The destructor deletes all the underlying TableExprNode objects.
|
virtual |
Let a set node convert itself to the given unit.
The default implementation does nothing.
Reimplemented in casacore::TableExprNodeSet, and casacore::TableExprNodeSetElem.
Re-create the column object for a selection of rows.
The default implementation does nothing.
Reimplemented in casacore::TableExprUDFNodeArray, casacore::TableExprUDFNode, casacore::TableExprNodeArrayColumnString, casacore::TableExprNodeArrayColumnDComplex, casacore::TableExprNodeArrayColumnComplex, casacore::TableExprNodeArrayColumnDouble, casacore::TableExprNodeArrayColumnFloat, casacore::TableExprNodeArrayColumnInt64, casacore::TableExprNodeArrayColumnuInt, casacore::TableExprNodeArrayColumnInt, casacore::TableExprNodeArrayColumnuShort, casacore::TableExprNodeArrayColumnShort, casacore::TableExprNodeArrayColumnuChar, casacore::TableExprNodeArrayColumnBool, casacore::TableExprNodeArrayColumn, casacore::TableExprNodeRowid, and casacore::TableExprNodeColumn.
Referenced by casacore::TableExprNode::applySelection().
|
inline |
Get the attributes.
Definition at line 734 of file ExprNodeRep.h.
References attributes_p.
Referenced by casacore::TableExprNode::attributes(), and setAttributes().
void casacore::TableExprNodeRep::checkAggrFuncs | ( | ) |
Throw an exception if an aggregate function is used in the expression node or its children.
|
inlineprotected |
Check if this node uses the same table pointer.
Fill the Table object if it is still null.
Definition at line 754 of file ExprNodeRep.h.
References table_p.
|
staticprotected |
|
protectedvirtual |
If one of the children is a constant, convert its data type to that of the other operand (if appropriate).
This avoids that conversions are done for each get. The default implementation does nothing.
Reimplemented in casacore::TableExprNodeINInt.
|
staticprotected |
If the node is constant, it is evaluated and replaced by the appropriate TableExprNodeConst object.
If not constant, it calls the virtual ConvertConstChild function which can convert a constant child if appropriate.
|
static |
Create a empty range object.
|
static |
Create a range object from a column and an interval.
|
inline |
Get the data type of the derived TableExprNode object.
This is the data type of the resulting value. E.g. a compare of 2 numeric values results in a Bool, thus the data type of, say, TableExprNodeEQ<T> is always Bool. Function getInternalDT gives the internal data type, thus in the example above the data type of T.
Definition at line 704 of file ExprNodeRep.h.
References dtype_p.
|
virtual |
Do not apply the selection.
Reimplemented in casacore::TableExprUDFNodeArray, casacore::TableExprUDFNode, casacore::TableExprNodeArrayColumn, and casacore::TableExprNodeColumn.
Referenced by casacore::TableExprNode::disableApplySelection().
|
inline |
|
inlineprotected |
Set expression type to Variable if node is Variable.
Definition at line 756 of file ExprNodeRep.h.
References exprtype_p.
|
staticprotected |
|
inline |
General get functions for template purposes.
Definition at line 286 of file ExprNodeRep.h.
References getBool(), and casacore::value().
Referenced by casacore::TableExprGroupAggr::getArray().
|
inline |
Definition at line 292 of file ExprNodeRep.h.
References getDComplex(), and casacore::value().
|
inline |
Definition at line 290 of file ExprNodeRep.h.
References getDouble(), and casacore::value().
|
inline |
Definition at line 288 of file ExprNodeRep.h.
References getInt(), and casacore::value().
|
inline |
Definition at line 298 of file ExprNodeRep.h.
References getArrayBool(), and casacore::value().
|
inline |
Definition at line 304 of file ExprNodeRep.h.
References getArrayDComplex(), and casacore::value().
|
inline |
Definition at line 302 of file ExprNodeRep.h.
References getArrayDouble(), and casacore::value().
|
inline |
Definition at line 300 of file ExprNodeRep.h.
References getArrayInt(), and casacore::value().
|
inline |
Definition at line 306 of file ExprNodeRep.h.
References getArrayDate(), and casacore::value().
|
inline |
Definition at line 308 of file ExprNodeRep.h.
References getArrayString(), and casacore::value().
|
inline |
Definition at line 294 of file ExprNodeRep.h.
References getDate(), and casacore::value().
|
inline |
Definition at line 296 of file ExprNodeRep.h.
References getString(), and casacore::value().
|
virtual |
Get the nodes representing an aggregate function.
Reimplemented in casacore::TableExprUDFNodeArray, casacore::TableExprUDFNode, casacore::TableExprNodeSet, casacore::TableExprNodeSetElem, casacore::TableExprNodeMulti, casacore::TableExprNodeBinary, casacore::TableExprFuncNodeArray, casacore::TableExprAggrNodeArray, and casacore::TableExprAggrNode.
|
virtual |
Get an array value for this node in the given row.
The appropriate functions are implemented in the derived classes and will usually invoke the get in their children and apply the operator on the resulting values.
Reimplemented in casacore::TableExprUDFNodeArray, casacore::TableExprNodeSet, casacore::TableExprNodeRecordFieldArray, casacore::TableExprNodeArrayPart, casacore::TableExprNodeArrayColumnBool, casacore::TableExprNodeArrayNOT, casacore::TableExprNodeArrayAND, casacore::TableExprNodeArrayOR, casacore::TableExprNodeArrayINDate, casacore::TableExprNodeArrayINString, casacore::TableExprNodeArrayINDComplex, casacore::TableExprNodeArrayINDouble, casacore::TableExprNodeArrayINInt, casacore::TableExprNodeArrayGEDate, casacore::TableExprNodeArrayGEString, casacore::TableExprNodeArrayGEDComplex, casacore::TableExprNodeArrayGEDouble, casacore::TableExprNodeArrayGEInt, casacore::TableExprNodeArrayGTDate, casacore::TableExprNodeArrayGTString, casacore::TableExprNodeArrayGTDComplex, casacore::TableExprNodeArrayGTDouble, casacore::TableExprNodeArrayGTInt, casacore::TableExprNodeArrayNEDate, casacore::TableExprNodeArrayNERegex, casacore::TableExprNodeArrayNEString, casacore::TableExprNodeArrayNEDComplex, casacore::TableExprNodeArrayNEDouble, casacore::TableExprNodeArrayNEInt, casacore::TableExprNodeArrayNEBool, casacore::TableExprNodeArrayEQDate, casacore::TableExprNodeArrayEQRegex, casacore::TableExprNodeArrayEQString, casacore::TableExprNodeArrayEQDComplex, casacore::TableExprNodeArrayEQDouble, casacore::TableExprNodeArrayEQInt, casacore::TableExprNodeArrayEQBool, casacore::TableExprFuncNodeArray, casacore::TableExprNodeArrayConstBool, casacore::TableExprConeNodeArray, and casacore::TableExprAggrNodeArray.
Referenced by get(), casacore::TableExprNode::get(), casacore::TableExprNodeSet::getArray(), and casacore::TableExprNode::getArrayBool().
|
virtual |
Reimplemented in casacore::TableExprUDFNodeArray, casacore::TableExprNodeSet, casacore::TableExprNodeArrayPart, casacore::TableExprNodeArrayMinusDate, casacore::TableExprNodeArrayPlusDate, casacore::TableExprFuncNodeArray, casacore::TableExprNodeArrayConstDate, and casacore::TableExprAggrNodeArray.
Referenced by get(), casacore::TableExprNode::get(), casacore::TableExprNodeSet::getArray(), and casacore::TableExprNode::getArrayDate().
|
virtual |
Reimplemented in casacore::TableExprNodeArrayUnit, casacore::TableExprUDFNodeArray, casacore::TableExprNodeSet, casacore::TableExprNodeRecordFieldArray, casacore::TableExprNodeArrayPart, casacore::TableExprNodeArrayColumnDComplex, casacore::TableExprNodeArrayColumnComplex, casacore::TableExprNodeArray, casacore::TableExprNodeArrayMIN, casacore::TableExprNodeArrayDivideDComplex, casacore::TableExprNodeArrayTimesDComplex, casacore::TableExprNodeArrayMinusDComplex, casacore::TableExprNodeArrayPlusDComplex, casacore::TableExprFuncNodeArray, casacore::TableExprNodeArrayConstDComplex, casacore::TableExprNodeArrayConstDouble, casacore::TableExprNodeArrayConstInt, and casacore::TableExprAggrNodeArray.
Referenced by get(), casacore::TableExprNode::get(), casacore::TableExprNodeSet::getArray(), and casacore::TableExprNode::getArrayDComplex().
|
virtual |
Reimplemented in casacore::TableExprNodeArrayUnit, casacore::TableExprUDFNodeArray, casacore::TableExprNodeSet, casacore::TableExprNodeRecordFieldArray, casacore::TableExprNodeArrayPart, casacore::TableExprNodeArrayColumnDouble, casacore::TableExprNodeArrayColumnFloat, casacore::TableExprNodeArray, casacore::TableExprNodeArrayMIN, casacore::TableExprNodeArrayModuloDouble, casacore::TableExprNodeArrayDivideDouble, casacore::TableExprNodeArrayTimesDouble, casacore::TableExprNodeArrayMinusDate, casacore::TableExprNodeArrayMinusDouble, casacore::TableExprNodeArrayPlusDate, casacore::TableExprNodeArrayPlusDouble, casacore::TableExprFuncNodeArray, casacore::TableExprNodeArrayConstDate, casacore::TableExprNodeArrayConstDouble, casacore::TableExprNodeArrayConstInt, and casacore::TableExprAggrNodeArray.
Referenced by get(), casacore::TableExprNode::get(), casacore::TableExprNodeSet::getArray(), and casacore::TableExprNode::getArrayDouble().
|
virtual |
Reimplemented in casacore::TableExprUDFNodeArray, casacore::TableExprNodeSet, casacore::TableExprNodeRecordFieldArray, casacore::TableExprNodeArrayPart, casacore::TableExprNodeArrayColumnInt64, casacore::TableExprNodeArrayColumnuInt, casacore::TableExprNodeArrayColumnInt, casacore::TableExprNodeArrayColumnuShort, casacore::TableExprNodeArrayColumnShort, casacore::TableExprNodeArrayColumnuChar, casacore::TableExprNodeArrayBitNegate, casacore::TableExprNodeArrayMIN, casacore::TableExprNodeArrayBitXorInt, casacore::TableExprNodeArrayBitOrInt, casacore::TableExprNodeArrayBitAndInt, casacore::TableExprNodeArrayModuloInt, casacore::TableExprNodeArrayTimesInt, casacore::TableExprNodeArrayMinusInt, casacore::TableExprNodeArrayPlusInt, casacore::TableExprFuncNodeArray, casacore::TableExprNodeArrayConstInt, casacore::TableExprConeNodeArray, and casacore::TableExprAggrNodeArray.
Referenced by get(), casacore::TableExprNode::get(), casacore::TableExprNodeSet::getArray(), and casacore::TableExprNode::getArrayInt().
|
virtual |
Reimplemented in casacore::TableExprUDFNodeArray, casacore::TableExprNodeSet, casacore::TableExprNodeRecordFieldArray, casacore::TableExprNodeArrayPart, casacore::TableExprNodeArrayColumnString, casacore::TableExprNodeArrayPlusString, casacore::TableExprFuncNodeArray, casacore::TableExprNodeArrayConstString, and casacore::TableExprAggrNodeArray.
Referenced by get(), casacore::TableExprNode::get(), casacore::TableExprNodeSet::getArray(), and casacore::TableExprNode::getArrayString().
|
virtual |
Get a scalar value for this node in the given row.
The appropriate functions are implemented in the derived classes and will usually invoke the get in their children and apply the operator on the resulting values.
Reimplemented in casacore::TableExprUDFNode, casacore::TableExprNodeRecordField, casacore::TableExprNodeArrayPart, casacore::TableExprNodeNOT, casacore::TableExprNodeAND, casacore::TableExprNodeOR, casacore::TableExprNodeINDate, casacore::TableExprNodeINString, casacore::TableExprNodeINDComplex, casacore::TableExprNodeINDouble, casacore::TableExprNodeINInt, casacore::TableExprNodeGEDate, casacore::TableExprNodeGEString, casacore::TableExprNodeGEDComplex, casacore::TableExprNodeGEDouble, casacore::TableExprNodeGEInt, casacore::TableExprNodeGTDate, casacore::TableExprNodeGTString, casacore::TableExprNodeGTDComplex, casacore::TableExprNodeGTDouble, casacore::TableExprNodeGTInt, casacore::TableExprNodeNEDate, casacore::TableExprNodeNERegex, casacore::TableExprNodeNEString, casacore::TableExprNodeNEDComplex, casacore::TableExprNodeNEDouble, casacore::TableExprNodeNEInt, casacore::TableExprNodeNEBool, casacore::TableExprNodeEQDate, casacore::TableExprNodeEQRegex, casacore::TableExprNodeEQString, casacore::TableExprNodeEQDComplex, casacore::TableExprNodeEQDouble, casacore::TableExprNodeEQInt, casacore::TableExprNodeEQBool, casacore::TableExprFuncNode, casacore::TableExprNodeColumn, casacore::TableExprNodeConstBool, casacore::TableExprConeNode, and casacore::TableExprAggrNode.
Referenced by get(), casacore::TableExprNode::get(), and casacore::TableExprNode::getBool().
MArray<Bool> casacore::TableExprNodeRep::getBoolAS | ( | const TableExprId & | id | ) |
Get a value as an array, even it it is a scalar.
This is useful if one could give an argument as scalar or array.
Referenced by casacore::TableExprNode::getBoolAS().
|
virtual |
Get the value of the expression evaluated for the entire column.
The data of function called should match the data type as returned by function getColumnDataType
.
Reimplemented in casacore::TableExprNodeArrayPart, and casacore::TableExprNodeColumn.
Referenced by casacore::TableExprNode::getColumnBool().
|
virtual |
Reimplemented in casacore::TableExprNodeArrayPart, and casacore::TableExprNodeColumn.
Referenced by casacore::TableExprNode::getColumnComplex().
|
virtual |
Get the data type of the column.
It returns True when it could set the data type (which it can if the expression is a scalar column or a constant array column pixel). Otherwise it returns False.
Reimplemented in casacore::TableExprNodeArrayPart, casacore::TableExprNodeArrayColumn, and casacore::TableExprNodeColumn.
|
virtual |
Reimplemented in casacore::TableExprNodeArrayPart, and casacore::TableExprNodeColumn.
Referenced by casacore::TableExprNode::getColumnDComplex().
|
virtual |
Reimplemented in casacore::TableExprNodeArrayPart, and casacore::TableExprNodeColumn.
Referenced by casacore::TableExprNode::getColumnDouble().
|
virtual |
Reimplemented in casacore::TableExprNodeArrayPart, and casacore::TableExprNodeColumn.
Referenced by casacore::TableExprNode::getColumnFloat().
|
virtual |
Reimplemented in casacore::TableExprNodeArrayPart, and casacore::TableExprNodeColumn.
Referenced by casacore::TableExprNode::getColumnInt().
|
virtual |
Reimplemented in casacore::TableExprNodeArrayPart, and casacore::TableExprNodeColumn.
Referenced by casacore::TableExprNode::getColumnInt64().
|
virtual |
Get the nodes representing a table column.
Reimplemented in casacore::TableExprUDFNodeArray, casacore::TableExprUDFNode, casacore::TableExprNodeSet, casacore::TableExprNodeSetElem, casacore::TableExprNodeMulti, casacore::TableExprNodeBinary, casacore::TableExprNodeArrayColumn, casacore::TableExprFuncNodeArray, and casacore::TableExprNodeColumn.
|
virtual |
Reimplemented in casacore::TableExprNodeArrayPart, and casacore::TableExprNodeColumn.
Referenced by casacore::TableExprNode::getColumnShort().
|
virtual |
Reimplemented in casacore::TableExprNodeArrayPart, and casacore::TableExprNodeColumn.
Referenced by casacore::TableExprNode::getColumnString().
|
virtual |
Reimplemented in casacore::TableExprNodeArrayPart, and casacore::TableExprNodeColumn.
Referenced by casacore::TableExprNode::getColumnuChar().
|
virtual |
Reimplemented in casacore::TableExprNodeArrayPart, and casacore::TableExprNodeColumn.
Referenced by casacore::TableExprNode::getColumnuInt().
|
virtual |
Reimplemented in casacore::TableExprNodeArrayPart, and casacore::TableExprNodeColumn.
Referenced by casacore::TableExprNode::getColumnuShort().
|
virtual |
Reimplemented in casacore::TableExprUDFNode, casacore::TableExprNodeArrayPart, casacore::TableExprNodeMinusDate, casacore::TableExprNodePlusDate, casacore::TableExprFuncNode, casacore::TableExprNodeConstDate, and casacore::TableExprAggrNode.
Referenced by get(), casacore::TableExprNode::get(), and casacore::TableExprNode::getDate().
MArray<MVTime> casacore::TableExprNodeRep::getDateAS | ( | const TableExprId & | id | ) |
Referenced by casacore::TableExprNode::getDateAS().
|
virtual |
Reimplemented in casacore::TableExprNodeUnit, casacore::TableExprUDFNode, casacore::TableExprNodeRecordField, casacore::TableExprNodeArrayPart, casacore::TableExprNodeBitNegate, casacore::TableExprNodeMIN, casacore::TableExprNodeBitXorInt, casacore::TableExprNodeBitOrInt, casacore::TableExprNodeBitAndInt, casacore::TableExprNodeModuloDouble, casacore::TableExprNodeModuloInt, casacore::TableExprNodeDivideDComplex, casacore::TableExprNodeDivideDouble, casacore::TableExprNodeTimesDComplex, casacore::TableExprNodeTimesDouble, casacore::TableExprNodeTimesInt, casacore::TableExprNodeMinusDComplex, casacore::TableExprNodeMinusDouble, casacore::TableExprNodeMinusInt, casacore::TableExprNodePlusDComplex, casacore::TableExprNodePlusDouble, casacore::TableExprNodePlusInt, casacore::TableExprFuncNode, casacore::TableExprNodeColumn, casacore::TableExprNodeConstDComplex, casacore::TableExprNodeConstDouble, casacore::TableExprNodeConstInt, and casacore::TableExprAggrNode.
Referenced by get(), casacore::TableExprNode::get(), and casacore::TableExprNode::getDComplex().
MArray<DComplex> casacore::TableExprNodeRep::getDComplexAS | ( | const TableExprId & | id | ) |
Referenced by casacore::TableExprNode::getDComplexAS().
|
virtual |
Reimplemented in casacore::TableExprNodeUnit, casacore::TableExprUDFNode, casacore::TableExprNodeRecordField, casacore::TableExprNodeArrayPart, casacore::TableExprNodeBitNegate, casacore::TableExprNodeMIN, casacore::TableExprNodeBitXorInt, casacore::TableExprNodeBitOrInt, casacore::TableExprNodeBitAndInt, casacore::TableExprNodeModuloDouble, casacore::TableExprNodeModuloInt, casacore::TableExprNodeDivideDouble, casacore::TableExprNodeTimesDouble, casacore::TableExprNodeTimesInt, casacore::TableExprNodeMinusDate, casacore::TableExprNodeMinusDouble, casacore::TableExprNodeMinusInt, casacore::TableExprNodePlusDate, casacore::TableExprNodePlusDouble, casacore::TableExprNodePlusInt, casacore::TableExprFuncNode, casacore::TableExprNodeRandom, casacore::TableExprNodeColumn, casacore::TableExprNodeConstDate, casacore::TableExprNodeConstDouble, casacore::TableExprNodeConstInt, and casacore::TableExprAggrNode.
Referenced by get(), casacore::TableExprNode::get(), and casacore::TableExprNode::getDouble().
MArray<Double> casacore::TableExprNodeRep::getDoubleAS | ( | const TableExprId & | id | ) |
Referenced by casacore::TableExprNode::getDoubleAS().
|
virtual |
Reimplemented in casacore::TableExprUDFNode, casacore::TableExprNodeRecordField, casacore::TableExprNodeArrayPart, casacore::TableExprNodeBitNegate, casacore::TableExprNodeMIN, casacore::TableExprNodeBitXorInt, casacore::TableExprNodeBitOrInt, casacore::TableExprNodeBitAndInt, casacore::TableExprNodeModuloInt, casacore::TableExprNodeTimesInt, casacore::TableExprNodeMinusInt, casacore::TableExprNodePlusInt, casacore::TableExprFuncNode, casacore::TableExprNodeRowid, casacore::TableExprNodeRownr, casacore::TableExprNodeColumn, casacore::TableExprNodeConstInt, casacore::TableExprConeNode, and casacore::TableExprAggrNode.
Referenced by get(), casacore::TableExprNode::get(), and casacore::TableExprNode::getInt().
MArray<Int64> casacore::TableExprNodeRep::getIntAS | ( | const TableExprId & | id | ) |
Referenced by casacore::TableExprNode::getIntAS().
|
virtual |
Reimplemented in casacore::TableExprUDFNode, casacore::TableExprFuncNode, and casacore::TableExprNodeConstRegex.
Referenced by casacore::TableExprNode::get().
|
protectedvirtual |
Get the shape for the given row.
Reimplemented in casacore::TableExprNodeRecordFieldArray, casacore::TableExprNodeRecordField, casacore::TableExprNodeArrayColumn, and casacore::TableExprNodeArray.
|
virtual |
Reimplemented in casacore::TableExprUDFNode, casacore::TableExprNodeRecordField, casacore::TableExprNodeArrayPart, casacore::TableExprNodePlusString, casacore::TableExprFuncNode, casacore::TableExprNodeColumn, casacore::TableExprNodeConstString, and casacore::TableExprAggrNode.
Referenced by get(), casacore::TableExprNode::get(), and casacore::TableExprNode::getString().
MArray<String> casacore::TableExprNodeRep::getStringAS | ( | const TableExprId & | id | ) |
Referenced by casacore::TableExprNode::getStringAS().
|
virtual |
Get the unit conversion factor.
Default 1 is returned.
Reimplemented in casacore::TableExprNodeArrayUnit, and casacore::TableExprNodeUnit.
|
virtual |
Reimplemented in casacore::TableExprNodeSet, and casacore::TableExprNodeArray.
|
virtual |
Reimplemented in casacore::TableExprNodeSet, and casacore::TableExprNodeArray.
|
virtual |
Reimplemented in casacore::TableExprNodeSet, and casacore::TableExprNodeArray.
|
virtual |
Reimplemented in casacore::TableExprNodeSet, and casacore::TableExprNodeArray.
|
virtual |
Reimplemented in casacore::TableExprNodeSet, and casacore::TableExprNodeArray.
|
virtual |
Reimplemented in casacore::TableExprNodeSet, and casacore::TableExprNodeArray.
|
virtual |
Does a value occur in an array or set? The default implementation tests if it is in an array.
Reimplemented in casacore::TableExprNodeSet, and casacore::TableExprNodeArray.
|
virtual |
Reimplemented in casacore::TableExprNodeSet, and casacore::TableExprNodeArray.
|
virtual |
Reimplemented in casacore::TableExprNodeSet, and casacore::TableExprNodeArray.
|
virtual |
Reimplemented in casacore::TableExprNodeSet, and casacore::TableExprNodeArray.
|
virtual |
Reimplemented in casacore::TableExprNodeSet, and casacore::TableExprNodeArray.
|
virtual |
Reimplemented in casacore::TableExprNodeSet, and casacore::TableExprNodeArray.
|
inline |
Is the expression a constant?
Definition at line 727 of file ExprNodeRep.h.
References Constant, and exprtype_p.
Referenced by casacore::TableExprNodeIndex::getSlicer().
|
virtual |
Is the value in the given row defined? The default implementation returns True.
Reimplemented in casacore::TableExprNodeRecordFieldArray, casacore::TableExprNodeRecordField, and casacore::TableExprNodeArrayColumn.
|
virtual |
Is the aggregate function a lazy or an immediate one? The default implementation returns True (because all UDF aggregate functions have to be lazy).
Reimplemented in casacore::TableExprAggrNodeArray, and casacore::TableExprAggrNode.
|
inline |
Is the data type real (i.e., integer or double)?
Definition at line 707 of file ExprNodeRep.h.
|
virtual |
Create the correct immediate aggregate function object.
The default implementation throws an exception, because it should only be called for TableExprAggrNode(Array).
Reimplemented in casacore::TableExprUDFNodeArray, casacore::TableExprUDFNode, casacore::TableExprAggrNodeArray, and casacore::TableExprAggrNode.
|
inline |
Get the fixed dimensionality (same for all rows).
Definition at line 741 of file ExprNodeRep.h.
References ndim_p.
rownr_t casacore::TableExprNodeRep::nrow | ( | ) | const |
Get the number of rows in the table associated with this expression.
One is returned if the expression is a constant. Zero is returned if no table is associated with it.
Referenced by casacore::TableExprNode::nrow().
|
private |
A copy of a TableExprNodeRep cannot be made.
|
inline |
|
virtual |
Convert the tree to a number of range vectors which at least select the same things.
This function is very useful to convert the expression to some intervals covering the select expression. This can be used to do a rough fast selection via an index and do the the slower final selection on that much smaller subset. The function can only convert direct comparisons of columns with constants (via ==, !=, >, >=, < or <=) and their combinations using && or ||.
Reimplemented in casacore::TableExprNodeAND, casacore::TableExprNodeOR, casacore::TableExprNodeGEDouble, casacore::TableExprNodeGTDouble, and casacore::TableExprNodeEQDouble.
Referenced by casacore::TableExprNode::ranges().
Replace a node with a constant expression by node with its value.
|
inline |
Set the attributes.
Definition at line 737 of file ExprNodeRep.h.
References attributes(), and attributes_p.
void casacore::TableExprNodeRep::setUnit | ( | const Unit & | unit | ) |
Set the unit.
It also sets the datatype to NTDouble if it is NTInt.
|
inline |
|
inline |
Get the fixed shape (same for all rows).
Definition at line 745 of file ExprNodeRep.h.
References shape_p.
const IPosition& casacore::TableExprNodeRep::shape | ( | const TableExprId & | id | ) |
Get the shape for the given row.
It returns the fixed shape if defined, otherwise getShape(id).
|
virtual |
Show the expression tree.
Reimplemented in casacore::TableExprNodeSet, casacore::TableExprNodeSetElem, casacore::TableExprNodeArrayPart, casacore::TableExprNodeMulti, and casacore::TableExprNodeBinary.
Referenced by casacore::TableExprNode::show().
|
inline |
Get table.
This gets the Table object to which a TableExprNode belongs. A TableExprNode belongs to the Table to which the first column used in an expression belongs.
Definition at line 749 of file ExprNodeRep.h.
References table_p.
Referenced by casacore::TableExprNode::table().
|
inline |
Definition at line 751 of file ExprNodeRep.h.
References table_p.
|
static |
Convert a NodeDataType to a string.
Convert a ValueType to a string.
|
inline |
Get the unit.
Definition at line 731 of file ExprNodeRep.h.
References unit_p.
Referenced by casacore::TableExprNode::unit().
|
inline |
Get the value type.
Definition at line 711 of file ExprNodeRep.h.
References vtype_p.
Referenced by casacore::TableExprGroupAggr::getArray(), and casacore::TableExprNode::isScalar().
|
protected |
Definition at line 475 of file ExprNodeRep.h.
|
protected |
Definition at line 481 of file ExprNodeRep.h.
Referenced by attributes(), and setAttributes().
|
protected |
Definition at line 472 of file ExprNodeRep.h.
Referenced by dataType(), and isReal().
|
protected |
Definition at line 476 of file ExprNodeRep.h.
Referenced by exprType(), fillExprType(), and isConstant().
|
protected |
Definition at line 477 of file ExprNodeRep.h.
Referenced by ndim().
|
protected |
Definition at line 474 of file ExprNodeRep.h.
Referenced by operType().
|
protected |
Definition at line 479 of file ExprNodeRep.h.
Referenced by shape().
|
protected |
Definition at line 471 of file ExprNodeRep.h.
Referenced by checkTablePtr(), and table().
|
protected |
Definition at line 480 of file ExprNodeRep.h.
Referenced by unit().
|
protected |
Definition at line 473 of file ExprNodeRep.h.
Referenced by setValueType(), and valueType().