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
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...
Bool isSingle() const
Is a single value given?
long long Int64
Define the extra non-standard types used by Casacore (like proposed uSize, Size)
virtual Array< String > getArrayString(const TableExprId &id)
void show(ostream &os, uInt indent) const
Show the node.
virtual Array< MVTime > getArrayDate(const TableExprId &id)
const TableExprNodeSetElem & operator[](uInt index) const
Get the i-th element.
Class to hold multiple table expression nodes.
Handle class for a table column expression tree.
virtual void getAggrNodes(vector< TableExprNodeRep * > &aggr)
Get the nodes representing an aggregate function.
Bool isBounded() const
Is the set fully bounded (discrete and no undefined end values)?
void matchDouble(Bool *match, const Double *value, uInt nval, const TableExprId &id) const
Abstract base class for a node in a table column expression tree.
void matchDComplex(Bool *match, const DComplex *value, uInt nval, const TableExprId &id) const
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)
void matchDate(Bool *match, const MVTime *value, uInt nval, const TableExprId &id) const
void matchString(Bool *match, const String *value, uInt nval, const TableExprId &id) const
TableExprNodeRep * start() const
Get the start, end or increment expression.
virtual Array< Bool > hasArrayDouble(const TableExprId &id, const Array< Double > &value)
Class to hold the table expression nodes for an element in a set.
TableExprNodeSetElem * evaluate(const TableExprId &id) const
Evaluate the element for the given row and construct a new (constant) element from it...
TableExprNodeRep * increment() const
std::complex< Double > DComplex
TableExprNodeSetElem(const TableExprNode &node)
Create the object for a single expression node.
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...
virtual void getColumnNodes(vector< TableExprNodeRep * > &cols)
Get the nodes representing a table column.
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 isRightClosed() const
Bool isDiscrete() const
Is it a discrete set element.
TableExprNodeRep * end() const
bool Bool
Define the standard types used by Casacore.
virtual Array< Bool > hasArrayDate(const TableExprId &id, const Array< MVTime > &value)
void matchInt(Bool *match, const Int64 *value, uInt nval, const TableExprId &id) const
void setup(Bool isLeftClosed, const TableExprNode *start, const TableExprNode *end, Bool isRightClosed)
Setup the object for a continuous interval.
Bool isDiscrete() const
Contains the set only discrete elements? Discrete means that no continuous ranges are given...
Bool isSingle() const
Contains the set only single elements? Single means that only single values are given (thus no end no...
A drop-in replacement for Block<T*>.
virtual Array< Bool > hasArrayDComplex(const TableExprId &id, const Array< DComplex > &value)
Specify which elements to extract from an n-dimensional array.
virtual Bool hasDouble(const TableExprId &id, Double value)
PtrBlock< TableExprNodeSetElem * > itsElems
virtual Array< Int64 > getArrayInt(const TableExprId &id)
The identification of a TaQL selection subject.
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 Array< Bool > hasArrayString(const TableExprId &id, const Array< String > &value)
TableExprNodeRep * itsEnd
Class to handle date/time type conversions and I/O.
Bool isLeftClosed() const
Is the interval left or right closed?
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
this file contains all the compiler specific defines
LatticeExprNode value(const LatticeExprNode &expr)
This function returns the value of the expression without a mask.
uInt nelements() const
Get the number of elements.
virtual Array< Bool > getArrayBool(const TableExprId &id)
Get an array value for this node in the given row.