Loading...
Searching...
No Matches
casacore::TableExprId Class Reference
tables package (libcasa_tables) » TaQL_module

More...

`#include <TableExprId.h>`

## Public Member Functions

| TableExprId ()
| Default constructor sets rownr to -1.
| TableExprId (rownr_t 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.
| ~TableExprId ()
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?
Int64 | rownr () const
| Get the row number.
const RecordInterface & | record () const
| Get the Record reference.
const TableExprData & | data () const
| Get the data reference.
void | setRownr (rownr_t rownr)
| Set the row number.
void | setRecord (const RecordInterface &)
| Set the record.

## Private Attributes

Int | type_p
union { |
Int64 row_p |
const RecordInterface * record_p |
const TableExprData * data_p |
}; |

## Detailed Description

The identification of a TaQL selection subject.

### Intended use:

Public interface

### Review Status

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

### Prerequisite

- TableExprNode.

### 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. It also contains a sequence number (0..n) which is used to get the result calculated by aggregate functions.
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 94 of file TableExprId.h.

## Constructor & Destructor Documentation

## TableExprId() [1/4]

casacore::TableExprId::TableExprId | ( |  | ) |

inline

Default constructor sets rownr to -1.

Definition at line 147 of file TableExprId.h.

References row_p, and type_p.

Referenced by casacore::TableExprIdAggr::cast().

## TableExprId() [2/4]

casacore::TableExprId::TableExprId | ( | rownr_t | rowNumber | ) |

inline

Construct it from a row number.

Definition at line 152 of file TableExprId.h.

References row_p, and type_p.

## TableExprId() [3/4]

casacore::TableExprId::TableExprId | ( | const RecordInterface & | record | ) |

inline

Construct it from a Record object.

Definition at line 157 of file TableExprId.h.

References record(), record_p, casacore::RecordInterface(), and type_p.

## TableExprId() [4/4]

casacore::TableExprId::TableExprId | ( | const TableExprData & | data | ) |

inline

Construct it from pointers to data.

Definition at line 162 of file TableExprId.h.

References data(), data_p, and type_p.

## ~TableExprId()

casacore::TableExprId::~TableExprId | ( |  | ) |

inline

Definition at line 109 of file TableExprId.h.

## Member Function Documentation

## byData()

Bool casacore::TableExprId::byData | ( |  | ) | const

inline

Is the id given as a TableExprData?

Definition at line 202 of file TableExprId.h.

References type_p.

## byRecord()

Bool casacore::TableExprId::byRecord | ( |  | ) | const

inline

Is the id given as a RecordInterface?

Definition at line 197 of file TableExprId.h.

References type_p.

## byRow()

Bool casacore::TableExprId::byRow | ( |  | ) | const

inline

Is the id given by row number?

Definition at line 192 of file TableExprId.h.

References type_p.

## data()

const TableExprData & casacore::TableExprId::data | ( |  | ) | const

inline

Get the data reference.

Definition at line 177 of file TableExprId.h.

References data_p.

Referenced by TableExprId().

## record()

const RecordInterface & casacore::TableExprId::record | ( |  | ) | const

inline

Get the Record reference.

Definition at line 172 of file TableExprId.h.

References record_p, and casacore::RecordInterface().

Referenced by setRecord(), and TableExprId().

## rownr()

Int64 casacore::TableExprId::rownr | ( |  | ) | const

inline

Get the row number.

Definition at line 167 of file TableExprId.h.

References row_p.

Referenced by setRownr().

## setRecord()

void casacore::TableExprId::setRecord | ( | const RecordInterface & | record | ) |

inline

Set the record.

Definition at line 187 of file TableExprId.h.

References record(), record_p, and casacore::RecordInterface().

## setRownr()

void casacore::TableExprId::setRownr | ( | rownr_t | rownr | ) |

inline

Set the row number.

Definition at line 182 of file TableExprId.h.

References row_p, and rownr().

Referenced by casacore::TableParseGroupby::singleKey().

## Member Data Documentation

## [union]

union { ... } casacore::TableExprId

## data_p

const TableExprData* casacore::TableExprId::data_p

Definition at line 141 of file TableExprId.h.

Referenced by data(), and TableExprId().

## record_p

const RecordInterface* casacore::TableExprId::record_p

Definition at line 140 of file TableExprId.h.

Referenced by record(), setRecord(), and TableExprId().

## row_p

Int64 casacore::TableExprId::row_p

Definition at line 139 of file TableExprId.h.

Referenced by rownr(), setRownr(), TableExprId(), and TableExprId().

## type_p

Int casacore::TableExprId::type_p

private

Definition at line 137 of file TableExprId.h.

Referenced by byData(), byRecord(), byRow(), TableExprId(), TableExprId(), TableExprId(), and TableExprId().

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

- tables/TaQL/TableExprId.h