casa::TableExprId Class Reference
[Tables]

#include <TableExprId.h>

Collaboration diagram for casa::TableExprId:

Collaboration graph
[legend]
List of all members.

Detailed Description

The identification of a TaQL selection subject.

Intended use:

Part of API

Review Status

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

Prerequisite

Synopsis

This class provides the user the ability to identify the data objects to test in a TaQL expression. In this way a TaQL expression is not limited to tables, but can be used for any set of data. Three types are available:

  1. A row number giving the row to test in a table.
  2. A RecordInterface object giving the record to test.
  3. A TableExprData object giving the abstract base class of an object holding the data to test. In this way any data can be used.
The TaQL expression must be setup with this in mind by constructing the appropriate TableExprNode leaf objects.
When used for tables, the function Table::col should be used to create the TableExprNode objects for the table columns to be used in the expression.
For the other cases class TableExprNodeRecordField has to be used to know the index of the fields in the expression. It uses a record (description) for this purpose.

Example

Motivation

This class makes it possible that TaQL can be used in a very versatile way.

Definition at line 95 of file TableExprId.h.

Public Member Functions

 TableExprId (uInt rowNumber)
 Construct it from a row number.
 TableExprId (const RecordInterface &)
 Construct it from a Record object.
 TableExprId (const TableExprData &data)
 Construct it from pointers to data.
Bool byRow () const
 Is the id given by row number?
Bool byRecord () const
 Is the id given as a RecordInterface?
Bool byData () const
 Is the id given as a TableExprData?
uInt rownr () const
 Get the row number.
const RecordInterfacerecord () const
 Get the Record reference.
const TableExprDatadata () const
 Get the data reference.
void setRownr (uInt rownr)
 Set the row number.
void setRecord (const RecordInterface &)
 Set the record.

Private Attributes

uInt row_p
const RecordInterfacerecord_p
const TableExprDatadata_p


Constructor & Destructor Documentation

casa::TableExprId::TableExprId ( uInt  rowNumber  )  [inline]

Construct it from a row number.

Definition at line 139 of file TableExprId.h.

casa::TableExprId::TableExprId ( const RecordInterface  )  [inline]

Construct it from a Record object.

Definition at line 145 of file TableExprId.h.

casa::TableExprId::TableExprId ( const TableExprData data  )  [inline]

Construct it from pointers to data.

Definition at line 151 of file TableExprId.h.


Member Function Documentation

Bool casa::TableExprId::byRow (  )  const [inline]

Is the id given by row number?

Definition at line 182 of file TableExprId.h.

References data_p, and record_p.

Bool casa::TableExprId::byRecord (  )  const [inline]

Is the id given as a RecordInterface?

Definition at line 187 of file TableExprId.h.

References record_p.

Bool casa::TableExprId::byData (  )  const [inline]

Is the id given as a TableExprData?

Definition at line 192 of file TableExprId.h.

References data_p.

uInt casa::TableExprId::rownr (  )  const [inline]

Get the row number.

Definition at line 157 of file TableExprId.h.

References row_p.

const RecordInterface & casa::TableExprId::record (  )  const [inline]

Get the Record reference.

Definition at line 162 of file TableExprId.h.

References record_p.

Referenced by setRecord().

const TableExprData & casa::TableExprId::data (  )  const [inline]

Get the data reference.

Definition at line 167 of file TableExprId.h.

References data_p.

void casa::TableExprId::setRownr ( uInt  rownr  )  [inline]

Set the row number.

Definition at line 172 of file TableExprId.h.

References row_p.

void casa::TableExprId::setRecord ( const RecordInterface  )  [inline]

Set the record.

Definition at line 177 of file TableExprId.h.

References record(), and record_p.


Member Data Documentation

uInt casa::TableExprId::row_p [private]

Definition at line 132 of file TableExprId.h.

Referenced by rownr(), and setRownr().

const RecordInterface* casa::TableExprId::record_p [private]

Definition at line 133 of file TableExprId.h.

Referenced by byRecord(), byRow(), record(), and setRecord().

const TableExprData* casa::TableExprId::data_p [private]

Definition at line 134 of file TableExprId.h.

Referenced by byData(), byRow(), and data().


The documentation for this class was generated from the following file:
Generated on Mon Sep 1 22:45:43 2008 for NRAOCASA by  doxygen 1.5.1