casacore::TableExprNodeUnit Class Reference

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

#include <ExprUnitNode.h>

Inheritance diagram for casacore::TableExprNodeUnit:
casacore::TableExprNodeBinary casacore::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

casacore::TableExprNodeUnit::TableExprNodeUnit ( TableExprNodeRep child,
const Unit unit 
)

Constrcut from the given child node and unit.

casacore::TableExprNodeUnit::~TableExprNodeUnit (  ) 

Member Function Documentation

static void casacore::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 casacore::TableExprNodeUnit::adaptUnits ( TableExprNodeRep *&  node1,
TableExprNodeRep *&  node2,
TableExprNodeRep *&  node3 
) [static]

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

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

Reimplemented from casacore::TableExprNodeRep.

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

Reimplemented from casacore::TableExprNodeRep.

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

Get the unit factor.

Reimplemented from casacore::TableExprNodeRep.

static Double casacore::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* casacore::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:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 31 Aug 2016 for casa by  doxygen 1.6.1