Handle class for a table column expression tree. More...
#include <ExprNode.h>
Handle class for a table column expression tree.
Public interface
TableExprNode represents a node in the tree reflecting a table select expression.
TableExprNode is the class to store a table select expression, which allows to select rows from the table. The selected rows form a table which is a view of the original table.
TableExprNode is a handle class for the counted referenced class TableExprNodeRep. Classes (like TableExprNodePlusXX) derived from TableExprNodeRep hold the individual nodes in the expression, i.e. the operators and operands. The nodes form a binary tree reflecting the expression. E.g. the expression 2*COLUMN results in the node TableExprNodeTimes with its children TableExprNodeConst and TableExprNodeColumn. Constant subexpressions (like 2*3) are evaluated immediately and only the result is stored as a node.
There are a few TableExprNode constructors taking a constant scalar or array. In this way constant value are automatically converted to the appropriate TableExprNodeConst object.
The derived classes also reflect the data type of the node. Data types Bool, Double, DComplex and String are used. Char, uChar, Short, uShort, Int, uInt and float are converted to Double and Complex to DComplex. Binary operators +, -, *, /, %, &, }, ^, ==, >=, >, <, <= and != are recognized. Also &&, ||, parentheses and unary +, -, ~ and ! are recognized. For strings the binary operator + can also be used. The operators have the normal C++ precedence. Furthermore functions (like sin, max, ceil) can be used in an expression.
Operator() can be used to take a slice from an array.
The Table function col has to be used to create a TableExprNode object for a column in the table. The Table operator() can be used the do the actual selection from the top TableExprNode object.
// Select from table X all rows where column RA<5 and where column // SWITCH is true. Table table("X"); Table subtable = table(table.col("RA") < 5 && table.col("SWITCH")); // Select from that result all rows where the concatenation of // the strings in columns STR1 and STR2 is equal to the string // in keyword STRKEY. Table subsub = subtable(subtable.col("STR1") + subtable.col("STR2") == subtable.key("STRKEY"));
Having TableExprNode as a handle class makes it possible to handle temporary objects created by the compiler in a smooth way. TableExprNode and its derivations allow to store an expression before actually evaluating it. This also allows the classes to be used by the table expression parser defined in TableParse and TableGram.
For each operator a special derived class is implemented. Another approach could have been to store the operator as a flag and switch on that. However, that causes extra overhead and the C++ virtual function mechanism is the designed for these purposes.
Definition at line 614 of file ExprNode.h.
casacore::TableExprNode::TableExprNode | ( | ) |
casacore::TableExprNode::TableExprNode | ( | const Bool & | value | ) |
Constructors to convert a constant value to a TableExprNode.
The constructor for char* is also supported to convert a character-array to a string, since a two step conversion is not done automatically.
casacore::TableExprNode::TableExprNode | ( | const Int64 & | value | ) |
casacore::TableExprNode::TableExprNode | ( | const Int & | value | ) |
casacore::TableExprNode::TableExprNode | ( | const uInt & | value | ) |
casacore::TableExprNode::TableExprNode | ( | const Float & | value | ) |
casacore::TableExprNode::TableExprNode | ( | const Double & | value | ) |
casacore::TableExprNode::TableExprNode | ( | const Complex & | value | ) |
casacore::TableExprNode::TableExprNode | ( | const DComplex & | value | ) |
casacore::TableExprNode::TableExprNode | ( | const String & | value | ) |
casacore::TableExprNode::TableExprNode | ( | const std::string & | value | ) |
casacore::TableExprNode::TableExprNode | ( | const char * | ) |
casacore::TableExprNode::TableExprNode | ( | const Regex & | value | ) |
casacore::TableExprNode::TableExprNode | ( | const StringDistance & | value | ) |
casacore::TableExprNode::TableExprNode | ( | const TaqlRegex & | value | ) |
casacore::TableExprNode::TableExprNode | ( | const MVTime & | value | ) |
casacore::TableExprNode::TableExprNode | ( | const Array< Complex > & | value | ) |
casacore::TableExprNode::TableExprNode | ( | const Array< DComplex > & | value | ) |
casacore::TableExprNode::TableExprNode | ( | const MArray< Complex > & | value | ) |
casacore::TableExprNode::TableExprNode | ( | const MArray< DComplex > & | value | ) |
casacore::TableExprNode::TableExprNode | ( | TableExprNodeRep * | ) |
Construct a node from a node representation.
casacore::TableExprNode::TableExprNode | ( | const TableExprNode & | ) |
copy constructor (reference semantics).
casacore::TableExprNode::~TableExprNode | ( | ) |
The destructor deletes all the underlying TableExprNode objects,.
void casacore::TableExprNode::adaptUnit | ( | const Unit & | ) |
Adapt the unit of the expression to the given unit (if not empty).
Referenced by casacore::TableParseUpdate::adaptUnit().
Re-create the column object for a selection of rows.
Nothing is done if the node does not represent a column object.
Definition at line 959 of file ExprNode.h.
References casacore::TableExprNodeRep::applySelection(), and node_p.
Check if tables used in expression have the same number of rows as the given table.
static PtrBlock<TableExprNodeRep*> casacore::TableExprNode::convertBlockTEN | ( | Block< TableExprNode > & | nodes | ) | [static, private] |
convert Block of TableExprNode to PtrBlock of TableExprNodeRep*.
DataType casacore::TableExprNode::dataType | ( | ) | const |
Get the data type of the expression.
Currently the only possible values are TpBool, TpInt, TpDouble, TpDComplex, TpString, and TpOther. The latter is returned for a date or regex.
void casacore::TableExprNode::disableApplySelection | ( | ) | [inline] |
Do not apply the selection.
Definition at line 954 of file ExprNode.h.
References casacore::TableExprNodeRep::disableApplySelection(), and node_p.
static TableRecord* casacore::TableExprNode::findLastKeyRec | ( | const TableRecord & | keyset, | |
const Vector< String > & | fieldNames, | |||
String & | fullName | |||
) | [static] |
Handle all field names except the last one.
ALl of them must be records. The last record is returned. fullName is filled with the full keyword name separated by dots.
void casacore::TableExprNode::get | ( | const TableExprId & | id, | |
Array< MVTime > & | value | |||
) | const [inline] |
Definition at line 1258 of file ExprNode.h.
References casacore::MArray< T >::array(), casacore::TableExprNodeRep::getArrayDate(), and node_p.
void casacore::TableExprNode::get | ( | const TableExprId & | id, | |
Array< String > & | value | |||
) | const [inline] |
Definition at line 1255 of file ExprNode.h.
References casacore::MArray< T >::array(), casacore::TableExprNodeRep::getArrayString(), and node_p.
void casacore::TableExprNode::get | ( | const TableExprId & | id, | |
Array< DComplex > & | value | |||
) | const [inline] |
Definition at line 1252 of file ExprNode.h.
References casacore::MArray< T >::array(), casacore::TableExprNodeRep::getArrayDComplex(), and node_p.
void casacore::TableExprNode::get | ( | const TableExprId & | id, | |
Array< Double > & | value | |||
) | const [inline] |
Definition at line 1249 of file ExprNode.h.
References casacore::MArray< T >::array(), casacore::TableExprNodeRep::getArrayDouble(), and node_p.
void casacore::TableExprNode::get | ( | const TableExprId & | id, | |
Array< Int64 > & | value | |||
) | const [inline] |
Definition at line 1246 of file ExprNode.h.
References casacore::MArray< T >::array(), casacore::TableExprNodeRep::getArrayInt(), and node_p.
void casacore::TableExprNode::get | ( | const TableExprId & | id, | |
Array< Bool > & | value | |||
) | const [inline] |
Definition at line 1243 of file ExprNode.h.
References casacore::MArray< T >::array(), casacore::TableExprNodeRep::getArrayBool(), and node_p.
void casacore::TableExprNode::get | ( | const TableExprId & | id, | |
MArray< MVTime > & | value | |||
) | const [inline] |
Definition at line 1240 of file ExprNode.h.
References casacore::TableExprNodeRep::getArrayDate(), and node_p.
void casacore::TableExprNode::get | ( | const TableExprId & | id, | |
MArray< String > & | value | |||
) | const [inline] |
Definition at line 1237 of file ExprNode.h.
References casacore::TableExprNodeRep::getArrayString(), and node_p.
void casacore::TableExprNode::get | ( | const TableExprId & | id, | |
MArray< DComplex > & | value | |||
) | const [inline] |
Definition at line 1234 of file ExprNode.h.
References casacore::TableExprNodeRep::getArrayDComplex(), and node_p.
void casacore::TableExprNode::get | ( | const TableExprId & | id, | |
MArray< Double > & | value | |||
) | const [inline] |
Definition at line 1231 of file ExprNode.h.
References casacore::TableExprNodeRep::getArrayDouble(), and node_p.
void casacore::TableExprNode::get | ( | const TableExprId & | id, | |
MArray< Int64 > & | value | |||
) | const [inline] |
Definition at line 1228 of file ExprNode.h.
References casacore::TableExprNodeRep::getArrayInt(), and node_p.
void casacore::TableExprNode::get | ( | const TableExprId & | id, | |
MArray< Bool > & | value | |||
) | const [inline] |
Definition at line 1225 of file ExprNode.h.
References casacore::TableExprNodeRep::getArrayBool(), and node_p.
void casacore::TableExprNode::get | ( | const TableExprId & | id, | |
MVTime & | value | |||
) | const [inline] |
Definition at line 1223 of file ExprNode.h.
References casacore::TableExprNodeRep::getDate(), and node_p.
void casacore::TableExprNode::get | ( | const TableExprId & | id, | |
TaqlRegex & | value | |||
) | const [inline] |
Definition at line 1221 of file ExprNode.h.
References casacore::TableExprNodeRep::getRegex(), and node_p.
void casacore::TableExprNode::get | ( | const TableExprId & | id, | |
String & | value | |||
) | const [inline] |
Definition at line 1219 of file ExprNode.h.
References casacore::TableExprNodeRep::getString(), and node_p.
void casacore::TableExprNode::get | ( | const TableExprId & | id, | |
DComplex & | value | |||
) | const [inline] |
Definition at line 1217 of file ExprNode.h.
References casacore::TableExprNodeRep::getDComplex(), and node_p.
void casacore::TableExprNode::get | ( | const TableExprId & | id, | |
Double & | value | |||
) | const [inline] |
Definition at line 1215 of file ExprNode.h.
References casacore::TableExprNodeRep::getDouble(), and node_p.
void casacore::TableExprNode::get | ( | const TableExprId & | id, | |
Int64 & | value | |||
) | const [inline] |
Definition at line 1213 of file ExprNode.h.
References casacore::TableExprNodeRep::getInt(), and node_p.
void casacore::TableExprNode::get | ( | const TableExprId & | id, | |
Bool & | value | |||
) | const [inline] |
Get a value for this node in the given row.
These functions are implemented in the derived classes and will usually invoke the get in their children and apply the operator on the resulting values.
Definition at line 1211 of file ExprNode.h.
References casacore::TableExprNodeRep::getBool(), and node_p.
Array< Bool > casacore::TableExprNode::getArrayBool | ( | const TableExprId & | id | ) | const [inline] |
Definition at line 1271 of file ExprNode.h.
References casacore::MArray< T >::array(), casacore::TableExprNodeRep::getArrayBool(), and node_p.
Array< MVTime > casacore::TableExprNode::getArrayDate | ( | const TableExprId & | id | ) | const [inline] |
Definition at line 1281 of file ExprNode.h.
References casacore::MArray< T >::array(), casacore::TableExprNodeRep::getArrayDate(), and node_p.
Array< DComplex > casacore::TableExprNode::getArrayDComplex | ( | const TableExprId & | id | ) | const [inline] |
Definition at line 1277 of file ExprNode.h.
References casacore::MArray< T >::array(), casacore::TableExprNodeRep::getArrayDComplex(), and node_p.
Array< Double > casacore::TableExprNode::getArrayDouble | ( | const TableExprId & | id | ) | const [inline] |
Definition at line 1275 of file ExprNode.h.
References casacore::MArray< T >::array(), casacore::TableExprNodeRep::getArrayDouble(), and node_p.
Array< Int64 > casacore::TableExprNode::getArrayInt | ( | const TableExprId & | id | ) | const [inline] |
Definition at line 1273 of file ExprNode.h.
References casacore::MArray< T >::array(), casacore::TableExprNodeRep::getArrayInt(), and node_p.
Array< String > casacore::TableExprNode::getArrayString | ( | const TableExprId & | id | ) | const [inline] |
Definition at line 1279 of file ExprNode.h.
References casacore::MArray< T >::array(), casacore::TableExprNodeRep::getArrayString(), and node_p.
Bool casacore::TableExprNode::getBool | ( | const TableExprId & | id | ) | const [inline] |
Definition at line 1261 of file ExprNode.h.
References casacore::TableExprNodeRep::getBool(), and node_p.
MArray< Bool > casacore::TableExprNode::getBoolAS | ( | const TableExprId & | id | ) | const [inline] |
Get a value as an array, even it it is a scalar.
This is useful in case one can give an argument as scalar or array.
Definition at line 1283 of file ExprNode.h.
References casacore::TableExprNodeRep::getBoolAS(), and node_p.
Array< Bool > casacore::TableExprNode::getColumnBool | ( | const Vector< uInt > & | rownrs | ) | const [inline] |
Get the value of the expression evaluated for the entire column.
The data of function called should match the data type as returned by function getColumnDataType
.
Definition at line 1296 of file ExprNode.h.
References casacore::TableExprNodeRep::getColumnBool(), and node_p.
Array< Complex > casacore::TableExprNode::getColumnComplex | ( | const Vector< uInt > & | rownrs | ) | const [inline] |
Definition at line 1312 of file ExprNode.h.
References casacore::TableExprNodeRep::getColumnComplex(), and node_p.
DataType casacore::TableExprNode::getColumnDataType | ( | ) | const |
Get the data type for doing a getColumn on the expression.
This is the data type of the column if the expression consists of a single column only. Otherwise it is the expression data type as returned by function dataType
.
Array< DComplex > casacore::TableExprNode::getColumnDComplex | ( | const Vector< uInt > & | rownrs | ) | const [inline] |
Definition at line 1314 of file ExprNode.h.
References casacore::TableExprNodeRep::getColumnDComplex(), and node_p.
Array< Double > casacore::TableExprNode::getColumnDouble | ( | const Vector< uInt > & | rownrs | ) | const [inline] |
Definition at line 1310 of file ExprNode.h.
References casacore::TableExprNodeRep::getColumnDouble(), and node_p.
Array< Float > casacore::TableExprNode::getColumnFloat | ( | const Vector< uInt > & | rownrs | ) | const [inline] |
Definition at line 1308 of file ExprNode.h.
References casacore::TableExprNodeRep::getColumnFloat(), and node_p.
Definition at line 1304 of file ExprNode.h.
References casacore::TableExprNodeRep::getColumnInt(), and node_p.
Array< Short > casacore::TableExprNode::getColumnShort | ( | const Vector< uInt > & | rownrs | ) | const [inline] |
Definition at line 1300 of file ExprNode.h.
References casacore::TableExprNodeRep::getColumnShort(), and node_p.
Array< String > casacore::TableExprNode::getColumnString | ( | const Vector< uInt > & | rownrs | ) | const [inline] |
Definition at line 1316 of file ExprNode.h.
References casacore::TableExprNodeRep::getColumnString(), and node_p.
Array< uChar > casacore::TableExprNode::getColumnuChar | ( | const Vector< uInt > & | rownrs | ) | const [inline] |
Definition at line 1298 of file ExprNode.h.
References casacore::TableExprNodeRep::getColumnuChar(), and node_p.
Array< uInt > casacore::TableExprNode::getColumnuInt | ( | const Vector< uInt > & | rownrs | ) | const [inline] |
Definition at line 1306 of file ExprNode.h.
References casacore::TableExprNodeRep::getColumnuInt(), and node_p.
Array< uShort > casacore::TableExprNode::getColumnuShort | ( | const Vector< uInt > & | rownrs | ) | const [inline] |
Definition at line 1302 of file ExprNode.h.
References casacore::TableExprNodeRep::getColumnuShort(), and node_p.
MArray< MVTime > casacore::TableExprNode::getDateAS | ( | const TableExprId & | id | ) | const [inline] |
Definition at line 1293 of file ExprNode.h.
References casacore::TableExprNodeRep::getDateAS(), and node_p.
DComplex casacore::TableExprNode::getDComplex | ( | const TableExprId & | id | ) | const [inline] |
Definition at line 1267 of file ExprNode.h.
References casacore::TableExprNodeRep::getDComplex(), and node_p.
MArray< DComplex > casacore::TableExprNode::getDComplexAS | ( | const TableExprId & | id | ) | const [inline] |
Definition at line 1289 of file ExprNode.h.
References casacore::TableExprNodeRep::getDComplexAS(), and node_p.
Double casacore::TableExprNode::getDouble | ( | const TableExprId & | id | ) | const [inline] |
Definition at line 1265 of file ExprNode.h.
References casacore::TableExprNodeRep::getDouble(), and node_p.
MArray< Double > casacore::TableExprNode::getDoubleAS | ( | const TableExprId & | id | ) | const [inline] |
Definition at line 1287 of file ExprNode.h.
References casacore::TableExprNodeRep::getDoubleAS(), and node_p.
Int64 casacore::TableExprNode::getInt | ( | const TableExprId & | id | ) | const [inline] |
Definition at line 1263 of file ExprNode.h.
References casacore::TableExprNodeRep::getInt(), and node_p.
MArray< Int64 > casacore::TableExprNode::getIntAS | ( | const TableExprId & | id | ) | const [inline] |
Definition at line 1285 of file ExprNode.h.
References casacore::TableExprNodeRep::getIntAS(), and node_p.
const TableExprNodeRep * casacore::TableExprNode::getNodeRep | ( | ) | const [inline] |
returns const pointer to the representation-object of it
Definition at line 2168 of file ExprNode.h.
References node_p.
TableExprNodeRep * casacore::TableExprNode::getRep | ( | ) | [inline, private] |
returns non-const pointer to the representation-object of it
Definition at line 2172 of file ExprNode.h.
References node_p.
String casacore::TableExprNode::getString | ( | const TableExprId & | id | ) | const [inline] |
Definition at line 1269 of file ExprNode.h.
References casacore::TableExprNodeRep::getString(), and node_p.
MArray< String > casacore::TableExprNode::getStringAS | ( | const TableExprId & | id | ) | const [inline] |
Definition at line 1291 of file ExprNode.h.
References casacore::TableExprNodeRep::getStringAS(), and node_p.
TableExprNode casacore::TableExprNode::in | ( | const TableExprNodeSet & | set, | |
const TaQLStyle & | = TaQLStyle(0) | |||
) | const |
TableExprNode casacore::TableExprNode::in | ( | const TableExprNode & | array, | |
const TaQLStyle & | style = TaQLStyle(0) | |||
) | const [inline] |
The IN operator to test if a value is contained in an array or set.
The array can also be a scalar.
Definition at line 1390 of file ExprNode.h.
Bool casacore::TableExprNode::isNull | ( | ) | const [inline] |
Does the node contain no actual node?
Definition at line 950 of file ExprNode.h.
References node_p.
Referenced by casacore::TaQLResult::isTable().
Bool casacore::TableExprNode::isScalar | ( | ) | const [inline] |
Is the expression a scalar?
Definition at line 973 of file ExprNode.h.
References node_p, casacore::TableExprNodeRep::valueType(), and casacore::TableExprNodeRep::VTScalar.
TableExprNodeRep* casacore::TableExprNode::newAND | ( | TableExprNodeRep * | right | ) | const [private] |
static TableExprNode casacore::TableExprNode::newArrayPartNode | ( | const TableExprNode & | arrayNode, | |
const TableExprNodeSet & | indices, | |||
const TaQLStyle & | = TaQLStyle(0) | |||
) | [static] |
Create ArrayElement node for the given array with the given index.
The origin is 0 for C++ and 1 for TaQL.
Referenced by operator()().
TableExprNodeRep* casacore::TableExprNode::newBitAnd | ( | TableExprNodeRep * | right | ) | const [private] |
Referenced by casacore::operator&().
TableExprNodeRep* casacore::TableExprNode::newBitOr | ( | TableExprNodeRep * | right | ) | const [private] |
Referenced by casacore::operator|().
TableExprNodeRep* casacore::TableExprNode::newBitXor | ( | TableExprNodeRep * | right | ) | const [private] |
Referenced by casacore::operator^().
static TableExprNode casacore::TableExprNode::newColumnNode | ( | const Table & | tab, | |
const String & | name, | |||
const Vector< String > & | fieldNames | |||
) | [static] |
Create a column node on behalf of the Table class.
For builtin data types another type of node is created than for other data types. isArray indicates if the column should be an array column.
static TableExprNode casacore::TableExprNode::newConeNode | ( | TableExprFuncNode::FunctionType | , | |
const TableExprNode & | node1, | |||
const TableExprNode & | node2, | |||
const TableExprNode & | node3 | |||
) | [static] |
static TableExprNode casacore::TableExprNode::newConeNode | ( | TableExprFuncNode::FunctionType | , | |
const TableExprNode & | node1, | |||
const TableExprNode & | node2 | |||
) | [static] |
static TableExprNode casacore::TableExprNode::newConeNode | ( | TableExprFuncNode::FunctionType | , | |
const TableExprNodeSet & | set, | |||
uInt | origin = 0 | |||
) | [static] |
Create cone function node of the given type with the given arguments.
Referenced by casacore::anyCone(), casacore::cones(), and casacore::findCone().
TableExprNodeRep* casacore::TableExprNode::newDivide | ( | TableExprNodeRep * | right | ) | const [private] |
Referenced by casacore::operator/().
TableExprNodeRep* casacore::TableExprNode::newEQ | ( | TableExprNodeRep * | right | ) | const [private] |
Referenced by casacore::operator==().
static TableExprNode casacore::TableExprNode::newFunctionNode | ( | TableExprFuncNode::FunctionType | , | |
const TableExprNode & | array, | |||
const TableExprNode & | node, | |||
const TableExprNodeSet & | axes | |||
) | [static] |
static TableExprNode casacore::TableExprNode::newFunctionNode | ( | TableExprFuncNode::FunctionType | , | |
const TableExprNode & | array, | |||
const TableExprNodeSet & | axes | |||
) | [static] |
static TableExprNode casacore::TableExprNode::newFunctionNode | ( | TableExprFuncNode::FunctionType | , | |
const TableExprNode & | node1, | |||
const TableExprNode & | node2, | |||
const TableExprNode & | node3 | |||
) | [static] |
static TableExprNode casacore::TableExprNode::newFunctionNode | ( | TableExprFuncNode::FunctionType | , | |
const TableExprNode & | node1, | |||
const TableExprNode & | node2 | |||
) | [static] |
static TableExprNode casacore::TableExprNode::newFunctionNode | ( | TableExprFuncNode::FunctionType | , | |
const TableExprNode & | node | |||
) | [static] |
static TableExprNode casacore::TableExprNode::newFunctionNode | ( | TableExprFuncNode::FunctionType | , | |
const TableExprNodeSet & | set, | |||
const Table & | table, | |||
const TaQLStyle & | = TaQLStyle(0) | |||
) | [static] |
Create function node of the given type with the given arguments.
Referenced by casacore::abs(), casacore::acos(), casacore::all(), casacore::alls(), casacore::amplitude(), casacore::angdist(), casacore::angdistx(), casacore::any(), casacore::anys(), casacore::arg(), casacore::array(), casacore::arrayData(), casacore::arrayFlatten(), casacore::arrayMask(), casacore::asin(), casacore::atan(), casacore::atan2(), casacore::avdev(), casacore::avdevs(), casacore::boolean(), casacore::boxedAll(), casacore::boxedAny(), casacore::boxedAvdev(), casacore::boxedMax(), casacore::boxedMean(), casacore::boxedMedian(), casacore::boxedMin(), casacore::boxedRms(), casacore::boxedStddev(), casacore::boxedVariance(), casacore::capitalize(), casacore::cdate(), casacore::cdow(), casacore::ceil(), casacore::cmonth(), casacore::conj(), casacore::cos(), casacore::cosh(), casacore::ctime(), casacore::ctodt(), casacore::cube(), casacore::date(), casacore::datetime(), casacore::day(), casacore::diagonal(), casacore::dms(), casacore::downcase(), casacore::exp(), casacore::floor(), casacore::fmod(), casacore::formComplex(), casacore::fractile(), casacore::fractiles(), casacore::hdms(), casacore::hms(), casacore::iif(), casacore::imag(), casacore::integer(), casacore::isdefined(), casacore::isFinite(), casacore::isInf(), casacore::isNaN(), casacore::log(), casacore::log10(), casacore::ltrim(), casacore::marray(), casacore::max(), casacore::maxs(), casacore::mean(), casacore::means(), casacore::median(), casacore::medians(), casacore::min(), casacore::mins(), casacore::mjd(), casacore::mjdtodate(), casacore::month(), casacore::ndim(), casacore::near(), casacore::nearAbs(), casacore::nelements(), casacore::nfalse(), casacore::nfalses(), casacore::norm(), casacore::ntrue(), casacore::ntrues(), casacore::pattern(), casacore::phase(), casacore::pow(), casacore::product(), casacore::products(), casacore::real(), casacore::regex(), casacore::replace(), casacore::rms(), casacore::rmss(), casacore::round(), casacore::rtrim(), casacore::runningAll(), casacore::runningAny(), casacore::runningAvdev(), casacore::runningMax(), casacore::runningMean(), casacore::runningMedian(), casacore::runningMin(), casacore::runningRms(), casacore::runningStddev(), casacore::runningVariance(), casacore::shape(), casacore::sign(), casacore::sin(), casacore::sinh(), casacore::sqlpattern(), casacore::sqrt(), casacore::square(), casacore::stddev(), casacore::stddevs(), casacore::strlength(), casacore::substr(), casacore::sum(), casacore::sums(), casacore::sumSquare(), casacore::sumSquares(), casacore::tan(), casacore::tanh(), casacore::time(), casacore::toString(), casacore::transpose(), casacore::trim(), casacore::upcase(), casacore::variance(), casacore::variances(), casacore::week(), casacore::weekday(), and casacore::year().
TableExprNodeRep* casacore::TableExprNode::newGE | ( | TableExprNodeRep * | right | ) | const [private] |
Referenced by casacore::operator<=(), and casacore::operator>=().
TableExprNodeRep* casacore::TableExprNode::newGT | ( | TableExprNodeRep * | right | ) | const [private] |
Referenced by casacore::operator<(), and casacore::operator>().
TableExprNodeRep* casacore::TableExprNode::newIN | ( | TableExprNodeRep * | right, | |
const TaQLStyle & | ||||
) | const [private] |
Referenced by in().
static TableExprNode casacore::TableExprNode::newKeyConst | ( | const TableRecord & | , | |
const Vector< String > & | fieldNames | |||
) | [static] |
Create a TableExprNodeConst for a table keyword (which is handled as a constant).
TableExprNodeRep* casacore::TableExprNode::newMinus | ( | TableExprNodeRep * | right | ) | const [private] |
Referenced by casacore::operator-().
TableExprNodeRep* casacore::TableExprNode::newModulo | ( | TableExprNodeRep * | right | ) | const [private] |
Referenced by casacore::operator%().
TableExprNodeRep* casacore::TableExprNode::newNE | ( | TableExprNodeRep * | right | ) | const [private] |
Referenced by casacore::operator!=().
TableExprNodeRep* casacore::TableExprNode::newOR | ( | TableExprNodeRep * | right | ) | const [private] |
TableExprNodeRep* casacore::TableExprNode::newPlus | ( | TableExprNodeRep * | right | ) | const [private] |
Construct a new node for the given operation.
Referenced by casacore::operator+().
static TableExprNode casacore::TableExprNode::newRandomNode | ( | const Table & | table | ) | [static] |
Create rand() function node.
static TableExprNode casacore::TableExprNode::newRowidNode | ( | const Table & | table | ) | [static] |
Create rowid() function node.
Origin is always 0.
static TableExprNode casacore::TableExprNode::newRownrNode | ( | const Table & | table, | |
uInt | origin | |||
) | [static] |
Create rownumber() function node.
Origin indicates whether the first row should be zero (for C++ binding) or an other value (one for TaQL binding).
TableExprNodeRep* casacore::TableExprNode::newTimes | ( | TableExprNodeRep * | right | ) | const [private] |
Referenced by casacore::operator*().
static TableExprNode casacore::TableExprNode::newUDFNode | ( | const String & | name, | |
const TableExprNodeSet & | set, | |||
const Table & | table, | |||
const TaQLStyle & | = TaQLStyle(0) | |||
) | [static] |
Create a user defined function node.
uInt casacore::TableExprNode::nrow | ( | ) | const [inline] |
Get the number of rows in the table associated with this expression.
One is returned if the expression is a constant. Zero is returned if no table is associated with it.
Definition at line 979 of file ExprNode.h.
References node_p, and casacore::TableExprNodeRep::nrow().
TableExprNode casacore::TableExprNode::operator! | ( | ) | const |
Unary NOT-operator on boolean TableExprNode's.
TableExprNode casacore::TableExprNode::operator() | ( | const TableExprNodeSet & | indices | ) | [inline] |
Slicing in a node containing an array.
It is possible to address a single pixel or an n-dimensional subarray. In case of a single pixel the result is a scalar node. Otherwise the result is an array node with the same dimensionality as the source.
Note that there exist TableExprNodeSet constructors to convert an IPosition
or Slicer
object automatically to a TableExprNodeSet
. An IPosition
addresses a single element and results in a scalar node, while a Slicer
can address multiple elements and always results in an array node.
C++ indexing is 0-based.
Definition at line 1395 of file ExprNode.h.
References newArrayPartNode().
TableExprNode casacore::TableExprNode::operator+ | ( | ) | const |
Unary operators on numeric TableExprNode's.
TableExprNode casacore::TableExprNode::operator- | ( | ) | const |
TableExprNode& casacore::TableExprNode::operator= | ( | const TableExprNode & | ) |
Assignment (reference semantics).
TableExprNode casacore::TableExprNode::operator~ | ( | ) | const |
Unary bitwise negate-operator on integer TableExprNode's.
void casacore::TableExprNode::ranges | ( | Block< TableExprRange > & | blrange | ) | [inline] |
Convert the tree to a number of range vectors which at least select the same things.
This function is very useful to convert the expression to some intervals covering the select expression. This can be used to do a rough fast selection via an index and do the the slower final selection on that much smaller subset. The function can only convert direct comparisons of columns with constants (via ==, !=, >, >=, < or <=) and their combinations using && or ||.
Definition at line 1203 of file ExprNode.h.
References node_p, and casacore::TableExprNodeRep::ranges().
void casacore::TableExprNode::show | ( | ostream & | os | ) | const [inline] |
Show the tree.
Definition at line 2164 of file ExprNode.h.
References node_p, and casacore::TableExprNodeRep::show().
const Table & casacore::TableExprNode::table | ( | ) | const [inline] |
Get table.
This gets the Table object to which a TableExprNode belongs. A TableExprNode belongs to the Table to which the column(s) used in an expression belong. Note that all columns in an expression have to belong to the same table.
Definition at line 1207 of file ExprNode.h.
References node_p, and casacore::TableExprNodeRep::table().
static void casacore::TableExprNode::throwInvDT | ( | const String & | message | ) | [static] |
Throw invalid data type exception.
const Unit& casacore::TableExprNode::unit | ( | ) | const [inline] |
Get the unit of the expression.
Definition at line 963 of file ExprNode.h.
References node_p, and casacore::TableExprNodeRep::unit().
TableExprNode casacore::TableExprNode::useUnit | ( | const Unit & | unit | ) | const |
Use a unit for the given TableExprNode.
Note that if a column has a unit, it is automatically set. In that case this can be used to convert units.
TableExprNode abs | ( | const TableExprNode & | node | ) | [friend] |
TableExprNode acos | ( | const TableExprNode & | node | ) | [friend] |
TableExprNode all | ( | const TableExprNode & | array | ) | [friend] |
TableExprNode alls | ( | const TableExprNode & | array, | |
const TableExprNodeSet & | collapseAxes | |||
) | [friend] |
TableExprNode amplitude | ( | const TableExprNode & | node | ) | [friend] |
TableExprNode angdist | ( | const TableExprNode & | pos1, | |
const TableExprNode & | pos2 | |||
) | [friend] |
TableExprNode any | ( | const TableExprNode & | array | ) | [friend] |
TableExprNode anyCone | ( | const TableExprNode & | sourcePos, | |
const TableExprNode & | conePos, | |||
const TableExprNode & | radii | |||
) | [friend] |
TableExprNode anyCone | ( | const TableExprNode & | sourcePos, | |
const TableExprNode & | cones | |||
) | [friend] |
TableExprNode anys | ( | const TableExprNode & | array, | |
const TableExprNodeSet & | collapseAxes | |||
) | [friend] |
TableExprNode arg | ( | const TableExprNode & | node | ) | [friend] |
TableExprNode array | ( | const TableExprNode & | values, | |
const TableExprNodeSet & | shape | |||
) | [friend] |
TableExprNode arrayData | ( | const TableExprNode & | array | ) | [friend] |
TableExprNode arrayFlatten | ( | const TableExprNode & | array | ) | [friend] |
TableExprNode arrayMask | ( | const TableExprNode & | array | ) | [friend] |
TableExprNode asin | ( | const TableExprNode & | node | ) | [friend] |
TableExprNode atan | ( | const TableExprNode & | node | ) | [friend] |
TableExprNode atan2 | ( | const TableExprNode & | y, | |
const TableExprNode & | x | |||
) | [friend] |
TableExprNode avdev | ( | const TableExprNode & | array | ) | [friend] |
TableExprNode avdevs | ( | const TableExprNode & | array, | |
const TableExprNodeSet & | collapseAxes | |||
) | [friend] |
TableExprNode boolean | ( | const TableExprNode & | node | ) | [friend] |
TableExprNode capitalize | ( | const TableExprNode & | node | ) | [friend] |
TableExprNode cdate | ( | const TableExprNode & | node | ) | [friend] |
TableExprNode cdow | ( | const TableExprNode & | node | ) | [friend] |
TableExprNode ceil | ( | const TableExprNode & | node | ) | [friend] |
TableExprNode cmonth | ( | const TableExprNode & | node | ) | [friend] |
TableExprNode cones | ( | const TableExprNode & | sourcePos, | |
const TableExprNode & | conePos, | |||
const TableExprNode & | radii | |||
) | [friend] |
TableExprNode cones | ( | const TableExprNode & | sourcePos, | |
const TableExprNode & | cones | |||
) | [friend] |
TableExprNode conj | ( | const TableExprNode & | node | ) | [friend] |
TableExprNode cos | ( | const TableExprNode & | node | ) | [friend] |
TableExprNode cosh | ( | const TableExprNode & | node | ) | [friend] |
TableExprNode ctime | ( | const TableExprNode & | node | ) | [friend] |
TableExprNode ctodt | ( | const TableExprNode & | node | ) | [friend] |
TableExprNode cube | ( | const TableExprNode & | node | ) | [friend] |
TableExprNode date | ( | const TableExprNode & | node | ) | [friend] |
TableExprNode datetime | ( | const TableExprNode & | node | ) | [friend] |
TableExprNode day | ( | const TableExprNode & | node | ) | [friend] |
TableExprNode diagonal | ( | const TableExprNode & | array, | |
const TableExprNode & | firstAxis, | |||
const TableExprNode & | diag | |||
) | [friend] |
TableExprNode diagonal | ( | const TableExprNode & | array, | |
const TableExprNode & | firstAxis | |||
) | [friend] |
TableExprNode diagonal | ( | const TableExprNode & | array | ) | [friend] |
TableExprNode downcase | ( | const TableExprNode & | node | ) | [friend] |
TableExprNode exp | ( | const TableExprNode & | node | ) | [friend] |
TableExprNode findCone | ( | const TableExprNode & | sourcePos, | |
const TableExprNode & | conePos, | |||
const TableExprNode & | radii | |||
) | [friend] |
TableExprNode findCone | ( | const TableExprNode & | sourcePos, | |
const TableExprNode & | cones | |||
) | [friend] |
TableExprNode floor | ( | const TableExprNode & | node | ) | [friend] |
TableExprNode fmod | ( | const TableExprNode & | x, | |
const TableExprNode & | y | |||
) | [friend] |
TableExprNode formComplex | ( | const TableExprNode & | node | ) | [friend] |
TableExprNode formComplex | ( | const TableExprNode & | real, | |
const TableExprNode & | imag | |||
) | [friend] |
TableExprNode fractile | ( | const TableExprNode & | array, | |
const TableExprNode & | fraction | |||
) | [friend] |
TableExprNode fractiles | ( | const TableExprNode & | array, | |
const TableExprNode & | fraction, | |||
const TableExprNodeSet & | collapseAxes | |||
) | [friend] |
TableExprNode iif | ( | const TableExprNode & | condition, | |
const TableExprNode & | arg1, | |||
const TableExprNode & | arg2 | |||
) | [friend] |
TableExprNode imag | ( | const TableExprNode & | node | ) | [friend] |
TableExprNode integer | ( | const TableExprNode & | node | ) | [friend] |
TableExprNode isdefined | ( | const TableExprNode & | array | ) | [friend] |
TableExprNode isFinite | ( | const TableExprNode & | node | ) | [friend] |
TableExprNode isNaN | ( | const TableExprNode & | node | ) | [friend] |
TableExprNode log | ( | const TableExprNode & | node | ) | [friend] |
TableExprNode log10 | ( | const TableExprNode & | node | ) | [friend] |
TableExprNode ltrim | ( | const TableExprNode & | node | ) | [friend] |
TableExprNode marray | ( | const TableExprNode & | array, | |
const TableExprNode & | mask | |||
) | [friend] |
TableExprNode max | ( | const TableExprNode & | array | ) | [friend] |
TableExprNode max | ( | const TableExprNode & | a, | |
const TableExprNode & | b | |||
) | [friend] |
TableExprNode maxs | ( | const TableExprNode & | array, | |
const TableExprNodeSet & | collapseAxes | |||
) | [friend] |
TableExprNode mean | ( | const TableExprNode & | array | ) | [friend] |
TableExprNode means | ( | const TableExprNode & | array, | |
const TableExprNodeSet & | collapseAxes | |||
) | [friend] |
TableExprNode median | ( | const TableExprNode & | array | ) | [friend] |
TableExprNode medians | ( | const TableExprNode & | array, | |
const TableExprNodeSet & | collapseAxes | |||
) | [friend] |
TableExprNode min | ( | const TableExprNode & | array | ) | [friend] |
TableExprNode min | ( | const TableExprNode & | a, | |
const TableExprNode & | b | |||
) | [friend] |
TableExprNode mins | ( | const TableExprNode & | array, | |
const TableExprNodeSet & | collapseAxes | |||
) | [friend] |
TableExprNode mjd | ( | const TableExprNode & | node | ) | [friend] |
TableExprNode mjdtodate | ( | const TableExprNode & | node | ) | [friend] |
TableExprNode month | ( | const TableExprNode & | node | ) | [friend] |
TableExprNode ndim | ( | const TableExprNode & | array | ) | [friend] |
TableExprNode near | ( | const TableExprNode & | left, | |
const TableExprNode & | right, | |||
const TableExprNode & | tolerance | |||
) | [friend] |
TableExprNode near | ( | const TableExprNode & | left, | |
const TableExprNode & | right | |||
) | [friend] |
TableExprNode nearAbs | ( | const TableExprNode & | left, | |
const TableExprNode & | right, | |||
const TableExprNode & | tolerance | |||
) | [friend] |
TableExprNode nearAbs | ( | const TableExprNode & | left, | |
const TableExprNode & | right | |||
) | [friend] |
TableExprNode nelements | ( | const TableExprNode & | array | ) | [friend] |
TableExprNode nfalse | ( | const TableExprNode & | array | ) | [friend] |
TableExprNode nfalses | ( | const TableExprNode & | array, | |
const TableExprNodeSet & | collapseAxes | |||
) | [friend] |
TableExprNode norm | ( | const TableExprNode & | node | ) | [friend] |
TableExprNode ntrue | ( | const TableExprNode & | array | ) | [friend] |
TableExprNode ntrues | ( | const TableExprNode & | array, | |
const TableExprNodeSet & | collapseAxes | |||
) | [friend] |
TableExprNode operator!= | ( | const TableExprNode & | left, | |
const TableExprNode & | right | |||
) | [friend] |
TableExprNode operator% | ( | const TableExprNode & | left, | |
const TableExprNode & | right | |||
) | [friend] |
TableExprNode operator& | ( | const TableExprNode & | left, | |
const TableExprNode & | right | |||
) | [friend] |
TableExprNode operator&& | ( | const TableExprNode & | left, | |
const TableExprNode & | right | |||
) | [friend] |
TableExprNode operator* | ( | const TableExprNode & | left, | |
const TableExprNode & | right | |||
) | [friend] |
TableExprNode operator+ | ( | const TableExprNode & | left, | |
const TableExprNode & | right | |||
) | [friend] |
Define all global functions as friends.
TableExprNode operator- | ( | const TableExprNode & | left, | |
const TableExprNode & | right | |||
) | [friend] |
TableExprNode operator/ | ( | const TableExprNode & | left, | |
const TableExprNode & | right | |||
) | [friend] |
TableExprNode operator< | ( | const TableExprNode & | left, | |
const TableExprNode & | right | |||
) | [friend] |
TableExprNode operator<= | ( | const TableExprNode & | left, | |
const TableExprNode & | right | |||
) | [friend] |
TableExprNode operator== | ( | const TableExprNode & | left, | |
const TableExprNode & | right | |||
) | [friend] |
TableExprNode operator> | ( | const TableExprNode & | left, | |
const TableExprNode & | right | |||
) | [friend] |
TableExprNode operator>= | ( | const TableExprNode & | left, | |
const TableExprNode & | right | |||
) | [friend] |
TableExprNode operator^ | ( | const TableExprNode & | left, | |
const TableExprNode & | right | |||
) | [friend] |
TableExprNode operator| | ( | const TableExprNode & | left, | |
const TableExprNode & | right | |||
) | [friend] |
TableExprNode operator|| | ( | const TableExprNode & | left, | |
const TableExprNode & | right | |||
) | [friend] |
TableExprNode pattern | ( | const TableExprNode & | node | ) | [friend] |
TableExprNode phase | ( | const TableExprNode & | node | ) | [friend] |
TableExprNode pow | ( | const TableExprNode & | x, | |
const TableExprNode & | exp | |||
) | [friend] |
TableExprNode product | ( | const TableExprNode & | array | ) | [friend] |
TableExprNode products | ( | const TableExprNode & | array, | |
const TableExprNodeSet & | collapseAxes | |||
) | [friend] |
TableExprNode real | ( | const TableExprNode & | node | ) | [friend] |
TableExprNode regex | ( | const TableExprNode & | node | ) | [friend] |
TableExprNode replace | ( | const TableExprNode & | str, | |
const TableExprNode & | patt, | |||
const TableExprNode & | repl | |||
) | [friend] |
TableExprNode replace | ( | const TableExprNode & | str, | |
const TableExprNode & | patt | |||
) | [friend] |
TableExprNode rms | ( | const TableExprNode & | array | ) | [friend] |
TableExprNode rmss | ( | const TableExprNode & | array, | |
const TableExprNodeSet & | collapseAxes | |||
) | [friend] |
TableExprNode round | ( | const TableExprNode & | node | ) | [friend] |
TableExprNode rtrim | ( | const TableExprNode & | node | ) | [friend] |
TableExprNode runningAll | ( | const TableExprNode & | array | ) | [friend] |
TableExprNode runningAny | ( | const TableExprNode & | array | ) | [friend] |
TableExprNode runningAvdev | ( | const TableExprNode & | array | ) | [friend] |
TableExprNode runningMax | ( | const TableExprNode & | array | ) | [friend] |
TableExprNode runningMean | ( | const TableExprNode & | array | ) | [friend] |
TableExprNode runningMedian | ( | const TableExprNode & | array | ) | [friend] |
TableExprNode runningMin | ( | const TableExprNode & | array | ) | [friend] |
TableExprNode runningRms | ( | const TableExprNode & | array | ) | [friend] |
TableExprNode runningStddev | ( | const TableExprNode & | array | ) | [friend] |
TableExprNode runningVariance | ( | const TableExprNode & | array | ) | [friend] |
TableExprNode shape | ( | const TableExprNode & | array | ) | [friend] |
TableExprNode sign | ( | const TableExprNode & | node | ) | [friend] |
TableExprNode sin | ( | const TableExprNode & | node | ) | [friend] |
TableExprNode sinh | ( | const TableExprNode & | node | ) | [friend] |
TableExprNode sqlpattern | ( | const TableExprNode & | node | ) | [friend] |
TableExprNode sqrt | ( | const TableExprNode & | node | ) | [friend] |
TableExprNode square | ( | const TableExprNode & | node | ) | [friend] |
TableExprNode stddev | ( | const TableExprNode & | array | ) | [friend] |
TableExprNode stddevs | ( | const TableExprNode & | array, | |
const TableExprNodeSet & | collapseAxes | |||
) | [friend] |
TableExprNode strlength | ( | const TableExprNode & | node | ) | [friend] |
TableExprNode substr | ( | const TableExprNode & | str, | |
const TableExprNode & | pos, | |||
const TableExprNode & | npos | |||
) | [friend] |
TableExprNode substr | ( | const TableExprNode & | str, | |
const TableExprNode & | pos | |||
) | [friend] |
TableExprNode sum | ( | const TableExprNode & | array | ) | [friend] |
TableExprNode sums | ( | const TableExprNode & | array, | |
const TableExprNodeSet & | collapseAxes | |||
) | [friend] |
TableExprNode sumSquare | ( | const TableExprNode & | array | ) | [friend] |
TableExprNode sumSquares | ( | const TableExprNode & | array, | |
const TableExprNodeSet & | collapseAxes | |||
) | [friend] |
friend class TableExprNodeRep [friend] |
Definition at line 617 of file ExprNode.h.
friend class TableParse [friend] |
Definition at line 618 of file ExprNode.h.
TableExprNode tan | ( | const TableExprNode & | node | ) | [friend] |
TableExprNode tanh | ( | const TableExprNode & | node | ) | [friend] |
TableExprNode time | ( | const TableExprNode & | node | ) | [friend] |
TableExprNode transpose | ( | const TableExprNode & | array, | |
const TableExprNodeSet & | axes | |||
) | [friend] |
TableExprNode transpose | ( | const TableExprNode & | array | ) | [friend] |
TableExprNode trim | ( | const TableExprNode & | node | ) | [friend] |
TableExprNode upcase | ( | const TableExprNode & | node | ) | [friend] |
TableExprNode variance | ( | const TableExprNode & | array | ) | [friend] |
TableExprNode variances | ( | const TableExprNode & | array, | |
const TableExprNodeSet & | collapseAxes | |||
) | [friend] |
TableExprNode week | ( | const TableExprNode & | node | ) | [friend] |
TableExprNode weekday | ( | const TableExprNode & | node | ) | [friend] |
TableExprNode year | ( | const TableExprNode & | node | ) | [friend] |
TableExprNodeRep* casacore::TableExprNode::node_p [private] |
The actual (counted referenced) representation of a node.
Definition at line 1198 of file ExprNode.h.
Referenced by applySelection(), disableApplySelection(), get(), getArrayBool(), getArrayDate(), getArrayDComplex(), getArrayDouble(), getArrayInt(), getArrayString(), getBool(), getBoolAS(), getColumnBool(), getColumnComplex(), getColumnDComplex(), getColumnDouble(), getColumnFloat(), getColumnInt(), getColumnShort(), getColumnString(), getColumnuChar(), getColumnuInt(), getColumnuShort(), getDateAS(), getDComplex(), getDComplexAS(), getDouble(), getDoubleAS(), getInt(), getIntAS(), getNodeRep(), getRep(), getString(), getStringAS(), in(), isNull(), isScalar(), nrow(), casacore::operator!=(), casacore::operator%(), casacore::operator&(), casacore::operator*(), casacore::operator+(), casacore::operator-(), casacore::operator/(), casacore::operator<(), casacore::operator<=(), casacore::operator==(), casacore::operator>(), casacore::operator>=(), casacore::operator^(), casacore::operator|(), ranges(), show(), table(), and unit().