28 #ifndef TABLES_EXPRNODEARRAY_H 29 #define TABLES_EXPRNODEARRAY_H 32 #include <casacore/tables/TaQL/ExprNodeRep.h> 33 #include <casacore/tables/TaQL/TaQLStyle.h> 34 #include <casacore/tables/Tables/Table.h> 35 #include <casacore/tables/Tables/ArrayColumn.h> 36 #include <casacore/casa/Arrays/Slicer.h> 41 class TableExprNodeSet;
220 virtual void getColumnNodes (std::vector<TableExprNodeRep*>& cols);
729 void checkIndexValues (
const TENShPtr& arrayNode);
732 const Slicer& getConstantSlicer()
const;
738 Bool isSingle()
const;
752 void convertConstIndex();
794 virtual void show (ostream& os,
uInt indent)
const;
A Vector of integers, for indexing into Array<T> objects.
const Slicer & getSlicer(const TableExprId &id)
Get the Slicer value for the slice.
virtual Bool isDefined(const TableExprId &id)
Is the value in the given row defined? The default implementation returns True.
long long Int64
Define the extra non-standard types used by Casacore (like proposed uSize, Size)
virtual String getElemString(const TableExprId &id, const Slicer &index)
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 Array< uInt > getColumnuInt(const Vector< uInt > &rownrs)
Non-templated base class for templated Array class.
IPosition validateIndex(const IPosition &index, const ArrayBase &arr) const
Validate the given index against the array's shape.
virtual DComplex getElemDComplex(const TableExprId &id, const Slicer &index)
virtual Bool hasString(const TableExprId &id, const String &value)
virtual Array< Bool > getColumnBool(const Vector< uInt > &rownrs)
Get the value of the expression evaluated for the entire column.
virtual MArray< String > getSliceString(const TableExprId &id, const Slicer &)
ArrayColumn< uShort > col_p
Main interface class to a read/write table.
virtual void getColumnNodes(std::vector< TableExprNodeRep *> &cols)
Get the nodes representing a table column.
uInt array column in table select expression
virtual const IPosition & getShape(const TableExprId &id)
Get the shape of the array in the given row.
Short array column in table select expression.
ArrayColumn< uChar > col_p
TableExprNodeIndex * inxNode_p
virtual MArray< Bool > getArrayBool(const TableExprId &id)
Get an array value for this node in the given row.
virtual MArray< Bool > getSliceBool(const TableExprId &id, const Slicer &)
Get a slice of the array in the given row.
TableExprNodeArrayColumn * colNode_p
Class to hold multiple table expression nodes.
const TableExprNodeIndex * getIndexNode() const
Get the index node.
Double array column in table select expression.
virtual MArray< DComplex > getSliceDComplex(const TableExprId &id, const Slicer &)
virtual MArray< MVTime > getArrayDate(const TableExprId &id)
virtual MVTime getDate(const TableExprId &id)
virtual MArray< Int64 > getSliceInt(const TableExprId &id, const Slicer &)
virtual Array< uShort > getElemColumnuShort(const Vector< uInt > &rownrs, const Slicer &)
Base class for Array column in table select expression.
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 getInt(const TableExprId &id)
virtual Array< Double > getColumnDouble(const Vector< uInt > &rownrs)
virtual Array< uShort > getColumnuShort(const Vector< uInt > &rownrs)
virtual Array< uInt > getElemColumnuInt(const Vector< uInt > &rownrs, const Slicer &)
Bool isSingle() const
Does it index a single element?
virtual Array< Float > getColumnFloat(const Vector< uInt > &rownrs)
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 &)
NodeDataType
Define the data types of a node.
virtual Array< DComplex > getColumnDComplex(const Vector< uInt > &rownrs)
Abstract base class for a node in a table column expression tree.
virtual Array< uChar > getElemColumnuChar(const Vector< uInt > &rownrs, const Slicer &)
virtual MArray< Double > getArrayDouble(const TableExprId &id)
The default implementation of getArrayDouble does getArrayInt and converts the result.
DComplex array column in table select expression.
ArrayColumn< Double > col_p
virtual void applySelection(const Vector< uInt > &rownrs)
Re-create the column object for a selection of rows.
virtual Array< Int > getColumnInt(const Vector< uInt > &rownrs)
ArrayColumn< Float > col_p
virtual MVTime getElemDate(const TableExprId &id, const Slicer &index)
const IPosition & shape() const
Get the fixed shape (same for all rows).
virtual MArray< Bool > hasArrayDComplex(const TableExprId &id, const MArray< DComplex > &value)
virtual Double getDouble(const TableExprId &id)
virtual MArray< Bool > hasArrayDate(const TableExprId &id, const MArray< MVTime > &value)
virtual Array< String > getElemColumnString(const Vector< uInt > &rownrs, const Slicer &)
virtual MArray< Double > getSliceDouble(const TableExprId &id, const Slicer &)
const TableColumn & getColumn() const
Get the TableColumn object.
Abstract base class for a node having multiple child nodes.
std::complex< Double > DComplex
OperType
Define the operator types.
TableExprNodeArray * arrNode_p
Class with static members defining the TaQL style.
virtual MArray< Bool > hasArrayBool(const TableExprId &id, const MArray< Bool > &value)
virtual Array< String > getColumnString(const Vector< uInt > &rownrs)
const Slicer & getConstantSlicer() const
Get the Slicer value for a constant index.
bool Bool
Define the standard types used by Casacore.
Int array column in table select expression.
String array column in table select expression.
const TableExprNodeArrayColumn * getColumnNode() const
Get the array column node.
Read/write access to a table column.
virtual MArray< Int64 > getArrayInt(const TableExprId &id)
virtual Bool hasBool(const TableExprId &id, Bool value)
Does a value occur in the set?
virtual Bool getBool(const TableExprId &id)
Get a scalar value for this node in the given row.
ArrayColumn< Bool > col_p
virtual Array< Double > getElemColumnDouble(const Vector< uInt > &rownrs, const Slicer &)
Float array column in table select expression.
virtual Bool hasInt(const TableExprId &id, Int64 value)
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 void disableApplySelection()
Do not apply the selection.
Specify which elements to extract from an n-dimensional array.
virtual Bool hasDate(const TableExprId &id, const MVTime &value)
Bool isConstant() const
Is the expression a constant?
virtual Array< Complex > getColumnComplex(const Vector< uInt > &rownrs)
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.
The identification of a TaQL selection subject.
TableExprNodeArray(NodeDataType, OperType)
Create the object.
virtual String getString(const TableExprId &id)
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 &)
virtual MArray< String > getArrayString(const TableExprId &id)
String: the storage and methods of handling collections of characters.
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 DComplex getDComplex(const TableExprId &id)
virtual Array< uChar > getColumnuChar(const Vector< uInt > &rownrs)
Class to handle date/time type conversions and I/O.
virtual Array< Complex > getElemColumnComplex(const Vector< uInt > &rownrs, const Slicer &)
The index of an array element in a table select expression.
virtual Bool hasDouble(const TableExprId &id, Double value)
Complex array column in table select expression.
Abstract base class for a node having 0, 1, or 2 child nodes.
this file contains all the compiler specific defines
ArrayColumn< String > col_p
virtual Array< Short > getColumnShort(const Vector< uInt > &rownrs)
Bool array column in table select expression.
LatticeExprNode value(const LatticeExprNode &expr)
This function returns the value of the expression without a mask.
virtual void show(ostream &, uInt indent) const
Show the expression tree.
virtual Bool getColumnDataType(DataType &) const
Get the data type of the column.
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.