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

Abstract base class for a node in a table column expression tree. More...

#include <ExprNodeRep.h>

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

List of all members.

Public Types

enum  NodeDataType {
  NTBool,
  NTInt,
  NTDouble,
  NTComplex,
  NTString,
  NTRegex,
  NTDate,
  NTReal,
  NTDouCom,
  NTNumeric,
  NTAny
}
 Define the data types of a node. More...
enum  ValueType {
  VTScalar,
  VTArray,
  VTRecord,
  VTSetElem,
  VTSet,
  VTIndex
}
 Define the value types. More...
enum  OperType {
  OtPlus,
  OtMinus,
  OtTimes,
  OtDivide,
  OtModulo,
  OtBitAnd,
  OtBitOr,
  OtBitXor,
  OtBitNegate,
  OtEQ,
  OtGE,
  OtGT,
  OtNE,
  OtIN,
  OtAND,
  OtOR,
  OtNOT,
  OtMIN,
  OtColumn,
  OtField,
  OtLiteral,
  OtFunc,
  OtSlice,
  OtUndef,
  OtRownr,
  OtRandom
}
 Define the operator types. More...
enum  ArgType {
  NoArr,
  ArrArr,
  ArrSca,
  ScaArr
}
 Define the value types of the 2 arguments when arrays are involved. More...
enum  ExprType {
  Constant,
  Variable
}
 Define (sub-)expression type. More...

Public Member Functions

 TableExprNodeRep (NodeDataType, ValueType, OperType, ArgType, ExprType, Int ndim, const IPosition &shape, const Table &table)
 Construct a node.
 TableExprNodeRep (NodeDataType, ValueType, OperType, const Table &)
 This constructor is called from the derived TableExprNodeRep.
 TableExprNodeRep (const TableExprNodeRep &)
 Copy constructor.
virtual ~TableExprNodeRep ()
 The destructor deletes all the underlying TableExprNode objects.
TableExprNodeReplink ()
 Link to this object, i.e.
virtual Double getUnitFactor () const
 Get the unit conversion factor.
