casacore::TableExprNodeBinary Class Reference

Abstract base class for a node having 0, 1, or 2 child nodes. More...

#include <ExprNodeRep.h>

Inheritance diagram for casacore::TableExprNodeBinary:
casacore::TableExprNodeRep casacore::TableExprNodeAND casacore::TableExprNodeArray casacore::TableExprNodeBitAndInt casacore::TableExprNodeBitNegate casacore::TableExprNodeBitOrInt casacore::TableExprNodeBitXorInt casacore::TableExprNodeColumn casacore::TableExprNodeConstBool casacore::TableExprNodeConstDate casacore::TableExprNodeConstDComplex casacore::TableExprNodeConstDouble casacore::TableExprNodeConstInt casacore::TableExprNodeConstRegex casacore::TableExprNodeConstString casacore::TableExprNodeDivide casacore::TableExprNodeEQBool casacore::TableExprNodeEQDate casacore::TableExprNodeEQDComplex casacore::TableExprNodeEQDouble casacore::TableExprNodeEQInt casacore::TableExprNodeEQRegex casacore::TableExprNodeEQString casacore::TableExprNodeGEDate casacore::TableExprNodeGEDComplex casacore::TableExprNodeGEDouble casacore::TableExprNodeGEInt casacore::TableExprNodeGEString casacore::TableExprNodeGTDate casacore::TableExprNodeGTDComplex casacore::TableExprNodeGTDouble casacore::TableExprNodeGTInt casacore::TableExprNodeGTString casacore::TableExprNodeINDate casacore::TableExprNodeINDComplex casacore::TableExprNodeINDouble casacore::TableExprNodeINInt casacore::TableExprNodeINString casacore::TableExprNodeMIN casacore::TableExprNodeMinus casacore::TableExprNodeModulo casacore::TableExprNodeNEBool casacore::TableExprNodeNEDate casacore::TableExprNodeNEDComplex casacore::TableExprNodeNEDouble casacore::TableExprNodeNEInt casacore::TableExprNodeNERegex casacore::TableExprNodeNEString casacore::TableExprNodeNOT casacore::TableExprNodeOR casacore::TableExprNodePlus casacore::TableExprNodeRandom casacore::TableExprNodeRecordField casacore::TableExprNodeRowid casacore::TableExprNodeRownr casacore::TableExprNodeTimes casacore::TableExprNodeUnit

List of all members.

Public Member Functions

 TableExprNodeBinary (NodeDataType, ValueType, OperType, const Table &)
 Constructor.
 TableExprNodeBinary (NodeDataType, const TableExprNodeRep &, OperType)
virtual ~TableExprNodeBinary ()
 Destructor.
virtual void show (ostream &, uInt indent) const
 Show the expression tree.
virtual void getAggrNodes (vector< TableExprNodeRep * > &aggr)
 Get the nodes representing an aggregate function.
virtual void getColumnNodes (vector< TableExprNodeRep * > &cols)
 Get the nodes representing a table column.
virtual void handleUnits ()
 Handle the units of the children and possibly set the parent's unit.
void convertConstChild ()
 When one of the children is a constant, convert its data type to that of the other operand.
const TableExprNodeRepgetLeftChild () const
 Get the child nodes.
const TableExprNodeRepgetRightChild () const

Static Public Member Functions

static NodeDataType getDT (NodeDataType leftDtype, NodeDataType rightDype, OperType operType)
 Check the data types and get the common one.
static TableExprNodeRep getTypes (const TableExprNodeRep &left, const TableExprNodeRep &right, OperType operType)
 Check the data and value types and get the common one.
static TableExprNodeRepfillNode (TableExprNodeBinary *thisNode, TableExprNodeRep *left, TableExprNodeRep *right, Bool convertConstType, Bool adaptDataType=True)
 Link the children to the node and convert the children to constants if needed and possible.

Static Protected Member Functions

