28 #ifndef TABLES_EXPRNODESET_H 29 #define TABLES_EXPRNODESET_H 32 #include <casacore/casa/aips.h> 33 #include <casacore/tables/TaQL/ExprNodeRep.h> 34 #include <casacore/tables/TaQL/ExprNodeArray.h> 35 #include <casacore/casa/Containers/Block.h> 43 template<
class T>
class Vector;
126 void show (ostream& os,
uInt indent)
const;
129 virtual void getAggrNodes (vector<TableExprNodeRep*>& aggr);
337 void show (ostream& os,
uInt indent)
const;
340 virtual void getAggrNodes (vector<TableExprNodeRep*>& aggr);
349 void checkEqualDataTypes()
const;
361 Bool isBounded()
const;
370 Bool hasArrays()
const;
433 void combineIntIntervals();
434 void combineDoubleIntervals();
435 void combineDateIntervals();
475 return itsElems.nelements();
480 return *(itsElems[index]);
A Vector of integers, for indexing into Array<T> objects.
TableExprNodeRep * itsIncr
virtual void getAggrNodes(vector< TableExprNodeRep *> &aggr)
Get the nodes representing an aggregate function.
long long Int64
Define the extra non-standard types used by Casacore (like proposed uSize, Size)
virtual Array< String > getArrayString(const TableExprId &id)
void matchDate(Bool *match, const MVTime *value, uInt nval, const TableExprId &id) const
void matchBool(Bool *match, const Bool *value, uInt nval, const TableExprId &id) const
Set a flag in the match output array if the corresponding element in the value array is included in t...
uInt nelements() const
Get the number of elements.
virtual Array< MVTime > getArrayDate(const TableExprId &id)
Bool isBounded() const
Is the set fully bounded (discrete and no undefined end values)?
Class to hold multiple table expression nodes.
Handle class for a table column expression tree.
Bool isLeftClosed() const
Is the interval left or right closed?
TableExprNodeSetElem * evaluate(const TableExprId &id) const
Evaluate the element for the given row and construct a new (constant) element from it...
void show(ostream &os, uInt indent) const
Show the node.
TableExprNodeRep * start() const
Get the start, end or increment expression.
Abstract base class for a node in a table column expression tree.
void fillVector(Vector< Bool > &vec, uInt &cnt, const TableExprId &id) const
Fill a vector with the value(s) from this element by appending them at the end of the vector; the end...
void checkTable()
Get the table of a node and check if the children use the same table.
virtual Bool hasDComplex(const TableExprId &id, const DComplex &value)
virtual void adaptSetUnits(const Unit &)
Let a set node convert itself to the given unit.
virtual Bool hasInt(const TableExprId &id, Int64 value)
virtual Array< Double > getArrayDouble(const TableExprId &id)
virtual Array< Bool > hasArrayDouble(const TableExprId &id, const Array< Double > &value)
Class to hold the table expression nodes for an element in a set.
std::complex< Double > DComplex
const TableExprNodeSetElem & operator[](uInt index) const
Get the i-th element.
TableExprNodeSetElem(const TableExprNode &node)
Create the object for a single expression node.
LatticeExprNode nelements(const LatticeExprNode &expr)
1-argument function to get the number of elements in a lattice.
virtual Bool hasDate(const TableExprId &id, const MVTime &value)
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...
Bool isSingle() const
Is a single value given?
bool Bool
Define the standard types used by Casacore.
virtual Array< Bool > hasArrayDate(const TableExprId &id, const Array< MVTime > &value)
Bool isDiscrete() const
Is it a discrete set element.
Bool isDiscrete() const
Contains the set only discrete elements? Discrete means that no continuous ranges are given...
void setup(Bool isLeftClosed, const TableExprNode *start, const TableExprNode *end, Bool isRightClosed)
Setup the object for a continuous interval.
Bool isRightClosed() const
void matchString(Bool *match, const String *value, uInt nval, const TableExprId &id) const
A drop-in replacement for Block<T*>.
Bool isSingle() const
Contains the set only single elements? Single means that only single values are given (thus no end no...
virtual Array< Bool > hasArrayDComplex(const TableExprId &id, const Array< DComplex > &value)
Specify which elements to extract from an n-dimensional array.
TableExprNodeRep * increment() const
virtual Bool hasDouble(const TableExprId &id, Double value)
PtrBlock< TableExprNodeSetElem * > itsElems
void matchDComplex(Bool *match, const DComplex *value, uInt nval, const TableExprId &id) const
virtual Array< Int64 > getArrayInt(const TableExprId &id)
The identification of a TaQL selection subject.
TableExprNodeRep * end() const
virtual Array< Bool > hasArrayBool(const TableExprId &id, const Array< Bool > &value)
virtual Array< DComplex > getArrayDComplex(const TableExprId &id)
String: the storage and methods of handling collections of characters.
virtual void getColumnNodes(vector< TableExprNodeRep *> &cols)
Get the nodes representing a table column.
virtual Array< Bool > hasArrayString(const TableExprId &id, const Array< String > &value)
TableExprNodeRep * itsEnd
Class to handle date/time type conversions and I/O.
virtual Array< Bool > hasArrayInt(const TableExprId &id, const Array< Int64 > &value)
virtual Bool hasString(const TableExprId &id, const String &value)
TableExprNodeSetElem & operator=(const TableExprNodeSetElem &)
A copy of a TableExprNodeSetElem cannot be made.
TableExprNodeRep * itsStart
void matchDouble(Bool *match, const Double *value, uInt nval, const TableExprId &id) const
this file contains all the compiler specific defines
void matchInt(Bool *match, const Int64 *value, uInt nval, const TableExprId &id) const
LatticeExprNode value(const LatticeExprNode &expr)
This function returns the value of the expression without a mask.
virtual Array< Bool > getArrayBool(const TableExprId &id)
Get an array value for this node in the given row.