casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Static Public Member Functions | Private Attributes
casa::TableExprNodeUnit Class Reference

Unit for scalar values in a table select expression tree. More...

#include <ExprUnitNode.h>

Inheritance diagram for casa::TableExprNodeUnit:
casa::TableExprNodeBinary casa::TableExprNodeRep

List of all members.

Public Member Functions

 TableExprNodeUnit (TableExprNodeRep &child, const Unit &unit)
 Constrcut from the given child node and unit.
 ~TableExprNodeUnit ()
virtual Double getUnitFactor () const
 Get the unit factor.
virtual Double getDouble (const TableExprId &id)
virtual DComplex getDComplex (const TableExprId &id)

Static Public Member Functions

static Double set (TableExprNodeRep &parent, const TableExprNodeRep &child, const Unit &unit)
 Calculate the conversion factor and return it.
static TableExprNodeRepuseUnit (TableExprNodeRep *const node, const Unit &unit)
 Create a new node if unit conversion is needed.
static void adaptUnit (TableExprNodeRep *&node, const Unit &unit)
 Use useUnit to see if a conversion is needed.
static Unit adaptUnits (TableExprNodeRep *&node1, TableExprNodeRep *&node2, TableExprNodeRep *&node3)
 Find the unit to be used and adapt the nodes to it.

Private Attributes

Double factor_p

Detailed Description

Unit for scalar values in a table select expression tree.

Intended use:

Internal

Review Status

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

Prerequisite

Synopsis

This class represents a unit in a table select expression tree. It contains a unit conversion factor to convert the child to this unit. The factor is 1 if the child has no unit.

Definition at line 61 of file ExprUnitNode.h.


Constructor & Destructor Documentation

Constrcut from the given child node and unit.


Member Function Documentation

static void casa::TableExprNodeUnit::adaptUnit ( TableExprNodeRep *&  node,
const Unit unit 
) [static]

Use useUnit to see if a conversion is needed.

If so, adapt the reference counts and replace the node.

static Unit casa::TableExprNodeUnit::adaptUnits ( TableExprNodeRep *&  node1,
TableExprNodeRep *&  node2,
TableExprNodeRep *&  node3 
) [static]

Find the unit to be used and adapt the nodes to it.

virtual DComplex casa::TableExprNodeUnit::getDComplex ( const TableExprId id) [virtual]

Reimplemented from casa::TableExprNodeRep.

virtual Double casa::TableExprNodeUnit::getDouble ( const TableExprId id) [virtual]

Reimplemented from casa::TableExprNodeRep.

virtual Double casa::TableExprNodeUnit::getUnitFactor ( ) const [virtual]

Get the unit factor.

Reimplemented from casa::TableExprNodeRep.

static Double casa::TableExprNodeUnit::set ( TableExprNodeRep parent,
const TableExprNodeRep child,
const Unit unit 
) [static]

Calculate the conversion factor and return it.

It is static to be useful for TableExprNodeArrayFunc as well.

static TableExprNodeRep* casa::TableExprNodeUnit::useUnit ( TableExprNodeRep *const  node,
const Unit unit 
) [static]

Create a new node if unit conversion is needed.

Otherwise return the current node.


Member Data Documentation

Definition at line 95 of file ExprUnitNode.h.


The documentation for this class was generated from the following file: