#include <ExprFuncNode.h>
Inheritance diagram for casa::TableExprFuncNode:


Internal
This class represents a function in a table select tree. The rownumber function is represented by class TableExprNodeRownr . The rowid function is represented by class TableExprNodeRowid . The rand function is represented by class TableExprNodeRandom .
When one wants to add a function to the table selection grammar, the following has to be done:
Definition at line 74 of file ExprFuncNode.h.
Public Types | |
| enum | FunctionType |
Public Member Functions | |
| TableExprFuncNode (FunctionType, NodeDataType, ValueType, const TableExprNodeSet &source) | |
| Constructor. | |
| ~TableExprFuncNode () | |
| Destructor. | |
| Bool | getBool (const TableExprId &id) |
| 'get' Functions to get the desired result of a function | |
| Double | getDouble (const TableExprId &id) |
| DComplex | getDComplex (const TableExprId &id) |
| String | getString (const TableExprId &id) |
| Regex | getRegex (const TableExprId &id) |
| MVTime | getDate (const TableExprId &id) |
| PtrBlock< TableExprNodeRep * > | operands () |
| Some functions to be used by TableExprNodeFuncArray. | |
| FunctionType | funcType () const |
| NodeDataType | argDataType () const |
Static Public Member Functions | |
| static NodeDataType | checkOperands (Block< Int > &dtypeOper, ValueType &resVT, Block< Int > &vtypeOper, FunctionType, PtrBlock< TableExprNodeRep * > &) |
| Check the data and value types of the operands. | |
| static void | fillUnits (TableExprNodeRep *node, PtrBlock< TableExprNodeRep * > &nodes, FunctionType func) |
| Fill the result unit in the node. | |
| static TableExprNodeRep * | fillNode (TableExprFuncNode *thisNode, PtrBlock< TableExprNodeRep * > &nodes, const Block< Int > &dtypeOper) |
| Link the children to the node and convert the children to constants if possible. | |
| static void | fillChildNodes (TableExprFuncNode *thisNode, PtrBlock< TableExprNodeRep * > &nodes, const Block< Int > &dtypeOper) |
| Link the children to the node and convert the children to constants if possible. | |
| static void | fillUnit (TableExprNodeRep &node, FunctionType func) |
| Fill the unit of the node for the functions with a predefined unit (like asin). | |
Private Member Functions | |
| void | tryToConst () |
| Try if the function gives a constant result. | |
Static Private Member Functions | |
| static const Unit & | makeEqualUnits (PtrBlock< TableExprNodeRep * > &nodes, uInt starg, uInt endarg) |
Make the units of nodes from starg till endarg equal. | |
Private Attributes | |
| FunctionType | funcType_p |
| NodeDataType | argDataType_p |
Definition at line 78 of file ExprFuncNode.h.
| casa::TableExprFuncNode::TableExprFuncNode | ( | FunctionType | , | |
| NodeDataType | , | |||
| ValueType | , | |||
| const TableExprNodeSet & | source | |||
| ) |
Constructor.
| casa::TableExprFuncNode::~TableExprFuncNode | ( | ) |
Destructor.
| Bool casa::TableExprFuncNode::getBool | ( | const TableExprId & | id | ) | [virtual] |
| Double casa::TableExprFuncNode::getDouble | ( | const TableExprId & | id | ) | [virtual] |
Reimplemented from casa::TableExprNodeRep.
| DComplex casa::TableExprFuncNode::getDComplex | ( | const TableExprId & | id | ) | [virtual] |
Reimplemented from casa::TableExprNodeRep.
| String casa::TableExprFuncNode::getString | ( | const TableExprId & | id | ) | [virtual] |
Reimplemented from casa::TableExprNodeRep.
| Regex casa::TableExprFuncNode::getRegex | ( | const TableExprId & | id | ) | [virtual] |
Reimplemented from casa::TableExprNodeRep.
| MVTime casa::TableExprFuncNode::getDate | ( | const TableExprId & | id | ) | [virtual] |
Reimplemented from casa::TableExprNodeRep.
| static NodeDataType casa::TableExprFuncNode::checkOperands | ( | Block< Int > & | dtypeOper, | |
| ValueType & | resVT, | |||
| Block< Int > & | vtypeOper, | |||
| FunctionType | , | |||
| PtrBlock< TableExprNodeRep * > & | ||||
| ) | [static] |
Check the data and value types of the operands.
It sets the exptected data and value types of the operands. Set the value type of the function result and returns the data type of the function result.
| static void casa::TableExprFuncNode::fillUnits | ( | TableExprNodeRep * | node, | |
| PtrBlock< TableExprNodeRep * > & | nodes, | |||
| FunctionType | func | |||
| ) | [static] |
Fill the result unit in the node.
Adapt the children nodes if their units need to be converted.
| static TableExprNodeRep* casa::TableExprFuncNode::fillNode | ( | TableExprFuncNode * | 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.
| static void casa::TableExprFuncNode::fillChildNodes | ( | TableExprFuncNode * | thisNode, | |
| PtrBlock< TableExprNodeRep * > & | nodes, | |||
| const Block< Int > & | dtypeOper | |||
| ) | [static] |
Link the children to the node and convert the children to constants if possible.
| static void casa::TableExprFuncNode::fillUnit | ( | TableExprNodeRep & | node, | |
| FunctionType | func | |||
| ) | [static] |
Fill the unit of the node for the functions with a predefined unit (like asin).
| PtrBlock<TableExprNodeRep*> casa::TableExprFuncNode::operands | ( | ) | [inline] |
Some functions to be used by TableExprNodeFuncArray.
Definition at line 269 of file ExprFuncNode.h.
References casa::TableExprNodeMulti::operands_p.
Referenced by casa::TableExprFuncNodeArray::operands().
| FunctionType casa::TableExprFuncNode::funcType | ( | ) | const [inline] |
Definition at line 271 of file ExprFuncNode.h.
References funcType_p.
Referenced by casa::TableExprFuncNodeArray::funcType().
| NodeDataType casa::TableExprFuncNode::argDataType | ( | ) | const [inline] |
Definition at line 273 of file ExprFuncNode.h.
References argDataType_p.
Referenced by casa::TableExprFuncNodeArray::argDataType().
| void casa::TableExprFuncNode::tryToConst | ( | ) | [private] |
Try if the function gives a constant result.
If so, set the expression type to Constant.
| static const Unit& casa::TableExprFuncNode::makeEqualUnits | ( | PtrBlock< TableExprNodeRep * > & | nodes, | |
| uInt | starg, | |||
| uInt | endarg | |||
| ) | [static, private] |
Make the units of nodes from starg till endarg equal.
Return the unit found.
1.5.1