virtual Bool isSingleValue () const
 Does the node result in a single value (for e.g.
virtual Bool getBool (const TableExprId &id)
 Is the expression a column aggregate function?
virtual Int64 getInt (const TableExprId &id)
virtual Double getDouble (const TableExprId &id)
virtual DComplex getDComplex (const TableExprId &id)
virtual String getString (const TableExprId &id)
virtual TaqlRegex getRegex (const TableExprId &id)
virtual MVTime getDate (const TableExprId &id)
virtual Array< BoolgetArrayBool (const TableExprId &id)
 Get an array value for this node in the given row.
virtual Array< Int64getArrayInt (const TableExprId &id)
virtual Array< DoublegetArrayDouble (const TableExprId &id)
virtual Array< DComplex > getArrayDComplex (const TableExprId &id)
virtual Array< StringgetArrayString (const TableExprId &id)
virtual Array< MVTimegetArrayDate (const TableExprId &id)
Array< BoolgetBoolAS (const TableExprId &id)
 Get a value as an array, even it it is a scalar.
Array< Int64getIntAS (const TableExprId &id)
Array< DoublegetDoubleAS (const TableExprId &id)
Array< DComplex > getDComplexAS (const TableExprId &id)
Array< StringgetStringAS (const TableExprId &id)
Array< MVTimegetDateAS (const TableExprId &id)
virtual Bool hasBool (const TableExprId &id, Bool value)
 Does a value occur in an array or set? The default implementation tests if it is in an array.
virtual Bool hasInt (const TableExprId &id, Int64 value)
virtual Bool hasDouble (const TableExprId &id, Double value)
virtual Bool hasDComplex (const TableExprId &id, const DComplex &value)
virtual Bool hasString (const TableExprId &id, const String &value)
virtual Bool hasDate (const TableExprId &id, const MVTime &value)
virtual Array< BoolhasArrayBool (const TableExprId &id, const Array< Bool > &value)
virtual Array< BoolhasArrayInt (const TableExprId &id, const Array< Int64 > &value)
virtual Array< BoolhasArrayDouble (const TableExprId &id, const Array< Double > &value)
virtual Array< BoolhasArrayDComplex (const TableExprId &id, const Array< DComplex > &value)
virtual Array< BoolhasArrayString (const TableExprId &id, const Array< String > &value)
virtual Array< BoolhasArrayDate (const TableExprId &id, const Array< MVTime > &value)
uInt nrow () const
 Get the number of rows in the table associated with this expression.
virtual Bool getColumnDataType (DataType &) const
 Get the data type of the column.
virtual Array< BoolgetColumnBool (const Vector< uInt > &rownrs)
 Get the value of the expression evaluated for the entire column.
virtual Array< uChargetColumnuChar (const Vector< uInt > &rownrs)
virtual Array< ShortgetColumnShort (const Vector< uInt > &rownrs)
virtual Array< uShortgetColumnuShort (const Vector< uInt > &rownrs)
virtual Array< IntgetColumnInt (const Vector< uInt > &rownrs)
virtual Array< uIntgetColumnuInt (const Vector< uInt > &rownrs)
virtual Array< FloatgetColumnFloat (const Vector< uInt > &rownrs)
virtual Array< DoublegetColumnDouble (const Vector< uInt > &rownrs)
virtual Array< Complex > getColumnComplex (const Vector< uInt > &rownrs)
virtual Array< DComplex > getColumnDComplex (const Vector< uInt > &rownrs)
virtual Array< StringgetColumnString (const Vector< uInt > &rownrs)
virtual void ranges (Block< TableExprRange > &)
 Convert the tree to a number of range vectors which at least select the same things.
NodeDataType dataType () const
 Get the data type of the derived TableExprNode object.
ValueType valueType () const
 Get the value type.
void setValueType (ValueType vtype)
 Set the value type.
OperType operType () const
 Get the operator type.
ExprType exprType () const
 Get the expression type.
Bool isConstant () const
 Is the expression a constant?
const Unitunit () const
 Get the unit.
void setUnit (const Unit &unit)
 Set the unit.
Int ndim () const
 Get the fixed dimensionality (same for all rows).
const IPositionshape () const
 Get the fixed shape (same for all rows).
const IPositionshape (const TableExprId &id)
 Get the shape for the given row.
virtual Bool isDefined (const TableExprId &id)
 Is the value in the given row defined? The default implementation returns True.
virtual void show (ostream &, uInt indent) const
 Show the expression tree.
Tabletable ()
 Get table.
const Tabletable () const
virtual void adaptSetUnits (const Unit &)
 Let a set node convert itself to the given unit.

Static Public Member Functions

static void unlink (TableExprNodeRep *)
 Unlink from the given object.
static void createRange (Block< TableExprRange > &, TableExprNodeColumn *, Double start, Double end)
 Create a range object from a column and an interval.
static void createRange (Block< TableExprRange > &)
 Create a empty range object.
static String typeString (NodeDataType)
 Convert a NodeDataType to a string.
static String typeString (ValueType)
 Convert a ValueType to a string.

Protected Member Functions

virtual const IPositiongetShape (const TableExprId &id)
 Get the shape for the given row.
virtual void convertConstChild ()
 When one of the children is a constant, convert its data type to that of the other operand.
void checkTablePtr (const TableExprNodeRep *node)
 Check if this node uses the same table pointer.
void fillExprType (const TableExprNodeRep *node)
 Set expression type to Variable if node is Variable.

Static Protected Member Functions

static TableExprNodeRepgetRep (TableExprNode &)
 Get pointer to REPresentation object.
static void checkTablePtr (Table &table, const TableExprNodeRep *node)
static void fillExprType (ExprType &, const TableExprNodeRep *node)
static TableExprNodeRepconvertNode (TableExprNodeRep *thisNode, Bool convertConstType)
 When the node is constant, it is evaluated and replaced by the appropriate TableExprNodeConst object.

Protected Attributes

uInt count_p
Table table_p
NodeDataType dtype_p
ValueType vtype_p
OperType optype_p
ArgType argtype_p
ExprType exprtype_p
Int ndim_p
IPosition shape_p
Unit unit_p

Private Member Functions

TableExprNodeRepoperator= (const TableExprNodeRep &)
 A copy of a TableExprNodeRep cannot be made.

Detailed Description

Abstract base class for a node in a table column expression tree.

Intended use:

Internal

Review Status

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

Prerequisite

Etymology

TableExprNodeRep is the (abstract) REPresentation of a node in a table expression tree.

Synopsis

TableExprNodeRep is the base class for all nodes in a table expression tree. It is used by the handle class TableExprNode.

The objects of this class are reference-counted to make it possible that the same object is reused.

Motivation

TableExprNodeRep and its derivations store a table select expression before actually evaluating it. It is also possible that the classes are used by the table expression parser defined in TableParse and TableGram.
For each operator a special derived class is implemented. Another approach could have been to store the operator as a flag and switch on that. However, that causes extra overhead and the C++ virtual function mechanism is designed for these purposes.

To Do

Definition at line 149 of file ExprNodeRep.h.


Member Enumeration Documentation

Define the value types of the 2 arguments when arrays are involved.

Enumerator:
NoArr 
ArrArr 
ArrSca 
ScaArr 

Definition at line 188 of file ExprNodeRep.h.

Define (sub-)expression type.

Enumerator:
Constant 

A constant subexpression which can be evaluated immediately.

Variable 

A variable (i.e.

row dependent) subexpression which has to be evaluated for each table row. An expensive constant subexpression which should only be evaluated when needed (e.g. a subquery). Lazy

Definition at line 193 of file ExprNodeRep.h.

Define the data types of a node.

Enumerator:
NTBool 
NTInt 
NTDouble 
NTComplex 
NTString 
NTRegex 
NTDate 
NTReal 
NTDouCom 
NTNumeric 
NTAny 

Definition at line 153 of file ExprNodeRep.h.

Define the operator types.

LE and LT are handled as GE and GT with swapped operands.

Enumerator:
OtPlus 
OtMinus 
OtTimes 
OtDivide 
OtModulo 
OtBitAnd 
OtBitOr 
OtBitXor 
OtBitNegate 
OtEQ 
OtGE 
OtGT 
OtNE 
OtIN 
OtAND 
OtOR 
OtNOT 
OtMIN 
OtColumn 
OtField 
OtLiteral 
OtFunc 
OtSlice 
OtUndef 
OtRownr 
OtRandom 

Definition at line 179 of file ExprNodeRep.h.

Define the value types.

Enumerator:
VTScalar 
VTArray 
VTRecord 
VTSetElem 
VTSet 
VTIndex 

Definition at line 168 of file ExprNodeRep.h.


Constructor & Destructor Documentation

casa::TableExprNodeRep::TableExprNodeRep ( NodeDataType  ,
ValueType  ,
OperType  ,
ArgType  ,
ExprType  ,
Int  ndim,
const IPosition shape,
const Table table 
)

Construct a node.

This constructor is called from the derived TableExprNodeRep.

Copy constructor.

The destructor deletes all the underlying TableExprNode objects.


Member Function Documentation

virtual void casa::TableExprNodeRep::adaptSetUnits ( const Unit ) [virtual]

Let a set node convert itself to the given unit.

The default implementation does nothing.

Reimplemented in casa::TableExprNodeSet, and casa::TableExprNodeSetElem.

void casa::TableExprNodeRep::checkTablePtr ( const TableExprNodeRep node) [inline, protected]

Check if this node uses the same table pointer.

Fill the Table object if it is still null.

Definition at line 681 of file ExprNodeRep.h.

References table_p.

static void casa::TableExprNodeRep::checkTablePtr ( Table table,
const TableExprNodeRep node 
) [static, protected]
virtual void casa::TableExprNodeRep::convertConstChild ( ) [protected, 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. The default implementation does nothing.

Reimplemented in casa::TableExprNodeBinary.

static TableExprNodeRep* casa::TableExprNodeRep::convertNode ( TableExprNodeRep thisNode,
Bool  convertConstType 
) [static, protected]

When the node is constant, it is evaluated and replaced by the appropriate TableExprNodeConst object.

If not constant, it calls the virtual ConvertConstChild function which can convert a constant child when appropriate.

static void casa::TableExprNodeRep::createRange ( Block< TableExprRange > &  ,
TableExprNodeColumn ,
Double  start,
Double  end 
) [static]

Create a range object from a column and an interval.

static void casa::TableExprNodeRep::createRange ( Block< TableExprRange > &  ) [static]

Create a empty range object.

Get the data type of the derived TableExprNode object.

This is the data type of the resulting value. E.g. a compare of 2 numeric values results in a Bool, thus the data type of, say, TableExprNodeEQ<T> is always Bool. Function getInternalDT gives the internal data type, thus in the example above the data type of T.

Definition at line 640 of file ExprNodeRep.h.

References dtype_p.

Get the expression type.

Definition at line 656 of file ExprNodeRep.h.

References exprtype_p.

void casa::TableExprNodeRep::fillExprType ( const TableExprNodeRep node) [inline, protected]

Set expression type to Variable if node is Variable.

Definition at line 683 of file ExprNodeRep.h.

References exprtype_p.

static void casa::TableExprNodeRep::fillExprType ( ExprType ,
const TableExprNodeRep node 
) [static, protected]
virtual Array<Bool> casa::TableExprNodeRep::getArrayBool ( const TableExprId id) [virtual]

Get an array value for this node in the given row.

The appropriate functions are implemented in the derived classes and will usually invoke the get in their children and apply the operator on the resulting values.

Reimplemented in casa::TableExprNodeArrayNOT, casa::TableExprNodeArrayAND, casa::TableExprNodeArrayOR, casa::TableExprNodeArrayINDate, casa::TableExprNodeArrayINString, casa::TableExprNodeArrayINDComplex, casa::TableExprNodeArrayINDouble, casa::TableExprNodeArrayINInt, casa::TableExprNodeArrayGEDate, casa::TableExprNodeArrayPart, casa::TableExprNodeArrayGEString, casa::TableExprNodeArrayGEDComplex, casa::TableExprNodeArrayGEDouble, casa::TableExprNodeArrayGEInt, casa::TableExprNodeArrayGTDate, casa::TableExprNodeArrayGTString, casa::TableExprNodeArrayGTDComplex, casa::TableExprNodeArrayGTDouble, casa::TableExprNodeArrayGTInt, casa::TableExprNodeArrayNEDate, casa::TableExprNodeArrayNERegex, casa::TableExprNodeArrayNEString, casa::TableExprNodeArrayNEDComplex, casa::TableExprNodeSet, casa::TableExprNodeArrayNEDouble, casa::TableExprNodeArrayNEInt, casa::TableExprNodeArrayNEBool, casa::TableExprNodeArrayEQDate, casa::TableExprNodeArrayColumnBool, casa::TableExprNodeArrayEQRegex, casa::TableExprNodeArrayEQString, casa::TableExprNodeArrayEQDComplex, casa::TableExprNodeArrayEQDouble, casa::TableExprNodeRecordFieldArray, casa::TableExprNodeArrayEQInt, casa::TableExprUDFNodeArray, casa::TableExprFuncNodeArray, casa::TableExprConeNode, casa::TableExprNodeArrayEQBool, and casa::TableExprNodeArrayConstBool.

Referenced by casa::TableExprNode::get(), and casa::TableExprNode::getArrayBool().

virtual Array<MVTime> casa::TableExprNodeRep::getArrayDate ( const TableExprId id) [virtual]
virtual Array<DComplex> casa::TableExprNodeRep::getArrayDComplex ( const TableExprId id) [virtual]
virtual Array<Double> casa::TableExprNodeRep::getArrayDouble ( const TableExprId id) [virtual]
virtual Array<Int64> casa::TableExprNodeRep::getArrayInt ( const TableExprId id) [virtual]
virtual Array<String> casa::TableExprNodeRep::getArrayString ( const TableExprId id) [virtual]
virtual Bool casa::TableExprNodeRep::getBool ( const TableExprId id) [virtual]

Get a value as an array, even it it is a scalar.

This is useful if one could given an argument as scalar or array.

Referenced by casa::TableExprNode::getBoolAS().

virtual Array<Bool> casa::TableExprNodeRep::getColumnBool ( const Vector< uInt > &  rownrs) [virtual]

Get the value of the expression evaluated for the entire column.

The data of function called should match the data type as returned by function getColumnDataType.

Reimplemented in casa::TableExprNodeArrayPart, and casa::TableExprNodeColumn.

Referenced by casa::TableExprNode::getColumnBool().

virtual Array<Complex> casa::TableExprNodeRep::getColumnComplex ( const Vector< uInt > &  rownrs) [virtual]
virtual Bool casa::TableExprNodeRep::getColumnDataType ( DataType &  ) const [virtual]

Get the data type of the column.

It returns True when it could set the data type (which it can if the expression is a scalar column or a constant array column pixel). Otherwise it returns False.

Reimplemented in casa::TableExprNodeArrayPart, casa::TableExprNodeColumn, and casa::TableExprNodeArrayColumn.

virtual Array<DComplex> casa::TableExprNodeRep::getColumnDComplex ( const Vector< uInt > &  rownrs) [virtual]
virtual Array<Double> casa::TableExprNodeRep::getColumnDouble ( const Vector< uInt > &  rownrs) [virtual]
virtual Array<Float> casa::TableExprNodeRep::getColumnFloat ( const Vector< uInt > &  rownrs) [virtual]
virtual Array<Int> casa::TableExprNodeRep::getColumnInt ( const Vector< uInt > &  rownrs) [virtual]
virtual Array<Short> casa::TableExprNodeRep::getColumnShort ( const Vector< uInt > &  rownrs) [virtual]
virtual Array<String> casa::TableExprNodeRep::getColumnString ( const Vector< uInt > &  rownrs) [virtual]
virtual Array<uChar> casa::TableExprNodeRep::getColumnuChar ( const Vector< uInt > &  rownrs) [virtual]
virtual Array<uInt> casa::TableExprNodeRep::getColumnuInt ( const Vector< uInt > &  rownrs) [virtual]
virtual Array<uShort> casa::TableExprNodeRep::getColumnuShort ( const Vector< uInt > &  rownrs) [virtual]
virtual MVTime casa::TableExprNodeRep::getDate ( const TableExprId id) [virtual]
virtual DComplex casa::TableExprNodeRep::getDComplex ( const TableExprId id) [virtual]
virtual Double casa::TableExprNodeRep::getDouble ( const TableExprId id) [virtual]
virtual Int64 casa::TableExprNodeRep::getInt ( const TableExprId id) [virtual]
virtual TaqlRegex casa::TableExprNodeRep::getRegex ( const TableExprId id) [virtual]
static TableExprNodeRep* casa::TableExprNodeRep::getRep ( TableExprNode ) [static, protected]

Get pointer to REPresentation object.

This is used by derived classes.

virtual const IPosition& casa::TableExprNodeRep::getShape ( const TableExprId id) [protected, virtual]
virtual String casa::TableExprNodeRep::getString ( const TableExprId id) [virtual]
virtual Double casa::TableExprNodeRep::getUnitFactor ( ) const [virtual]

Get the unit conversion factor.

Default 1 is returned.

Reimplemented in casa::TableExprNodeArrayUnit, and casa::TableExprNodeUnit.

virtual Array<Bool> casa::TableExprNodeRep::hasArrayBool ( const TableExprId id,
const Array< Bool > &  value 
) [virtual]
virtual Array<Bool> casa::TableExprNodeRep::hasArrayDate ( const TableExprId id,
const Array< MVTime > &  value 
) [virtual]
virtual Array<Bool> casa::TableExprNodeRep::hasArrayDComplex ( const TableExprId id,
const Array< DComplex > &  value 
) [virtual]
virtual Array<Bool> casa::TableExprNodeRep::hasArrayDouble ( const TableExprId id,
const Array< Double > &  value 
) [virtual]
virtual Array<Bool> casa::TableExprNodeRep::hasArrayInt ( const TableExprId id,
const Array< Int64 > &  value 
) [virtual]
virtual Array<Bool> casa::TableExprNodeRep::hasArrayString ( const TableExprId id,
const Array< String > &  value 
) [virtual]
virtual Bool casa::TableExprNodeRep::hasBool ( const TableExprId id,
Bool  value 
) [virtual]

Does a value occur in an array or set? The default implementation tests if it is in an array.

Reimplemented in casa::TableExprNodeSet, and casa::TableExprNodeArray.

virtual Bool casa::TableExprNodeRep::hasDate ( const TableExprId id,
const MVTime value 
) [virtual]
virtual Bool casa::TableExprNodeRep::hasDComplex ( const TableExprId id,
const DComplex &  value 
) [virtual]
virtual Bool casa::TableExprNodeRep::hasDouble ( const TableExprId id,
Double  value 
) [virtual]
virtual Bool casa::TableExprNodeRep::hasInt ( const TableExprId id,
Int64  value 
) [virtual]
virtual Bool casa::TableExprNodeRep::hasString ( const TableExprId id,
const String value 
) [virtual]

Is the expression a constant?

Definition at line 660 of file ExprNodeRep.h.

References Constant, and exprtype_p.

Referenced by casa::TableExprNodeIndex::getSlicer().

virtual Bool casa::TableExprNodeRep::isDefined ( const TableExprId id) [virtual]

Is the value in the given row defined? The default implementation returns True.

Reimplemented in casa::TableExprNodeArrayColumn, casa::TableExprNodeRecordFieldArray, and casa::TableExprNodeRecordField.

Referenced by casa::TableExprNode::isResultDefined().

virtual Bool casa::TableExprNodeRep::isSingleValue ( ) const [virtual]

Does the node result in a single value (for e.g.

GROUPBY)? It is the case for a reduction value or constant value. By default it is if the value is constant.

Reimplemented in casa::TableExprNodeBinary, and casa::TableExprFuncNode.

Link to this object, i.e.

increase its reference count.

Definition at line 687 of file ExprNodeRep.h.

References count_p.

Int casa::TableExprNodeRep::ndim ( ) const [inline]

Get the fixed dimensionality (same for all rows).

Definition at line 668 of file ExprNodeRep.h.

References ndim_p.

Get the number of rows in the table associated with this expression.

One is returned if the expression is a constant. Zero is returned if no table is associated with it.

Referenced by casa::TableExprNode::nrow().

TableExprNodeRep& casa::TableExprNodeRep::operator= ( const TableExprNodeRep ) [private]

A copy of a TableExprNodeRep cannot be made.

Get the operator type.

Definition at line 652 of file ExprNodeRep.h.

References optype_p.

virtual void casa::TableExprNodeRep::ranges ( Block< TableExprRange > &  ) [virtual]

Convert the tree to a number of range vectors which at least select the same things.

This function is very useful to convert the expression to some intervals covering the select expression. This can be used to do a rough fast selection via an index and do the the slower final selection on that much smaller subset. The function can only convert direct comparisons of columns with constants (via ==, !=, >, >=, < or <=) and their combinations using && or ||.

Reimplemented in casa::TableExprNodeAND, casa::TableExprNodeOR, casa::TableExprNodeGEDouble, casa::TableExprNodeGTDouble, and casa::TableExprNodeEQDouble.

Referenced by casa::TableExprNode::ranges().

void casa::TableExprNodeRep::setUnit ( const Unit unit)

Set the unit.

It also sets the datatype to NTDouble if it is NTInt.

Set the value type.

Definition at line 648 of file ExprNodeRep.h.

References vtype_p.

const IPosition & casa::TableExprNodeRep::shape ( ) const [inline]

Get the fixed shape (same for all rows).

Definition at line 672 of file ExprNodeRep.h.

References shape_p.

Get the shape for the given row.

It returns the fixed shape if defined, otherwise getShape(id).

virtual void casa::TableExprNodeRep::show ( ostream &  ,
uInt  indent 
) const [virtual]

Get table.

This gets the Table object to which a TableExprNode belongs. A TableExprNode belongs to the Table to which the column(s) used in an expression belong. Note that all columns in an expression have to belong to the same table.

Definition at line 676 of file ExprNodeRep.h.

References table_p.

Referenced by casa::TableExprNode::table().

const Table & casa::TableExprNodeRep::table ( ) const [inline]

Definition at line 678 of file ExprNodeRep.h.

References table_p.

Convert a NodeDataType to a string.

Convert a ValueType to a string.

const Unit & casa::TableExprNodeRep::unit ( ) const [inline]

Get the unit.

Definition at line 664 of file ExprNodeRep.h.

References unit_p.

Referenced by casa::TableExprNode::unit().

static void casa::TableExprNodeRep::unlink ( TableExprNodeRep ) [static]

Unlink from the given object.

If its reference count is zero, delete it.

Get the value type.

Definition at line 644 of file ExprNodeRep.h.

References vtype_p.

Referenced by casa::TableExprNode::isScalar().


Member Data Documentation

Definition at line 416 of file ExprNodeRep.h.

Definition at line 411 of file ExprNodeRep.h.

Referenced by link().

Definition at line 413 of file ExprNodeRep.h.

Referenced by dataType().

Definition at line 417 of file ExprNodeRep.h.

Referenced by exprType(), fillExprType(), and isConstant().

Definition at line 418 of file ExprNodeRep.h.

Referenced by ndim().

Definition at line 415 of file ExprNodeRep.h.

Referenced by operType().

Definition at line 420 of file ExprNodeRep.h.

Referenced by shape().

Definition at line 412 of file ExprNodeRep.h.

Referenced by checkTablePtr(), and table().

Definition at line 421 of file ExprNodeRep.h.

Referenced by unit().

Definition at line 414 of file ExprNodeRep.h.

Referenced by setValueType(), and valueType().


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