ExprConeNode.h

Classes

TableExprConeNode -- Class representing a cone search in table select expression (full description)

class TableExprConeNode : public TableExprFuncNode

Interface

Public Members
TableExprConeNode (FunctionType, NodeDataType, ValueType, const ValueType& source, uInt origin)
~TableExprConeNode()
Bool getBool (const TableExprId& id)
Double getDouble (const TableExprId& id)
Array<Bool> getArrayBool (const TableExprId& id)
Array<Double> getArrayDouble (const TableExprId& id)
static NodeDataType checkOperands (Block<Int>& dtypeOper, ValueType& resVT, Block<Int>& vtypeOper, FunctionType, PtrBlock<TableExprNodeRep*>&)
static TableExprNodeRep* fillNode (TableExprConeNode* thisNode, PtrBlock<TableExprNodeRep*>& nodes, const Block<Int>& dtypeOper)
static void fillChildNodes (TableExprConeNode* thisNode, PtrBlock<TableExprNodeRep*>& nodes, const Block<Int>& dtypeOper)
Private Members
void tryToConst()
static Int findNelem (const TableExprNodeRep* node)

Description

Review Status

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

Prerequisite

Synopsis

The class represents a cone search. It is a specialization of the TableExprFuncNode class. Currently the implementation is straightforward, but in the future it can do smarter things. For instance:

Member Description

TableExprConeNode (FunctionType, NodeDataType, ValueType, const ValueType& source, uInt origin)

Constructor

~TableExprConeNode()

Destructor

Bool getBool (const TableExprId& id)
Double getDouble (const TableExprId& id)
Array<Bool> getArrayBool (const TableExprId& id)
Array<Double> getArrayDouble (const TableExprId& id)

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

static NodeDataType checkOperands (Block<Int>& dtypeOper, ValueType& resVT, Block<Int>& vtypeOper, FunctionType, PtrBlock<TableExprNodeRep*>&)

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 TableExprNodeRep* fillNode (TableExprConeNode* 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.

static void fillChildNodes (TableExprConeNode* thisNode, PtrBlock<TableExprNodeRep*>& nodes, const Block<Int>& dtypeOper)

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

void tryToConst()

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

static Int findNelem (const TableExprNodeRep* node)

Find the number of elements in an argument. It returns -1 if unknown.