28 #ifndef TABLES_EXPRNODEARRAY_H
29 #define TABLES_EXPRNODEARRAY_H
41 class TableExprNodeSet;
222 virtual void getColumnNodes (std::vector<TableExprNodeRep*>& cols);
835 virtual void show (ostream& os,
uInt indent)
const;
virtual MArray< Double > getSliceDouble(const TableExprId &id, const Slicer &)
A Vector of integers, for indexing into Array<T> objects.
virtual DComplex getElemDComplex(const TableExprId &id, const Slicer &index)
const Slicer & getSlicer(const TableExprId &id)
Get the Slicer value for the slice.
~TableExprNodeArrayColumnInt64()
void fillIndex(const TableExprNodeSet &indices)
Link all the operands and check datatype.
long long Int64
Define the extra non-standard types used by Casacore (like proposed uSize, Size)
virtual MArray< DComplex > getSliceDComplex(const TableExprId &id, const Slicer &)
virtual String getElemString(const TableExprId &id, const Slicer &index)
Bool isSingle() const
Does it index a single element?
ArrayColumn< Complex > col_p
virtual Int64 getElemInt(const TableExprId &id, const Slicer &index)
virtual DComplex getElemDComplex(const TableExprId &id, const Slicer &index)
virtual MArray< Int64 > getSliceInt(const TableExprId &id, const Slicer &)
Non-templated base class for templated Array class.
void checkIndexValues(const TENShPtr &arrayNode)
Check if the index values match the dimensionality and shape of fixed-shaped array.
virtual DComplex getElemDComplex(const TableExprId &id, const Slicer &index)
virtual MArray< Int64 > getArrayInt(const TableExprId &id)
virtual MArray< DComplex > getArrayDComplex(const TableExprId &id)
The default implementation of getArrayDComplex does getArrayDouble and converts the result...
TableExprNodeArrayColumnuShort(const TableColumn &, const Table &)
virtual Bool hasString(const TableExprId &id, const String &value)
virtual MArray< Bool > getSliceBool(const TableExprId &id, const Slicer &)
Get a slice of the array in the given row.
~TableExprNodeArrayColumnDouble()
virtual MArray< String > getSliceString(const TableExprId &id, const Slicer &)
ArrayColumn< uShort > col_p
Main interface class to a read/write table.
virtual MArray< DComplex > getArrayDComplex(const TableExprId &id)
The default implementation of getArrayDComplex does getArrayDouble and converts the result...
virtual Array< Bool > getColumnBool(const Vector< rownr_t > &rownrs)
Get the value of the expression evaluated for the entire column.
const TableColumn & getColumn() const
Get the TableColumn object.
virtual Array< DComplex > getColumnDComplex(const Vector< rownr_t > &rownrs)
virtual Array< Int > getElemColumnInt(const Vector< rownr_t > &rownrs, const Slicer &)
virtual MArray< Int64 > getArrayInt(const TableExprId &id)
uInt array column in table select expression
virtual const IPosition & getShape(const TableExprId &id)
Get the shape of the array in the given row.
TableExprNodeArrayColumnuChar(const TableColumn &, const Table &)
TableExprNodeArrayColumnString(const TableColumn &, const Table &)
virtual Array< Float > getElemColumnFloat(const Vector< rownr_t > &rownrs, const Slicer &)
Short array column in table select expression.
ArrayColumn< uChar > col_p
TableExprNodeIndex * inxNode_p
~TableExprNodeArrayColumnDComplex()
virtual Array< Double > getColumnDouble(const Vector< rownr_t > &rownrs)
virtual void applySelection(const Vector< rownr_t > &rownrs)
Re-create the column object for a selection of rows.
virtual MArray< Bool > getSliceBool(const TableExprId &id, const Slicer &)
Get a slice of the array in the given row.
virtual MArray< Int64 > getArrayInt(const TableExprId &id)
TableExprNodeArrayColumn * colNode_p
Class to hold multiple table expression nodes.
virtual MArray< Int64 > getSliceInt(const TableExprId &id, const Slicer &)
Double array column in table select expression.
virtual MArray< DComplex > getSliceDComplex(const TableExprId &id, const Slicer &)
virtual Array< uChar > getElemColumnuChar(const Vector< rownr_t > &rownrs, const Slicer &)
virtual MArray< Int64 > getSliceInt(const TableExprId &id, const Slicer &)
virtual void applySelection(const Vector< rownr_t > &rownrs)
Re-create the column object for a selection of rows.
virtual void disableApplySelection()
Do not apply the selection.
virtual MArray< Int64 > getSliceInt(const TableExprId &id, const Slicer &)
TableExprNodeArrayColumnShort(const TableColumn &, const Table &)
TableExprNodeArrayColumnInt64(const TableColumn &, const Table &)
Base class for Array column in table select expression.
virtual void applySelection(const Vector< rownr_t > &rownrs)
Re-create the column object for a selection of rows.
Bool isConstant() const
Is the expression a constant?
virtual MArray< MVTime > getArrayDate(const TableExprId &id)
virtual Array< String > getColumnString(const Vector< rownr_t > &rownrs)
virtual Double getElemDouble(const TableExprId &id, const Slicer &index)
virtual Int64 getElemInt(const TableExprId &id, const Slicer &index)
virtual MArray< Bool > hasArrayString(const TableExprId &id, const MArray< String > &value)
virtual Array< Float > getElemColumnFloat(const Vector< rownr_t > &rownrs, const Slicer &)
virtual Int64 getElemInt(const TableExprId &id, const Slicer &index)
virtual Array< Complex > getElemColumnComplex(const Vector< rownr_t > &rownrs, const Slicer &)
virtual MArray< Int64 > getSliceInt(const TableExprId &id, const Slicer &)
virtual Double getDouble(const TableExprId &id)
virtual Bool isDefined(const TableExprId &id)
Is the value in the given row defined?
virtual void applySelection(const Vector< rownr_t > &rownrs)
Re-create the column object for a selection of rows.
Base class for arrays in table select expression.
virtual Array< String > getElemColumnString(const Vector< rownr_t > &rownrs, const Slicer &)
ArrayColumn< uInt > col_p
ArrayColumn< DComplex > col_p
virtual MArray< MVTime > getSliceDate(const TableExprId &id, const Slicer &)
virtual Array< Short > getElemColumnShort(const Vector< rownr_t > &rownrs, const Slicer &)
virtual Array< Double > getElemColumnDouble(const Vector< rownr_t > &rownrs, const Slicer &)
virtual Array< Int64 > getColumnInt64(const Vector< rownr_t > &rownrs)
NodeDataType
Define the data types of a node.
Abstract base class for a node in a table column expression tree.
virtual String getString(const TableExprId &id)
virtual void applySelection(const Vector< rownr_t > &rownrs)
Re-create the column object for a selection of rows.
virtual Array< uShort > getElemColumnuShort(const Vector< rownr_t > &rownrs, const Slicer &)
virtual MArray< Double > getArrayDouble(const TableExprId &id)
The default implementation of getArrayDouble does getArrayInt and converts the result.
virtual MArray< DComplex > getSliceDComplex(const TableExprId &id, const Slicer &)
virtual Array< Complex > getElemColumnComplex(const Vector< rownr_t > &rownrs, const Slicer &)
DComplex array column in table select expression.
ArrayColumn< Double > col_p
virtual Array< Short > getElemColumnShort(const Vector< rownr_t > &rownrs, const Slicer &)
virtual Array< Short > getColumnShort(const Vector< rownr_t > &rownrs)
const TableExprNodeIndex * getIndexNode() const
Get the index node.
virtual MArray< String > getArrayString(const TableExprId &id)
ArrayColumn< Float > col_p
virtual MVTime getElemDate(const TableExprId &id, const Slicer &index)
virtual const IPosition & getShape(const TableExprId &id)
Get the shape of the array in the given row.
virtual MArray< Double > getArrayDouble(const TableExprId &id)
The default implementation of getArrayDouble does getArrayInt and converts the result.
virtual MArray< Bool > hasArrayDComplex(const TableExprId &id, const MArray< DComplex > &value)
virtual MArray< Bool > hasArrayDate(const TableExprId &id, const MArray< MVTime > &value)
virtual Int64 getElemInt(const TableExprId &id, const Slicer &index)
~TableExprNodeArrayColumn()
virtual void getColumnNodes(std::vector< TableExprNodeRep * > &cols)
This node represents a table column.
virtual Bool getElemBool(const TableExprId &id, const Slicer &index)
Get a single element from the array in the given row.
TableExprNodeArrayColumnuInt(const TableColumn &, const Table &)
const TableExprNodeArrayColumn * getColumnNode() const
Get the array column node.
TableExprNodeArrayColumnComplex(const TableColumn &, const Table &)
virtual MArray< DComplex > getArrayDComplex(const TableExprId &id)
The default implementation of getArrayDComplex does getArrayDouble and converts the result...
~TableExprNodeArrayColumnFloat()
virtual MArray< Int64 > getArrayInt(const TableExprId &id)
IPosition validateIndex(const IPosition &index, const ArrayBase &arr) const
Validate the given index against the array's shape.
virtual Array< String > getElemColumnString(const Vector< rownr_t > &rownrs, const Slicer &)
virtual MArray< Double > getSliceDouble(const TableExprId &id, const Slicer &)
virtual Array< Int > getElemColumnInt(const Vector< rownr_t > &rownrs, const Slicer &)
TableExprNodeArrayColumnDouble(const TableColumn &, const Table &)
Abstract base class for a node having multiple child nodes.
virtual void applySelection(const Vector< rownr_t > &rownrs)
Re-create the column object for a selection of rows.
~TableExprNodeArrayColumnString()
std::complex< Double > DComplex
virtual Int64 getElemInt(const TableExprId &id, const Slicer &index)
OperType
Define the operator types.
virtual Double getElemDouble(const TableExprId &id, const Slicer &index)
virtual Array< DComplex > getElemColumnDComplex(const Vector< rownr_t > &rownrs, const Slicer &)
TableExprNodeArray * arrNode_p
Class with static members defining the TaQL style.
virtual MArray< Bool > hasArrayBool(const TableExprId &id, const MArray< Bool > &value)
Int64 array column in table select expression.
virtual void applySelection(const Vector< rownr_t > &rownrs)
Re-create the column object for a selection of rows.
virtual Double getElemDouble(const TableExprId &id, const Slicer &index)
virtual Bool getBool(const TableExprId &id)
Get a scalar value for this node in the given row.
bool Bool
Define the standard types used by Casacore.
Int array column in table select expression.
~TableExprNodeArrayColumnuInt()
String array column in table select expression.
virtual MArray< Bool > getArrayBool(const TableExprId &id)
Get an array value for this node in the given row.
virtual DComplex getDComplex(const TableExprId &id)
virtual Int64 getElemInt(const TableExprId &id, const Slicer &index)
virtual Array< Int64 > getElemColumnInt64(const Vector< rownr_t > &rownrs, const Slicer &)
Read/write access to a table column.
void fillSlicer(const TableExprId &id)
Fill the slicer for this row.
virtual Bool hasBool(const TableExprId &id, Bool value)
Does a value occur in the set?
ArrayColumn< Int64 > col_p
virtual Array< Int > getColumnInt(const Vector< rownr_t > &rownrs)
ArrayColumn< Bool > col_p
Float array column in table select expression.
virtual MArray< Int64 > getArrayInt(const TableExprId &id)
~TableExprNodeArrayColumnShort()
virtual Bool hasInt(const TableExprId &id, Int64 value)
virtual void applySelection(const Vector< rownr_t > &rownrs)
Re-create the column object for a selection of rows.
virtual void applySelection(const Vector< rownr_t > &rownrs)
Re-create the column object for a selection of rows.
~TableExprNodeArrayColumnuChar()
virtual MArray< Int64 > getArrayInt(const TableExprId &id)
virtual MArray< DComplex > getArrayDComplex(const TableExprId &id)
The default implementation of getArrayDComplex does getArrayDouble and converts the result...
virtual MVTime getDate(const TableExprId &id)
virtual Array< uChar > getColumnuChar(const Vector< rownr_t > &rownrs)
virtual Bool getColumnDataType(DataType &) const
Get the data type of this column.
virtual MArray< Double > getArrayDouble(const TableExprId &id)
The default implementation of getArrayDouble does getArrayInt and converts the result.
Specify which elements to extract from an n-dimensional array.
virtual MArray< Int64 > getArrayInt(const TableExprId &id)
virtual String getElemString(const TableExprId &id, const Slicer &index)
virtual Bool hasDate(const TableExprId &id, const MVTime &value)
virtual Int64 getElemInt(const TableExprId &id, const Slicer &index)
virtual Array< uChar > getElemColumnuChar(const Vector< rownr_t > &rownrs, const Slicer &)
TableExprNodeArrayColumn(const TableColumn &tablecol, const Table &table)
Create the object for the given column and table.
Array column part in table select expression.
virtual Bool hasDComplex(const TableExprId &id, const DComplex &value)
virtual Array< Complex > getColumnComplex(const Vector< rownr_t > &rownrs)
virtual TENShPtr makeConstantScalar()
Turn a constant array with one element into a scalar.
virtual void applySelection(const Vector< rownr_t > &rownrs)
Re-create the column object for a selection of rows.
~TableExprNodeArrayColumnBool()
The identification of a TaQL selection subject.
IPosition getNodeShape(const TENShPtr &arrayNode) const
Get the shape of the node involved.
TableExprNodeArrayColumnInt(const TableColumn &, const Table &)
~TableExprNodeArrayColumnInt()
virtual Array< uShort > getColumnuShort(const Vector< rownr_t > &rownrs)
TableExprNodeArrayColumnDComplex(const TableColumn &, const Table &)
void convertConstIndex()
Precalculate the constant indices and store them.
TableExprNodeArray(NodeDataType, OperType)
Create the object.
virtual MArray< Double > getSliceDouble(const TableExprId &id, const Slicer &)
virtual Array< Int64 > getElemColumnInt64(const Vector< rownr_t > &rownrs, const Slicer &)
virtual Int64 getInt(const TableExprId &id)
TableExprNodeArrayColumnFloat(const TableColumn &, const Table &)
Table & table()
Get table.
virtual Array< uShort > getElemColumnuShort(const Vector< rownr_t > &rownrs, const Slicer &)
static MArray< Int64 > makeArray(const IPosition &shape, Int64 value)
Make an array with the given shape and fill it with the value.
~TableExprNodeArrayColumnuShort()
TableExprNodeIndex(const TableExprNodeSet &indices, const TaQLStyle &=TaQLStyle(0))
Constructor.
String: the storage and methods of handling collections of characters.
virtual MArray< Int64 > getSliceInt(const TableExprId &id, const Slicer &)
virtual MArray< Bool > getArrayBool(const TableExprId &id)
Get an array value for this node in the given row.
virtual void applySelection(const Vector< rownr_t > &rownrs)
Re-create the column object for a selection of rows.
virtual MArray< Bool > hasArrayInt(const TableExprId &id, const MArray< Int64 > &value)
virtual void applySelection(const Vector< rownr_t > &rownrs)
Re-create the column object for a selection of rows.
virtual MArray< Bool > hasArrayDouble(const TableExprId &id, const MArray< Double > &value)
virtual Array< Float > getColumnFloat(const Vector< rownr_t > &rownrs)
virtual Array< Bool > getElemColumnBool(const Vector< rownr_t > &rownrs, const Slicer &)
Get a single element for the entire column (used by sort).
virtual void applySelection(const Vector< rownr_t > &rownrs)
Re-create the column object for a selection of rows.
uShort array column in table select expression
virtual Array< uInt > getElemColumnuInt(const Vector< rownr_t > &rownrs, const Slicer &)
virtual Array< Bool > getElemColumnBool(const Vector< rownr_t > &rownrs, const Slicer &)
Get a single element for the entire column (used by sort).
uChar array column in table select expression
TableExprNodeArrayColumnBool(const TableColumn &, const Table &)
virtual MArray< Int64 > getSliceInt(const TableExprId &id, const Slicer &)
~TableExprNodeArrayPart()
virtual Array< DComplex > getElemColumnDComplex(const Vector< rownr_t > &rownrs, const Slicer &)
virtual MArray< String > getSliceString(const TableExprId &id, const Slicer &)
virtual MArray< Double > getArrayDouble(const TableExprId &id)
The default implementation of getArrayDouble does getArrayInt and converts the result.
Class to handle date/time type conversions and I/O.
virtual Bool getColumnDataType(DataType &) const
Get the data type of this column (if possible).
virtual Array< uInt > getElemColumnuInt(const Vector< rownr_t > &rownrs, const Slicer &)
The index of an array element in a table select expression.
virtual void show(ostream &os, uInt indent) const
Show the node.
const IPosition & shape() const
Get the fixed shape (same for all rows).
~TableExprNodeArrayColumnComplex()
TableExprNodeArrayPart(const TENShPtr &arrayNode, const TENShPtr &indexNode)
virtual Bool hasDouble(const TableExprId &id, Double value)
Complex array column in table select expression.
const Slicer & getConstantSlicer() const
Get the Slicer value for a constant index.
Abstract base class for a node having 0, 1, or 2 child nodes.
virtual MArray< String > getArrayString(const TableExprId &id)
ArrayColumn< String > col_p
Bool array column in table select expression.
LatticeExprNode value(const LatticeExprNode &expr)
This function returns the value of the expression without a mask.
virtual ~TableExprNodeIndex()
Destructor.
virtual Array< Double > getElemColumnDouble(const Vector< rownr_t > &rownrs, const Slicer &)
ArrayColumn< Short > col_p
virtual Bool getElemBool(const TableExprId &id, const Slicer &index)
Get a single element from the array in the given row.
virtual Array< uInt > getColumnuInt(const Vector< rownr_t > &rownrs)