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 Array< Bool > getElemColumnBool(const Vector< uInt > &rownrs, const Slicer &)
Get a single element for the entire column (used by sort).
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 Array< uShort > getColumnuShort(const Vector< uInt > &rownrs)
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 void applySelection(const Vector< uInt > &rownrs)
Re-create the column object for a selection of rows.
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 Array< uChar > getColumnuChar(const Vector< uInt > &rownrs)
virtual MArray< String > getSliceString(const TableExprId &id, const Slicer &)
ArrayColumn< uShort > col_p
virtual void applySelection(const Vector< uInt > &rownrs)
Re-create the column object for a selection of rows.
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...
const TableColumn & getColumn() const
Get the TableColumn object.
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 &)
Short array column in table select expression.
ArrayColumn< uChar > col_p
virtual Array< String > getColumnString(const Vector< uInt > &rownrs)
TableExprNodeIndex * inxNode_p
~TableExprNodeArrayColumnDComplex()
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)
virtual Array< uInt > getColumnuInt(const Vector< uInt > &rownrs)
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< Complex > getElemColumnComplex(const Vector< uInt > &rownrs, const Slicer &)
virtual Array< DComplex > getColumnDComplex(const Vector< uInt > &rownrs)
virtual MArray< Int64 > getSliceInt(const TableExprId &id, const Slicer &)
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 &)
virtual Array< uShort > getElemColumnuShort(const Vector< uInt > &rownrs, const Slicer &)
Base class for Array column in table select expression.
Bool isConstant() const
Is the expression a constant?
virtual MArray< MVTime > getArrayDate(const TableExprId &id)
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 Int64 getElemInt(const TableExprId &id, const Slicer &index)
virtual Array< uShort > getElemColumnuShort(const Vector< uInt > &rownrs, const Slicer &)
virtual MArray< Int64 > getSliceInt(const TableExprId &id, const Slicer &)
virtual Array< uInt > getElemColumnuInt(const Vector< uInt > &rownrs, const Slicer &)
virtual Double getDouble(const TableExprId &id)
virtual Bool isDefined(const TableExprId &id)
Is the value in the given row defined?
Base class for arrays in table select expression.
ArrayColumn< uInt > col_p
ArrayColumn< DComplex > col_p
virtual MArray< MVTime > getSliceDate(const TableExprId &id, const Slicer &)
virtual Array< Bool > getColumnBool(const Vector< uInt > &rownrs)
Get the value of the expression evaluated for the entire column.
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 Array< uChar > getElemColumnuChar(const Vector< uInt > &rownrs, const Slicer &)
virtual Array< String > getElemColumnString(const Vector< uInt > &rownrs, const Slicer &)
virtual MArray< Double > getArrayDouble(const TableExprId &id)
The default implementation of getArrayDouble does getArrayInt and converts the result.
virtual Array< uChar > getElemColumnuChar(const Vector< uInt > &rownrs, const Slicer &)
virtual void applySelection(const Vector< uInt > &rownrs)
Re-create the column object for a selection of rows.
virtual MArray< DComplex > getSliceDComplex(const TableExprId &id, const Slicer &)
DComplex array column in table select expression.
ArrayColumn< Double > col_p
const TableExprNodeIndex * getIndexNode() const
Get the index node.
virtual void applySelection(const Vector< uInt > &rownrs)
Re-create the column object for a selection of rows.
virtual MArray< String > getArrayString(const TableExprId &id)
ArrayColumn< Float > col_p
virtual void applySelection(const Vector< uInt > &rownrs)
Re-create the column object for a selection of rows.
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)
virtual void applySelection(const Vector< uInt > &rownrs)
Re-create the column object for a selection of rows.
~TableExprNodeArrayColumn()
virtual Array< Float > getElemColumnFloat(const Vector< uInt > &rownrs, const Slicer &)
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 &)
virtual void applySelection(const Vector< uInt > &rownrs)
Re-create the column object for a selection of rows.
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 void applySelection(const Vector< uInt > &rownrs)
Re-create the column object for a selection of rows.
virtual Array< Int64 > getColumnInt64(const Vector< uInt > &rownrs)
virtual MArray< Int64 > getArrayInt(const TableExprId &id)
virtual Array< String > getElemColumnString(const Vector< uInt > &rownrs, const Slicer &)
virtual void applySelection(const Vector< uInt > &rownrs)
Re-create the column object for a selection of rows.
virtual Array< Int64 > getElemColumnInt64(const Vector< uInt > &rownrs, const Slicer &)
IPosition validateIndex(const IPosition &index, const ArrayBase &arr) const
Validate the given index against the array's shape.
virtual MArray< Double > getSliceDouble(const TableExprId &id, const Slicer &)
TableExprNodeArrayColumnDouble(const TableColumn &, const Table &)
Abstract base class for a node having multiple child nodes.
~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)
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 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.
virtual Array< Short > getElemColumnShort(const Vector< uInt > &rownrs, const Slicer &)
virtual void applySelection(const Vector< uInt > &rownrs)
Re-create the column object for a selection of rows.
bool Bool
Define the standard types used by Casacore.
Int array column in table select expression.
virtual Array< Int > getColumnInt(const Vector< uInt > &rownrs)
~TableExprNodeArrayColumnuInt()
virtual void applySelection(const Vector< uInt > &rownrs)
Re-create the column object for a selection of rows.
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)
Read/write access to a table column.
virtual Array< Double > getColumnDouble(const Vector< uInt > &rownrs)
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
ArrayColumn< Bool > col_p
virtual Array< Double > getElemColumnDouble(const Vector< uInt > &rownrs, const Slicer &)
Float array column in table select expression.
virtual MArray< Int64 > getArrayInt(const TableExprId &id)
~TableExprNodeArrayColumnShort()
virtual Array< uInt > getElemColumnuInt(const Vector< uInt > &rownrs, const Slicer &)
virtual void applySelection(const Vector< uInt > &rownrs)
Re-create the column object for a selection of rows.
virtual Bool hasInt(const TableExprId &id, Int64 value)
~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 Array< Int > getElemColumnInt(const Vector< uInt > &rownrs, const Slicer &)
virtual MVTime getDate(const TableExprId &id)
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< DComplex > getElemColumnDComplex(const Vector< uInt > &rownrs, const Slicer &)
virtual Array< Int64 > getElemColumnInt64(const Vector< uInt > &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 TENShPtr makeConstantScalar()
Turn a constant array with one element into a scalar.
virtual Array< Int > getElemColumnInt(const Vector< uInt > &rownrs, const Slicer &)
~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()
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 Int64 getInt(const TableExprId &id)
TableExprNodeArrayColumnFloat(const TableColumn &, const Table &)
Table & table()
Get table.
static MArray< Int64 > makeArray(const IPosition &shape, Int64 value)
Make an array with the given shape and fill it with the value.
virtual Array< DComplex > getElemColumnDComplex(const Vector< uInt > &rownrs, const Slicer &)
~TableExprNodeArrayColumnuShort()
virtual Array< Double > getElemColumnDouble(const Vector< uInt > &rownrs, const Slicer &)
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 Array< Short > getColumnShort(const Vector< uInt > &rownrs)
virtual MArray< Bool > hasArrayInt(const TableExprId &id, const MArray< Int64 > &value)
virtual Array< Float > getElemColumnFloat(const Vector< uInt > &rownrs, const Slicer &)
virtual MArray< Bool > hasArrayDouble(const TableExprId &id, const MArray< Double > &value)
uShort array column in table select expression
uChar array column in table select expression
virtual Array< Bool > getElemColumnBool(const Vector< uInt > &rownrs, const Slicer &)
Get a single element for the entire column (used by sort).
TableExprNodeArrayColumnBool(const TableColumn &, const Table &)
virtual MArray< Int64 > getSliceInt(const TableExprId &id, const Slicer &)
~TableExprNodeArrayPart()
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 Array< Complex > getElemColumnComplex(const Vector< uInt > &rownrs, const Slicer &)
virtual Bool getColumnDataType(DataType &) const
Get the data type of this column (if possible).
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 void applySelection(const Vector< uInt > &rownrs)
Re-create the column object for a selection of rows.
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 Array< Complex > getColumnComplex(const Vector< uInt > &rownrs)
virtual Array< Float > getColumnFloat(const Vector< uInt > &rownrs)
virtual ~TableExprNodeIndex()
Destructor.
ArrayColumn< Short > col_p
virtual Array< Short > getElemColumnShort(const Vector< uInt > &rownrs, const Slicer &)
virtual Bool getElemBool(const TableExprId &id, const Slicer &index)
Get a single element from the array in the given row.
#define casacore
<X11/Intrinsic.h> #defines true, false, casacore::Bool, and String.