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. | |
TableExprNodeRep (NodeDataType, ValueType, OperType, const Table &) | |
This constructor is called from the derived TableExprNodeRep. | |
TableExprNodeRep (const TableExprNodeRep &) | |
Copy constructor. | |
virtual | ~TableExprNodeRep () |
The destructor deletes all the underlying TableExprNode objects. | |
TableExprNodeRep * | link () |
Link to this object, i.e. | |
virtual void | disableApplySelection () |
Do not apply the selection. | |
virtual void | applySelection (const Vector< uInt > &rownrs) |
Re-create the column object for a selection of rows. | |
virtual Double | getUnitFactor () const |
Get the unit conversion factor. | |
virtual void | getAggrNodes (vector< TableExprNodeRep * > &aggr) |
Get the nodes representing an aggregate function. | |
virtual void | getColumnNodes (vector< TableExprNodeRep * > &cols) |
Get the nodes representing a table column. | |
virtual CountedPtr < TableExprGroupFuncBase > | makeGroupAggrFunc () |
Create the correct immediate aggregate function object. | |
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). | |
virtual Bool | getBool (const TableExprId &id) |
Get a scalar value for this node in the given row. | |
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. | |
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. | |
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. | |
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. | |
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) |
uInt | nrow () const |
Get the number of rows in the table associated with this expression. | |
virtual Bool | getColumnDataType (DataType &) const |
Get the data type of the column. | |
virtual Array< Bool > | getColumnBool (const Vector< uInt > &rownrs) |
Get the value of the expression evaluated for the entire column. | |
virtual Array< uChar > | getColumnuChar (const Vector< uInt > &rownrs) |
virtual Array< Short > | getColumnShort (const Vector< uInt > &rownrs) |
virtual Array< uShort > | getColumnuShort (const Vector< uInt > &rownrs) |
virtual Array< Int > | getColumnInt (const Vector< uInt > &rownrs) |
virtual Array< uInt > | getColumnuInt (const Vector< uInt > &rownrs) |
virtual Array< Float > | getColumnFloat (const Vector< uInt > &rownrs) |
virtual Array< Double > | getColumnDouble (const Vector< uInt > &rownrs) |
virtual Array< Complex > | getColumnComplex (const Vector< uInt > &rownrs) |
virtual Array< DComplex > | getColumnDComplex (const Vector< uInt > &rownrs) |
virtual Array< String > | getColumnString (const Vector< uInt > &rownrs) |
virtual void | ranges (Block< TableExprRange > &) |
Convert the tree to a number of range vectors which at least select the same things. | |
NodeDataType | dataType () const |
Get the data type of the derived TableExprNode object. | |
Bool | isReal () const |
Is the data type real (i.e., integer or double)? | |
ValueType | valueType () const |
Get the value type. | |
void | setValueType (ValueType vtype) |
Set the value type. | |
OperType | operType () const |
Get the operator type. | |
ExprType | exprType () const |
Get the expression type. | |
Bool | isConstant () const |
Is the expression a constant? | |
const Unit & | unit () const |
Get the unit. | |
void | setUnit (const Unit &unit) |
Set the unit. | |
Int | ndim () const |
Get the fixed dimensionality (same for all rows). | |
const IPosition & | shape () const |
Get the fixed shape (same for all rows). | |
const IPosition & | shape (const TableExprId &id) |
Get the shape for the given row. | |
virtual Bool | isDefined (const TableExprId &id) |
Is the value in the given row defined? The default implementation returns True. | |
virtual void | show (ostream &, uInt indent) const |
Show the expression tree. | |
Table & | table () |
Get table. | |
const Table & | table () const |
virtual void | adaptSetUnits (const Unit &) |
Let a set node convert itself to the given unit. | |
Static Public Member Functions | |
static void | unlink (TableExprNodeRep *) |
Unlink from the given object. | |
static void | checkAggrFuncs (const TableExprNodeRep *node) |
Throw an exception if an aggregate function is used in the expression node. | |
static void | createRange (Block< TableExprRange > &, TableExprNodeColumn *, Double start, Double end) |
Create a range object from a column and an interval. | |
static void | createRange (Block< TableExprRange > &) |
Create a empty range object. | |
static String | typeString (NodeDataType) |
Convert a NodeDataType to a string. | |
static String | typeString (ValueType) |
Convert a ValueType to a string. | |
Protected Member Functions | |
virtual const IPosition & | getShape (const TableExprId &id) |
Get the shape for the given row. | |
virtual void | convertConstChild () |
When one of the children is a constant, convert its data type to that of the other operand. | |
void | checkTablePtr (const TableExprNodeRep *node) |
Check if this node uses the same table pointer. | |
void | fillExprType (const TableExprNodeRep *node) |
Set expression type to Variable if node is Variable. | |
Static Protected Member Functions | |
static TableExprNodeRep * | getRep (TableExprNode &) |
Get pointer to REPresentation object. | |
static void | checkTablePtr (Table &table, const TableExprNodeRep *node) |
static void | fillExprType (ExprType &, const TableExprNodeRep *node) |
static TableExprNodeRep * | convertNode (TableExprNodeRep *thisNode, Bool convertConstType) |
When the node is constant, it is evaluated and replaced by the appropriate TableExprNodeConst object. | |
Protected Attributes | |
uInt | count_p |
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 |
Private Member Functions | |
TableExprNodeRep & | operator= (const TableExprNodeRep &) |
A copy of a TableExprNodeRep cannot be made. |
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 151 of file ExprNodeRep.h.
Define the value types of the 2 arguments when arrays are involved.
Definition at line 190 of file ExprNodeRep.h.
Define (sub-)expression type.
Definition at line 195 of file ExprNodeRep.h.
Define the data types of a node.
Definition at line 155 of file ExprNodeRep.h.
Define the operator types.
LE and LT are handled as GE and GT with swapped operands.
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 |
Definition at line 181 of file ExprNodeRep.h.
Define the value types.
Definition at line 170 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 casacore::TableExprNodeRep::~TableExprNodeRep | ( | ) | [virtual] |
The destructor deletes all the underlying TableExprNode objects.
virtual void casacore::TableExprNodeRep::adaptSetUnits | ( | const Unit & | ) | [virtual] |
Let a set node convert itself to the given unit.
The default implementation does nothing.
Reimplemented in casacore::TableExprNodeSetElem, and casacore::TableExprNodeSet.
Re-create the column object for a selection of rows.
The default implementation does nothing.
Reimplemented in casacore::TableExprNodeColumn, casacore::TableExprNodeRowid, casacore::TableExprNodeArrayColumn, casacore::TableExprNodeArrayColumnBool, casacore::TableExprNodeArrayColumnuChar, casacore::TableExprNodeArrayColumnShort, casacore::TableExprNodeArrayColumnuShort, casacore::TableExprNodeArrayColumnInt, casacore::TableExprNodeArrayColumnuInt, casacore::TableExprNodeArrayColumnFloat, casacore::TableExprNodeArrayColumnDouble, casacore::TableExprNodeArrayColumnComplex, casacore::TableExprNodeArrayColumnDComplex, casacore::TableExprNodeArrayColumnString, casacore::TableExprUDFNode, and casacore::TableExprUDFNodeArray.
Referenced by casacore::TableExprNode::applySelection().
static void casacore::TableExprNodeRep::checkAggrFuncs | ( | const TableExprNodeRep * | node | ) | [static] |
Throw an exception if an aggregate function is used in the expression node.
static void casacore::TableExprNodeRep::checkTablePtr | ( | Table & | table, | |
const TableExprNodeRep * | node | |||
) | [static, protected] |
void casacore::TableExprNodeRep::checkTablePtr | ( | const TableExprNodeRep * | node | ) | [inline, protected] |
Check if this node uses the same table pointer.
Fill the Table object if it is still null.
Definition at line 746 of file ExprNodeRep.h.
References table_p.
virtual void casacore::TableExprNodeRep::convertConstChild | ( | ) | [protected, virtual] |
When one of the children is a constant, convert its data type to that of the other operand.
This avoids that conversions are done for each get. The default implementation does nothing.
Reimplemented in casacore::TableExprNodeINInt, and casacore::TableExprNodeBinary.
static TableExprNodeRep* casacore::TableExprNodeRep::convertNode | ( | TableExprNodeRep * | thisNode, | |
Bool | convertConstType | |||
) | [static, protected] |
When 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 when appropriate.
static void casacore::TableExprNodeRep::createRange | ( | Block< TableExprRange > & | ) | [static] |
Create a empty range object.
static void casacore::TableExprNodeRep::createRange | ( | Block< TableExprRange > & | , | |
TableExprNodeColumn * | , | |||
Double | start, | |||
Double | end | |||
) | [static] |
Create a range object from a column and an interval.
TableExprNodeRep::NodeDataType casacore::TableExprNodeRep::dataType | ( | ) | const [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 702 of file ExprNodeRep.h.
References dtype_p.
virtual void casacore::TableExprNodeRep::disableApplySelection | ( | ) | [virtual] |
Do not apply the selection.
Reimplemented in casacore::TableExprNodeColumn, casacore::TableExprNodeArrayColumn, casacore::TableExprUDFNode, and casacore::TableExprUDFNodeArray.
Referenced by casacore::TableExprNode::disableApplySelection().
TableExprNodeRep::ExprType casacore::TableExprNodeRep::exprType | ( | ) | const [inline] |
static void casacore::TableExprNodeRep::fillExprType | ( | ExprType & | , | |
const TableExprNodeRep * | node | |||
) | [static, protected] |
void casacore::TableExprNodeRep::fillExprType | ( | const TableExprNodeRep * | node | ) | [inline, protected] |
Set expression type to Variable if node is Variable.
Definition at line 748 of file ExprNodeRep.h.
References exprtype_p.
void casacore::TableExprNodeRep::get | ( | const TableExprId & | id, | |
MArray< String > & | value | |||
) | [inline] |
Definition at line 309 of file ExprNodeRep.h.
References getArrayString(), and casacore::value().
void casacore::TableExprNodeRep::get | ( | const TableExprId & | id, | |
MArray< MVTime > & | value | |||
) | [inline] |
Definition at line 307 of file ExprNodeRep.h.
References getArrayDate(), and casacore::value().
void casacore::TableExprNodeRep::get | ( | const TableExprId & | id, | |
MArray< DComplex > & | value | |||
) | [inline] |
Definition at line 305 of file ExprNodeRep.h.
References getArrayDComplex(), and casacore::value().
void casacore::TableExprNodeRep::get | ( | const TableExprId & | id, | |
MArray< Double > & | value | |||
) | [inline] |
Definition at line 303 of file ExprNodeRep.h.
References getArrayDouble(), and casacore::value().
void casacore::TableExprNodeRep::get | ( | const TableExprId & | id, | |
MArray< Int64 > & | value | |||
) | [inline] |
Definition at line 301 of file ExprNodeRep.h.
References getArrayInt(), and casacore::value().
void casacore::TableExprNodeRep::get | ( | const TableExprId & | id, | |
MArray< Bool > & | value | |||
) | [inline] |
Definition at line 299 of file ExprNodeRep.h.
References getArrayBool(), and casacore::value().
void casacore::TableExprNodeRep::get | ( | const TableExprId & | id, | |
String & | value | |||
) | [inline] |
Definition at line 297 of file ExprNodeRep.h.
References getString(), and casacore::value().
void casacore::TableExprNodeRep::get | ( | const TableExprId & | id, | |
MVTime & | value | |||
) | [inline] |
Definition at line 295 of file ExprNodeRep.h.
References getDate(), and casacore::value().
void casacore::TableExprNodeRep::get | ( | const TableExprId & | id, | |
DComplex & | value | |||
) | [inline] |
Definition at line 293 of file ExprNodeRep.h.
References getDComplex(), and casacore::value().
void casacore::TableExprNodeRep::get | ( | const TableExprId & | id, | |
Double & | value | |||
) | [inline] |
Definition at line 291 of file ExprNodeRep.h.
References getDouble(), and casacore::value().
void casacore::TableExprNodeRep::get | ( | const TableExprId & | id, | |
Int64 & | value | |||
) | [inline] |
Definition at line 289 of file ExprNodeRep.h.
References getInt(), and casacore::value().
void casacore::TableExprNodeRep::get | ( | const TableExprId & | id, | |
Bool & | value | |||
) | [inline] |
General get functions for template purposes.
Definition at line 287 of file ExprNodeRep.h.
References getBool(), and casacore::value().
Referenced by casacore::TableExprGroupAggr::getArray().
virtual void casacore::TableExprNodeRep::getAggrNodes | ( | vector< TableExprNodeRep * > & | aggr | ) | [virtual] |
Get the nodes representing an aggregate function.
virtual MArray<Bool> casacore::TableExprNodeRep::getArrayBool | ( | const TableExprId & | id | ) | [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::TableExprAggrNodeArray, casacore::TableExprConeNodeArray, casacore::TableExprNodeArrayConstBool, casacore::TableExprFuncNodeArray, casacore::TableExprNodeArrayEQBool, casacore::TableExprNodeArrayEQInt, casacore::TableExprNodeArrayEQDouble, casacore::TableExprNodeArrayEQDComplex, casacore::TableExprNodeArrayEQString, casacore::TableExprNodeArrayEQRegex, casacore::TableExprNodeArrayEQDate, casacore::TableExprNodeArrayNEBool, casacore::TableExprNodeArrayNEInt, casacore::TableExprNodeArrayNEDouble, casacore::TableExprNodeArrayNEDComplex, casacore::TableExprNodeArrayNEString, casacore::TableExprNodeArrayNERegex, casacore::TableExprNodeArrayNEDate, casacore::TableExprNodeArrayGTInt, casacore::TableExprNodeArrayGTDouble, casacore::TableExprNodeArrayGTDComplex, casacore::TableExprNodeArrayGTString, casacore::TableExprNodeArrayGTDate, casacore::TableExprNodeArrayGEInt, casacore::TableExprNodeArrayGEDouble, casacore::TableExprNodeArrayGEDComplex, casacore::TableExprNodeArrayGEString, casacore::TableExprNodeArrayGEDate, casacore::TableExprNodeArrayINInt, casacore::TableExprNodeArrayINDouble, casacore::TableExprNodeArrayINDComplex, casacore::TableExprNodeArrayINString, casacore::TableExprNodeArrayINDate, casacore::TableExprNodeArrayOR, casacore::TableExprNodeArrayAND, casacore::TableExprNodeArrayNOT, casacore::TableExprNodeArrayColumnBool, casacore::TableExprNodeArrayPart, casacore::TableExprNodeRecordFieldArray, casacore::TableExprNodeSet, and casacore::TableExprUDFNodeArray.
Referenced by get(), casacore::TableExprNode::get(), casacore::TableExprNodeSet::getArray(), and casacore::TableExprNode::getArrayBool().
virtual MArray<MVTime> casacore::TableExprNodeRep::getArrayDate | ( | const TableExprId & | id | ) | [virtual] |
Reimplemented in casacore::TableExprAggrNodeArray, casacore::TableExprNodeArrayConstDate, casacore::TableExprFuncNodeArray, casacore::TableExprNodeArrayPlusDate, casacore::TableExprNodeArrayMinusDate, casacore::TableExprNodeArrayPart, casacore::TableExprNodeSet, and casacore::TableExprUDFNodeArray.
Referenced by get(), casacore::TableExprNode::get(), casacore::TableExprNodeSet::getArray(), and casacore::TableExprNode::getArrayDate().
virtual MArray<DComplex> casacore::TableExprNodeRep::getArrayDComplex | ( | const TableExprId & | id | ) | [virtual] |
Reimplemented in casacore::TableExprAggrNodeArray, casacore::TableExprNodeArrayConstInt, casacore::TableExprNodeArrayConstDouble, casacore::TableExprNodeArrayConstDComplex, casacore::TableExprFuncNodeArray, casacore::TableExprNodeArrayPlusDComplex, casacore::TableExprNodeArrayMinusDComplex, casacore::TableExprNodeArrayTimesDComplex, casacore::TableExprNodeArrayDivideDComplex, casacore::TableExprNodeArrayMIN, casacore::TableExprNodeArray, casacore::TableExprNodeArrayColumnComplex, casacore::TableExprNodeArrayColumnDComplex, casacore::TableExprNodeArrayPart, casacore::TableExprNodeRecordFieldArray, casacore::TableExprNodeSet, casacore::TableExprUDFNodeArray, and casacore::TableExprNodeArrayUnit.
Referenced by get(), casacore::TableExprNode::get(), casacore::TableExprNodeSet::getArray(), and casacore::TableExprNode::getArrayDComplex().
virtual MArray<Double> casacore::TableExprNodeRep::getArrayDouble | ( | const TableExprId & | id | ) | [virtual] |
Reimplemented in casacore::TableExprAggrNodeArray, casacore::TableExprNodeArrayConstInt, casacore::TableExprNodeArrayConstDouble, casacore::TableExprNodeArrayConstDate, casacore::TableExprFuncNodeArray, casacore::TableExprNodeArrayPlusDouble, casacore::TableExprNodeArrayPlusDate, casacore::TableExprNodeArrayMinusDouble, casacore::TableExprNodeArrayMinusDate, casacore::TableExprNodeArrayTimesDouble, casacore::TableExprNodeArrayDivideDouble, casacore::TableExprNodeArrayModuloDouble, casacore::TableExprNodeArrayMIN, casacore::TableExprNodeArray, casacore::TableExprNodeArrayColumnFloat, casacore::TableExprNodeArrayColumnDouble, casacore::TableExprNodeArrayPart, casacore::TableExprNodeRecordFieldArray, casacore::TableExprNodeSet, casacore::TableExprUDFNodeArray, and casacore::TableExprNodeArrayUnit.
Referenced by get(), casacore::TableExprNode::get(), casacore::TableExprNodeSet::getArray(), and casacore::TableExprNode::getArrayDouble().
virtual MArray<Int64> casacore::TableExprNodeRep::getArrayInt | ( | const TableExprId & | id | ) | [virtual] |
Reimplemented in casacore::TableExprAggrNodeArray, casacore::TableExprConeNodeArray, casacore::TableExprNodeArrayConstInt, casacore::TableExprFuncNodeArray, casacore::TableExprNodeArrayPlusInt, casacore::TableExprNodeArrayMinusInt, casacore::TableExprNodeArrayTimesInt, casacore::TableExprNodeArrayModuloInt, casacore::TableExprNodeArrayBitAndInt, casacore::TableExprNodeArrayBitOrInt, casacore::TableExprNodeArrayBitXorInt, casacore::TableExprNodeArrayMIN, casacore::TableExprNodeArrayBitNegate, casacore::TableExprNodeArrayColumnuChar, casacore::TableExprNodeArrayColumnShort, casacore::TableExprNodeArrayColumnuShort, casacore::TableExprNodeArrayColumnInt, casacore::TableExprNodeArrayColumnuInt, casacore::TableExprNodeArrayPart, casacore::TableExprNodeRecordFieldArray, casacore::TableExprNodeSet, and casacore::TableExprUDFNodeArray.
Referenced by get(), casacore::TableExprNode::get(), casacore::TableExprNodeSet::getArray(), and casacore::TableExprNode::getArrayInt().
virtual MArray<String> casacore::TableExprNodeRep::getArrayString | ( | const TableExprId & | id | ) | [virtual] |
Reimplemented in casacore::TableExprAggrNodeArray, casacore::TableExprNodeArrayConstString, casacore::TableExprFuncNodeArray, casacore::TableExprNodeArrayPlusString, casacore::TableExprNodeArrayColumnString, casacore::TableExprNodeArrayPart, casacore::TableExprNodeRecordFieldArray, casacore::TableExprNodeSet, and casacore::TableExprUDFNodeArray.
Referenced by get(), casacore::TableExprNode::get(), casacore::TableExprNodeSet::getArray(), and casacore::TableExprNode::getArrayString().
virtual Bool casacore::TableExprNodeRep::getBool | ( | const TableExprId & | id | ) | [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::TableExprAggrNode, casacore::TableExprConeNode, casacore::TableExprNodeConstBool, casacore::TableExprNodeColumn, casacore::TableExprFuncNode, casacore::TableExprNodeEQBool, casacore::TableExprNodeEQInt, casacore::TableExprNodeEQDouble, casacore::TableExprNodeEQDComplex, casacore::TableExprNodeEQString, casacore::TableExprNodeEQRegex, casacore::TableExprNodeEQDate, casacore::TableExprNodeNEBool, casacore::TableExprNodeNEInt, casacore::TableExprNodeNEDouble, casacore::TableExprNodeNEDComplex, casacore::TableExprNodeNEString, casacore::TableExprNodeNERegex, casacore::TableExprNodeNEDate, casacore::TableExprNodeGTInt, casacore::TableExprNodeGTDouble, casacore::TableExprNodeGTDComplex, casacore::TableExprNodeGTString, casacore::TableExprNodeGTDate, casacore::TableExprNodeGEInt, casacore::TableExprNodeGEDouble, casacore::TableExprNodeGEDComplex, casacore::TableExprNodeGEString, casacore::TableExprNodeGEDate, casacore::TableExprNodeINInt, casacore::TableExprNodeINDouble, casacore::TableExprNodeINDComplex, casacore::TableExprNodeINString, casacore::TableExprNodeINDate, casacore::TableExprNodeOR, casacore::TableExprNodeAND, casacore::TableExprNodeNOT, casacore::TableExprNodeArrayPart, casacore::TableExprNodeRecordField, and casacore::TableExprUDFNode.
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 Array<Bool> casacore::TableExprNodeRep::getColumnBool | ( | const Vector< uInt > & | rownrs | ) | [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::TableExprNodeColumn, and casacore::TableExprNodeArrayPart.
Referenced by casacore::TableExprNode::getColumnBool().
virtual Array<Complex> casacore::TableExprNodeRep::getColumnComplex | ( | const Vector< uInt > & | rownrs | ) | [virtual] |
Reimplemented in casacore::TableExprNodeColumn, and casacore::TableExprNodeArrayPart.
Referenced by casacore::TableExprNode::getColumnComplex().
virtual Bool casacore::TableExprNodeRep::getColumnDataType | ( | DataType & | ) | const [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::TableExprNodeColumn, casacore::TableExprNodeArrayColumn, and casacore::TableExprNodeArrayPart.
virtual Array<DComplex> casacore::TableExprNodeRep::getColumnDComplex | ( | const Vector< uInt > & | rownrs | ) | [virtual] |
Reimplemented in casacore::TableExprNodeColumn, and casacore::TableExprNodeArrayPart.
Referenced by casacore::TableExprNode::getColumnDComplex().
virtual Array<Double> casacore::TableExprNodeRep::getColumnDouble | ( | const Vector< uInt > & | rownrs | ) | [virtual] |
Reimplemented in casacore::TableExprNodeColumn, and casacore::TableExprNodeArrayPart.
Referenced by casacore::TableExprNode::getColumnDouble().
virtual Array<Float> casacore::TableExprNodeRep::getColumnFloat | ( | const Vector< uInt > & | rownrs | ) | [virtual] |
Reimplemented in casacore::TableExprNodeColumn, and casacore::TableExprNodeArrayPart.
Referenced by casacore::TableExprNode::getColumnFloat().
virtual Array<Int> casacore::TableExprNodeRep::getColumnInt | ( | const Vector< uInt > & | rownrs | ) | [virtual] |
Reimplemented in casacore::TableExprNodeColumn, and casacore::TableExprNodeArrayPart.
Referenced by casacore::TableExprNode::getColumnInt().
virtual void casacore::TableExprNodeRep::getColumnNodes | ( | vector< TableExprNodeRep * > & | cols | ) | [virtual] |
Get the nodes representing a table column.
virtual Array<Short> casacore::TableExprNodeRep::getColumnShort | ( | const Vector< uInt > & | rownrs | ) | [virtual] |
Reimplemented in casacore::TableExprNodeColumn, and casacore::TableExprNodeArrayPart.
Referenced by casacore::TableExprNode::getColumnShort().
virtual Array<String> casacore::TableExprNodeRep::getColumnString | ( | const Vector< uInt > & | rownrs | ) | [virtual] |
Reimplemented in casacore::TableExprNodeColumn, and casacore::TableExprNodeArrayPart.
Referenced by casacore::TableExprNode::getColumnString().
virtual Array<uChar> casacore::TableExprNodeRep::getColumnuChar | ( | const Vector< uInt > & | rownrs | ) | [virtual] |
Reimplemented in casacore::TableExprNodeColumn, and casacore::TableExprNodeArrayPart.
Referenced by casacore::TableExprNode::getColumnuChar().
virtual Array<uInt> casacore::TableExprNodeRep::getColumnuInt | ( | const Vector< uInt > & | rownrs | ) | [virtual] |
Reimplemented in casacore::TableExprNodeColumn, and casacore::TableExprNodeArrayPart.
Referenced by casacore::TableExprNode::getColumnuInt().
virtual Array<uShort> casacore::TableExprNodeRep::getColumnuShort | ( | const Vector< uInt > & | rownrs | ) | [virtual] |
Reimplemented in casacore::TableExprNodeColumn, and casacore::TableExprNodeArrayPart.
Referenced by casacore::TableExprNode::getColumnuShort().
virtual MVTime casacore::TableExprNodeRep::getDate | ( | const TableExprId & | id | ) | [virtual] |
MArray<MVTime> casacore::TableExprNodeRep::getDateAS | ( | const TableExprId & | id | ) |
Referenced by casacore::TableExprNode::getDateAS().
virtual DComplex casacore::TableExprNodeRep::getDComplex | ( | const TableExprId & | id | ) | [virtual] |
Reimplemented in casacore::TableExprAggrNode, casacore::TableExprNodeConstInt, casacore::TableExprNodeConstDouble, casacore::TableExprNodeConstDComplex, casacore::TableExprNodeColumn, casacore::TableExprFuncNode, casacore::TableExprNodePlusInt, casacore::TableExprNodePlusDouble, casacore::TableExprNodePlusDComplex, casacore::TableExprNodeMinusInt, casacore::TableExprNodeMinusDouble, casacore::TableExprNodeMinusDComplex, casacore::TableExprNodeTimesInt, casacore::TableExprNodeTimesDouble, casacore::TableExprNodeTimesDComplex, casacore::TableExprNodeDivideDouble, casacore::TableExprNodeDivideDComplex, casacore::TableExprNodeModuloInt, casacore::TableExprNodeModuloDouble, casacore::TableExprNodeBitAndInt, casacore::TableExprNodeBitOrInt, casacore::TableExprNodeBitXorInt, casacore::TableExprNodeMIN, casacore::TableExprNodeBitNegate, casacore::TableExprNodeArrayPart, casacore::TableExprNodeRecordField, casacore::TableExprUDFNode, and casacore::TableExprNodeUnit.
Referenced by get(), casacore::TableExprNode::get(), and casacore::TableExprNode::getDComplex().
MArray<DComplex> casacore::TableExprNodeRep::getDComplexAS | ( | const TableExprId & | id | ) |
Referenced by casacore::TableExprNode::getDComplexAS().
virtual Double casacore::TableExprNodeRep::getDouble | ( | const TableExprId & | id | ) | [virtual] |
Reimplemented in casacore::TableExprAggrNode, casacore::TableExprNodeConstInt, casacore::TableExprNodeConstDouble, casacore::TableExprNodeConstDate, casacore::TableExprNodeColumn, casacore::TableExprNodeRandom, casacore::TableExprFuncNode, casacore::TableExprNodePlusInt, casacore::TableExprNodePlusDouble, casacore::TableExprNodePlusDate, casacore::TableExprNodeMinusInt, casacore::TableExprNodeMinusDouble, casacore::TableExprNodeMinusDate, casacore::TableExprNodeTimesInt, casacore::TableExprNodeTimesDouble, casacore::TableExprNodeDivideDouble, casacore::TableExprNodeModuloInt, casacore::TableExprNodeModuloDouble, casacore::TableExprNodeBitAndInt, casacore::TableExprNodeBitOrInt, casacore::TableExprNodeBitXorInt, casacore::TableExprNodeMIN, casacore::TableExprNodeBitNegate, casacore::TableExprNodeArrayPart, casacore::TableExprNodeRecordField, casacore::TableExprUDFNode, and casacore::TableExprNodeUnit.
Referenced by get(), casacore::TableExprNode::get(), and casacore::TableExprNode::getDouble().
MArray<Double> casacore::TableExprNodeRep::getDoubleAS | ( | const TableExprId & | id | ) |
Referenced by casacore::TableExprNode::getDoubleAS().
virtual Int64 casacore::TableExprNodeRep::getInt | ( | const TableExprId & | id | ) | [virtual] |
Reimplemented in casacore::TableExprAggrNode, casacore::TableExprConeNode, casacore::TableExprNodeConstInt, casacore::TableExprNodeColumn, casacore::TableExprNodeRownr, casacore::TableExprNodeRowid, casacore::TableExprFuncNode, casacore::TableExprNodePlusInt, casacore::TableExprNodeMinusInt, casacore::TableExprNodeTimesInt, casacore::TableExprNodeModuloInt, casacore::TableExprNodeBitAndInt, casacore::TableExprNodeBitOrInt, casacore::TableExprNodeBitXorInt, casacore::TableExprNodeMIN, casacore::TableExprNodeBitNegate, casacore::TableExprNodeArrayPart, casacore::TableExprNodeRecordField, and casacore::TableExprUDFNode.
Referenced by get(), casacore::TableExprNode::get(), and casacore::TableExprNode::getInt().
MArray<Int64> casacore::TableExprNodeRep::getIntAS | ( | const TableExprId & | id | ) |
Referenced by casacore::TableExprNode::getIntAS().
virtual TaqlRegex casacore::TableExprNodeRep::getRegex | ( | const TableExprId & | id | ) | [virtual] |
Reimplemented in casacore::TableExprNodeConstRegex, casacore::TableExprFuncNode, and casacore::TableExprUDFNode.
Referenced by casacore::TableExprNode::get().
static TableExprNodeRep* casacore::TableExprNodeRep::getRep | ( | TableExprNode & | ) | [static, protected] |
Get pointer to REPresentation object.
This is used by derived classes.
virtual const IPosition& casacore::TableExprNodeRep::getShape | ( | const TableExprId & | id | ) | [protected, virtual] |
Get the shape for the given row.
Reimplemented in casacore::TableExprNodeArray, casacore::TableExprNodeArrayColumn, casacore::TableExprNodeRecordField, and casacore::TableExprNodeRecordFieldArray.
virtual String casacore::TableExprNodeRep::getString | ( | const TableExprId & | id | ) | [virtual] |
Reimplemented in casacore::TableExprAggrNode, casacore::TableExprNodeConstString, casacore::TableExprNodeColumn, casacore::TableExprFuncNode, casacore::TableExprNodePlusString, casacore::TableExprNodeArrayPart, casacore::TableExprNodeRecordField, and casacore::TableExprUDFNode.
Referenced by get(), casacore::TableExprNode::get(), and casacore::TableExprNode::getString().
MArray<String> casacore::TableExprNodeRep::getStringAS | ( | const TableExprId & | id | ) |
Referenced by casacore::TableExprNode::getStringAS().
virtual Double casacore::TableExprNodeRep::getUnitFactor | ( | ) | const [virtual] |
Get the unit conversion factor.
Default 1 is returned.
Reimplemented in casacore::TableExprNodeUnit, and casacore::TableExprNodeArrayUnit.
virtual MArray<Bool> casacore::TableExprNodeRep::hasArrayBool | ( | const TableExprId & | id, | |
const MArray< Bool > & | value | |||
) | [virtual] |
Reimplemented in casacore::TableExprNodeArray, and casacore::TableExprNodeSet.
virtual MArray<Bool> casacore::TableExprNodeRep::hasArrayDate | ( | const TableExprId & | id, | |
const MArray< MVTime > & | value | |||
) | [virtual] |
Reimplemented in casacore::TableExprNodeArray, and casacore::TableExprNodeSet.
virtual MArray<Bool> casacore::TableExprNodeRep::hasArrayDComplex | ( | const TableExprId & | id, | |
const MArray< DComplex > & | value | |||
) | [virtual] |
Reimplemented in casacore::TableExprNodeArray, and casacore::TableExprNodeSet.
virtual MArray<Bool> casacore::TableExprNodeRep::hasArrayDouble | ( | const TableExprId & | id, | |
const MArray< Double > & | value | |||
) | [virtual] |
Reimplemented in casacore::TableExprNodeArray, and casacore::TableExprNodeSet.
virtual MArray<Bool> casacore::TableExprNodeRep::hasArrayInt | ( | const TableExprId & | id, | |
const MArray< Int64 > & | value | |||
) | [virtual] |
Reimplemented in casacore::TableExprNodeArray, and casacore::TableExprNodeSet.
virtual MArray<Bool> casacore::TableExprNodeRep::hasArrayString | ( | const TableExprId & | id, | |
const MArray< String > & | value | |||
) | [virtual] |
Reimplemented in casacore::TableExprNodeArray, and casacore::TableExprNodeSet.
virtual Bool casacore::TableExprNodeRep::hasBool | ( | const TableExprId & | id, | |
Bool | value | |||
) | [virtual] |
Does a value occur in an array or set? The default implementation tests if it is in an array.
Reimplemented in casacore::TableExprNodeArray, and casacore::TableExprNodeSet.
virtual Bool casacore::TableExprNodeRep::hasDate | ( | const TableExprId & | id, | |
const MVTime & | value | |||
) | [virtual] |
Reimplemented in casacore::TableExprNodeArray, and casacore::TableExprNodeSet.
virtual Bool casacore::TableExprNodeRep::hasDComplex | ( | const TableExprId & | id, | |
const DComplex & | value | |||
) | [virtual] |
Reimplemented in casacore::TableExprNodeArray, and casacore::TableExprNodeSet.
virtual Bool casacore::TableExprNodeRep::hasDouble | ( | const TableExprId & | id, | |
Double | value | |||
) | [virtual] |
Reimplemented in casacore::TableExprNodeArray, and casacore::TableExprNodeSet.
virtual Bool casacore::TableExprNodeRep::hasInt | ( | const TableExprId & | id, | |
Int64 | value | |||
) | [virtual] |
Reimplemented in casacore::TableExprNodeArray, and casacore::TableExprNodeSet.
virtual Bool casacore::TableExprNodeRep::hasString | ( | const TableExprId & | id, | |
const String & | value | |||
) | [virtual] |
Reimplemented in casacore::TableExprNodeArray, and casacore::TableExprNodeSet.
Bool casacore::TableExprNodeRep::isConstant | ( | ) | const [inline] |
Is the expression a constant?
Definition at line 725 of file ExprNodeRep.h.
References Constant, and exprtype_p.
Referenced by casacore::TableExprNodeIndex::getSlicer().
virtual Bool casacore::TableExprNodeRep::isDefined | ( | const TableExprId & | id | ) | [virtual] |
Is the value in the given row defined? The default implementation returns True.
Reimplemented in casacore::TableExprNodeArrayColumn, casacore::TableExprNodeRecordField, and casacore::TableExprNodeRecordFieldArray.
virtual Bool casacore::TableExprNodeRep::isLazyAggregate | ( | ) | const [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::TableExprAggrNode, and casacore::TableExprAggrNodeArray.
Bool casacore::TableExprNodeRep::isReal | ( | ) | const [inline] |
Is the data type real (i.e., integer or double)?
Definition at line 705 of file ExprNodeRep.h.
TableExprNodeRep * casacore::TableExprNodeRep::link | ( | ) | [inline] |
Link to this object, i.e.
increase its reference count.
Definition at line 752 of file ExprNodeRep.h.
References count_p.
virtual CountedPtr<TableExprGroupFuncBase> casacore::TableExprNodeRep::makeGroupAggrFunc | ( | ) | [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::TableExprAggrNode, casacore::TableExprAggrNodeArray, casacore::TableExprUDFNode, and casacore::TableExprUDFNodeArray.
Int casacore::TableExprNodeRep::ndim | ( | ) | const [inline] |
Get the fixed dimensionality (same for all rows).
Definition at line 733 of file ExprNodeRep.h.
References ndim_p.
uInt 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().
TableExprNodeRep& casacore::TableExprNodeRep::operator= | ( | const TableExprNodeRep & | ) | [private] |
A copy of a TableExprNodeRep cannot be made.
Reimplemented in casacore::TableExprNodeSetElem, and casacore::TableExprNodeSet.
TableExprNodeRep::OperType casacore::TableExprNodeRep::operType | ( | ) | const [inline] |
virtual void casacore::TableExprNodeRep::ranges | ( | Block< TableExprRange > & | ) | [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::TableExprNodeEQDouble, casacore::TableExprNodeGTDouble, casacore::TableExprNodeGEDouble, casacore::TableExprNodeOR, and casacore::TableExprNodeAND.
Referenced by casacore::TableExprNode::ranges().
void casacore::TableExprNodeRep::setUnit | ( | const Unit & | unit | ) |
Set the unit.
It also sets the datatype to NTDouble if it is NTInt.
void casacore::TableExprNodeRep::setValueType | ( | TableExprNodeRep::ValueType | vtype | ) | [inline] |
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).
const IPosition & casacore::TableExprNodeRep::shape | ( | ) | const [inline] |
Get the fixed shape (same for all rows).
Definition at line 737 of file ExprNodeRep.h.
References shape_p.
virtual void casacore::TableExprNodeRep::show | ( | ostream & | , | |
uInt | indent | |||
) | const [virtual] |
Show the expression tree.
Reimplemented in casacore::TableExprNodeArrayPart, casacore::TableExprNodeBinary, casacore::TableExprNodeMulti, casacore::TableExprNodeSetElem, and casacore::TableExprNodeSet.
Referenced by casacore::TableExprNode::show().
const Table & casacore::TableExprNodeRep::table | ( | ) | const [inline] |
Definition at line 743 of file ExprNodeRep.h.
References table_p.
Table & casacore::TableExprNodeRep::table | ( | ) | [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 741 of file ExprNodeRep.h.
References table_p.
Referenced by casacore::TableExprNode::table().
Convert a ValueType to a string.
static String casacore::TableExprNodeRep::typeString | ( | NodeDataType | ) | [static] |
Convert a NodeDataType to a string.
const Unit & casacore::TableExprNodeRep::unit | ( | ) | const [inline] |
Get the unit.
Definition at line 729 of file ExprNodeRep.h.
References unit_p.
Referenced by casacore::TableExprNode::unit().
static void casacore::TableExprNodeRep::unlink | ( | TableExprNodeRep * | ) | [static] |
Unlink from the given object.
If its reference count is zero, delete it.
TableExprNodeRep::ValueType casacore::TableExprNodeRep::valueType | ( | ) | const [inline] |
Get the value type.
Definition at line 709 of file ExprNodeRep.h.
References vtype_p.
Referenced by casacore::TableExprGroupAggr::getArray(), and casacore::TableExprNode::isScalar().
ArgType casacore::TableExprNodeRep::argtype_p [protected] |
Definition at line 467 of file ExprNodeRep.h.
uInt casacore::TableExprNodeRep::count_p [protected] |
Definition at line 462 of file ExprNodeRep.h.
Referenced by link().
NodeDataType casacore::TableExprNodeRep::dtype_p [protected] |
Definition at line 464 of file ExprNodeRep.h.
Referenced by dataType(), and isReal().
ExprType casacore::TableExprNodeRep::exprtype_p [protected] |
Definition at line 468 of file ExprNodeRep.h.
Referenced by exprType(), fillExprType(), and isConstant().
Int casacore::TableExprNodeRep::ndim_p [protected] |
Definition at line 469 of file ExprNodeRep.h.
Referenced by ndim().
OperType casacore::TableExprNodeRep::optype_p [protected] |
Definition at line 466 of file ExprNodeRep.h.
Referenced by operType().
IPosition casacore::TableExprNodeRep::shape_p [protected] |
Definition at line 471 of file ExprNodeRep.h.
Referenced by shape().
Table casacore::TableExprNodeRep::table_p [protected] |
Reimplemented in casacore::TableExprFuncNode.
Definition at line 463 of file ExprNodeRep.h.
Referenced by checkTablePtr(), and table().
Unit casacore::TableExprNodeRep::unit_p [protected] |
Definition at line 472 of file ExprNodeRep.h.
Referenced by unit().
ValueType casacore::TableExprNodeRep::vtype_p [protected] |
Definition at line 465 of file ExprNodeRep.h.
Referenced by setValueType(), and valueType().