static const UnitmakeEqualUnits (TableExprNodeRep *left, TableExprNodeRep *&right)
 Make the units equal.

Protected Attributes

TableExprNodeReplnode_p
TableExprNodeReprnode_p

Detailed Description

Abstract base class for a node having 0, 1, or 2 child nodes.

Intended use:

Internal

Review Status

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

Prerequisite

Etymology

TableExprNodeBinary is a node in the table expression tree representing a binary node (i.e. having 2 operands).

Synopsis

TableExprNodeBinary is the abstract base class for all nodes in a table expression tree using up to 2 operands. It is used as the base class for the node classes representing operator +, -, etc.\.

Motivation

This class contains the common functionality for the classes representing a binary (or unary) operator.

Definition at line 553 of file ExprNodeRep.h.


Constructor & Destructor Documentation

casacore::TableExprNodeBinary::TableExprNodeBinary ( NodeDataType  ,
ValueType  ,
OperType  ,
const Table  
)

Constructor.

casacore::TableExprNodeBinary::TableExprNodeBinary ( NodeDataType  ,
const TableExprNodeRep ,
OperType   
)
virtual casacore::TableExprNodeBinary::~TableExprNodeBinary (  )  [virtual]

Destructor.


Member Function Documentation

void casacore::TableExprNodeBinary::convertConstChild (  )  [virtual]

When one of the children is a constant, convert its data type to that of the other operand.

This avoids that conversions are done for each get.

Reimplemented from casacore::TableExprNodeRep.

Reimplemented in casacore::TableExprNodeINInt.

static TableExprNodeRep* casacore::TableExprNodeBinary::fillNode ( TableExprNodeBinary thisNode,
TableExprNodeRep left,
TableExprNodeRep right,
Bool  convertConstType,
Bool  adaptDataType = True 
) [static]

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

Also convert the node to constant if possible. The operand data types can be adapted as needed.

virtual void casacore::TableExprNodeBinary::getAggrNodes ( vector< TableExprNodeRep * > &  aggr  )  [virtual]

Get the nodes representing an aggregate function.

Reimplemented in casacore::TableExprAggrNodeArray, casacore::TableExprFuncNodeArray, and casacore::TableExprUDFNodeArray.

virtual void casacore::TableExprNodeBinary::getColumnNodes ( vector< TableExprNodeRep * > &  cols  )  [virtual]
static NodeDataType casacore::TableExprNodeBinary::getDT ( NodeDataType  leftDtype,
NodeDataType  rightDype,
OperType  operType 
) [static]

Check the data types and get the common one.

const TableExprNodeRep* casacore::TableExprNodeBinary::getLeftChild (  )  const [inline]

Get the child nodes.

Definition at line 604 of file ExprNodeRep.h.

References lnode_p.

const TableExprNodeRep* casacore::TableExprNodeBinary::getRightChild (  )  const [inline]

Definition at line 606 of file ExprNodeRep.h.

References rnode_p.

static TableExprNodeRep casacore::TableExprNodeBinary::getTypes ( const TableExprNodeRep left,
const TableExprNodeRep right,
OperType  operType 
) [static]

Check the data and value types and get the common one.

virtual void casacore::TableExprNodeBinary::handleUnits (  )  [virtual]
static const Unit& casacore::TableExprNodeBinary::makeEqualUnits ( TableExprNodeRep left,
TableExprNodeRep *&  right 
) [static, protected]

Make the units equal.

Replace the right node if needed.

virtual void casacore::TableExprNodeBinary::show ( ostream &  ,
uInt  indent 
) const [virtual]

Show the expression tree.

Reimplemented from casacore::TableExprNodeRep.

Reimplemented in casacore::TableExprNodeArrayPart.


Member Data Documentation

Definition at line 616 of file ExprNodeRep.h.

Referenced by getLeftChild().

Definition at line 617 of file ExprNodeRep.h.

Referenced by getRightChild().


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 31 Aug 2016 for casa by  doxygen 1.6.1