ExprFuncNodeArray.h

Classes

TableExprFuncNodeArray -- Class representing an array function in table select expression (full description)

class TableExprFuncNodeArray : public TableExprNodeArray

Interface

Public Members
TableExprFuncNodeArray (TableExprFuncNode::FunctionType, NodeDataType, ValueType, const TableExprNodeSet& source, uInt origin)
~TableExprFuncNodeArray()
virtual Array<Bool> getArrayBool (const TableExprId& id)
virtual Array<Double> getArrayDouble (const TableExprId& id)
virtual Array<DComplex> getArrayDComplex (const TableExprId& id)
virtual Array<String> getArrayString (const TableExprId& id)
virtual Array<MVTime> getArrayDate (const TableExprId& id)
const TableExprFuncNode* getChild() const
static TableExprNodeRep* fillNode (TableExprFuncNodeArray* thisNode, PtrBlock<TableExprNodeRep*>& nodes, const Block<Int>& dtypeOper)
Private Members
void tryToConst()
PtrBlock<TableExprNodeRep*> operands()
TableExprFuncNode::FunctionType funcType() const
NodeDataType argDataType() const
const IPosition& getCollapseAxes (const TableExprId& id, Int ndim, uInt axarg=1)
const IPosition& getArrayShape (const TableExprId& id, uInt axarg=1)

Description

Review Status

Reviewed By:
UNKNOWN
Date Reviewed:
before2004/08/25

Prerequisite

Synopsis

This class can be seen as a specialization of TableExprFuncNode for functions returning arrays. However, it is derived from TableExprNodeArray to make it possible that the ExprNode classes use all array functionality offered by that base class.
Internally an TableExprFuncNode object is used.

When a TaQL function is used, TableExprFuncNode::checkOperands determines whether the result is a scalar or an array. Thereafter TableExprNode::newFunctionNode creates a TableExprFuncNode for scalars or a TableExprFuncNodeArray for arrays.

Member Description

TableExprFuncNodeArray (TableExprFuncNode::FunctionType, NodeDataType, ValueType, const TableExprNodeSet& source, uInt origin)

Constructor

~TableExprFuncNodeArray()

Destructor

virtual Array<Bool> getArrayBool (const TableExprId& id)
virtual Array<Double> getArrayDouble (const TableExprId& id)
virtual Array<DComplex> getArrayDComplex (const TableExprId& id)
virtual Array<String> getArrayString (const TableExprId& id)
virtual Array<MVTime> getArrayDate (const TableExprId& id)

'get' Functions to get the desired result of a function

const TableExprFuncNode* getChild() const

Get the function node.

static TableExprNodeRep* fillNode (TableExprFuncNodeArray* thisNode, PtrBlock<TableExprNodeRep*>& nodes, const Block<Int>& dtypeOper)

Link the children to the node and convert the children to constants if possible. Also convert the node to constant if possible.

void tryToConst()

Try if the function gives a constant result. If so, set the expression type to Constant.

PtrBlock<TableExprNodeRep*> operands()
TableExprFuncNode::FunctionType funcType() const
NodeDataType argDataType() const

Some functions to be used by TableExprNodeFuncArray.

const IPosition& getCollapseAxes (const TableExprId& id, Int ndim, uInt axarg=1)

Get the collapseAxes for the partial functions. It compares the values with the #dim and removes them if too high. axarg gives the argument nr of the axes.

const IPosition& getArrayShape (const TableExprId& id, uInt axarg=1)

Get the shape for the array function. axarg gives the argument nr of the shape.