casa::TableExprFuncNodeArray Class Reference
[Tables_internal_classes]

#include <ExprFuncNodeArray.h>

Inheritance diagram for casa::TableExprFuncNodeArray:

Inheritance graph
[legend]
Collaboration diagram for casa::TableExprFuncNodeArray:

Collaboration graph
[legend]
List of all members.

Detailed Description

Class representing an array function in table select expression.

Intended use:

Internal

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.

Definition at line 69 of file ExprFuncNodeArray.h.

Public Member Functions

 TableExprFuncNodeArray (TableExprFuncNode::FunctionType, NodeDataType, ValueType, const TableExprNodeSet &source, const TaQLStyle &)
 Constructor.
 ~TableExprFuncNodeArray ()
 Destructor.
const TableExprFuncNodegetChild () const
 Get the function node.
virtual Array< BoolgetArrayBool (const TableExprId &id)
 'get' Functions to get the desired result of a function
virtual Array< DoublegetArrayDouble (const TableExprId &id)
virtual Array< DComplex > getArrayDComplex (const TableExprId &id)
 The default implementation of getArrayDComplex does getArrayDouble and converts the result.
virtual Array< StringgetArrayString (const TableExprId &id)
virtual Array< MVTimegetArrayDate (const TableExprId &id)

Static Public Member Functions

static TableExprNodeRepfillNode (TableExprFuncNodeArray *thisNode, PtrBlock< TableExprNodeRep * > &nodes, const Block< Int > &dtypeOper)
 Link the children to the node and convert the children to constants if possible.

Private Member Functions

void tryToConst ()
 Try if the function gives a constant result.
const IPositiongetCollapseAxes (const TableExprId &id, Int ndim, uInt axarg=1)
 Get the collapseAxes for the partial functions.
const IPositiongetArrayShape (const TableExprId &id, uInt axarg=1)
 Get the shape for the array function.
PtrBlock< TableExprNodeRep * > operands ()
 Some functions to be used by TableExprNodeFuncArray.
TableExprFuncNode::FunctionType funcType () const
NodeDataType argDataType () const

Private Attributes

TableExprFuncNode node_p
Int origin_p
Bool isCOrder_p
Bool constAxes_p
IPosition ipos_p
IPosition iposN_p
IPosition corrCollAxes_p
uInt lastNdim_p


Constructor & Destructor Documentation

casa::TableExprFuncNodeArray::TableExprFuncNodeArray ( TableExprFuncNode::FunctionType  ,
NodeDataType  ,
ValueType  ,
const TableExprNodeSet source,
const TaQLStyle  
)

Constructor.

casa::TableExprFuncNodeArray::~TableExprFuncNodeArray (  ) 

Destructor.


Member Function Documentation

virtual Array<Bool> casa::TableExprFuncNodeArray::getArrayBool ( const TableExprId id  )  [virtual]

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

Reimplemented from casa::TableExprNodeRep.

virtual Array<Double> casa::TableExprFuncNodeArray::getArrayDouble ( const TableExprId id  )  [virtual]

Reimplemented from casa::TableExprNodeRep.

virtual Array<DComplex> casa::TableExprFuncNodeArray::getArrayDComplex ( const TableExprId id  )  [virtual]

The default implementation of getArrayDComplex does getArrayDouble and converts the result.

Reimplemented from casa::TableExprNodeArray.

virtual Array<String> casa::TableExprFuncNodeArray::getArrayString ( const TableExprId id  )  [virtual]

Reimplemented from casa::TableExprNodeRep.

virtual Array<MVTime> casa::TableExprFuncNodeArray::getArrayDate ( const TableExprId id  )  [virtual]

Reimplemented from casa::TableExprNodeRep.

const TableExprFuncNode* casa::TableExprFuncNodeArray::getChild (  )  const [inline]

Get the function node.

Definition at line 91 of file ExprFuncNodeArray.h.

References node_p.

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

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

Also convert the node to constant if possible.

void casa::TableExprFuncNodeArray::tryToConst (  )  [private]

Try if the function gives a constant result.

If so, set the expression type to Constant.

PtrBlock<TableExprNodeRep*> casa::TableExprFuncNodeArray::operands (  )  [inline, private]

Some functions to be used by TableExprNodeFuncArray.

Definition at line 108 of file ExprFuncNodeArray.h.

References node_p, and casa::TableExprFuncNode::operands().

TableExprFuncNode::FunctionType casa::TableExprFuncNodeArray::funcType (  )  const [inline, private]

Definition at line 110 of file ExprFuncNodeArray.h.

References casa::TableExprFuncNode::funcType(), and node_p.

NodeDataType casa::TableExprFuncNodeArray::argDataType (  )  const [inline, private]

Definition at line 112 of file ExprFuncNodeArray.h.

References casa::TableExprFuncNode::argDataType(), and node_p.

const IPosition& casa::TableExprFuncNodeArray::getCollapseAxes ( const TableExprId id,
Int  ndim,
uInt  axarg = 1 
) [private]

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& casa::TableExprFuncNodeArray::getArrayShape ( const TableExprId id,
uInt  axarg = 1 
) [private]

Get the shape for the array function.

axarg gives the argument nr of the shape.


Member Data Documentation

TableExprFuncNode casa::TableExprFuncNodeArray::node_p [private]

Definition at line 126 of file ExprFuncNodeArray.h.

Referenced by argDataType(), funcType(), getChild(), and operands().

Int casa::TableExprFuncNodeArray::origin_p [private]

Definition at line 127 of file ExprFuncNodeArray.h.

Bool casa::TableExprFuncNodeArray::isCOrder_p [private]

Definition at line 128 of file ExprFuncNodeArray.h.

Bool casa::TableExprFuncNodeArray::constAxes_p [private]

Definition at line 129 of file ExprFuncNodeArray.h.

IPosition casa::TableExprFuncNodeArray::ipos_p [private]

Definition at line 130 of file ExprFuncNodeArray.h.

IPosition casa::TableExprFuncNodeArray::iposN_p [private]

Definition at line 131 of file ExprFuncNodeArray.h.

IPosition casa::TableExprFuncNodeArray::corrCollAxes_p [private]

Definition at line 132 of file ExprFuncNodeArray.h.

uInt casa::TableExprFuncNodeArray::lastNdim_p [private]

Definition at line 134 of file ExprFuncNodeArray.h.


The documentation for this class was generated from the following file:
Generated on Mon Sep 1 22:45:23 2008 for NRAOCASA by  doxygen 1.5.1