MSDataDescColumns.h

Classes

ROMSDataDescColumns -- A class to provide easy read-only access to MSDataDesc columns (full description)
MSDataDescColumns -- A class to provide easy read-write access to MSDataDescription columns (full description)

class ROMSDataDescColumns

Interface

Public Members
ROMSDataDescColumns(const MSDataDescription& msDataDesc)
~ROMSDataDescColumns()
const ROScalarColumn<Bool>& flagRow() const
const ROScalarColumn<Int>& polarizationId() const
const ROScalarColumn<Int>& spectralWindowId() const
const ROScalarColumn<Int>& lagId() const
uInt nrow() const
Int match(uInt spwId, uInt polId, Int tryRow=-1)
Protected Members
ROMSDataDescColumns()
void attach(const MSDataDescription& msDataDesc)
Private Members
ROMSDataDescColumns(const ROMSDataDescColumns&)
ROMSDataDescColumns& operator=(const ROMSDataDescColumns&)
void attachOptionalCols(const MSDataDescription& msDataDesc)

Description

Review Status

Reviewed By:
Bob Garwood
Date Reviewed:
1997/02/01

Prerequisite

Etymology

ROMSDataDescColumns stands for Read-Only MeasurementSet DataDesc Table columns.

Synopsis

This class provides read-only access to the columns in the MSDataDesc Table. It does the declaration of all the Scalar and ArrayColumns with the correct types, so the application programmer doesn't have to worry about getting those right. There is an access function for every predefined column. Access to non-predefined columns will still have to be done with explicit declarations. See ROMSColumns for an example.
Warning The Table that is used to construct this class must not be destroyed (or go out of scope) before this class does. Otherwise the scalar and array columns use by this class will be left dangling.

Motivation

See MSColumns for the motivation.

Member Description

ROMSDataDescColumns(const MSDataDescription& msDataDesc)

Create a columns object that accesses the data in the specified Table

~ROMSDataDescColumns()

The destructor does nothing special

const ROScalarColumn<Bool>& flagRow() const
const ROScalarColumn<Int>& polarizationId() const
const ROScalarColumn<Int>& spectralWindowId() const

Access to required columns

const ROScalarColumn<Int>& lagId() const

Access to optional columns

uInt nrow() const

Convenience function that returns the number of rows in any of the columns

Int match(uInt spwId, uInt polId, Int tryRow=-1)

returns the last row that contains the specified entries in the SPECTRAL_WINDOW_ID & POLARIZATION_ID columns. Returns -1 if no match could be found. Flagged rows can never match. If tryRow is non-negative, then that row is tested to see if it matches before any others are tested. Setting tryRow to a positive value greater than the table length will throw an exception (AipsError).

ROMSDataDescColumns()

void attach(const MSDataDescription& msDataDesc)

ROMSDataDescColumns(const ROMSDataDescColumns&)

ROMSDataDescColumns& operator=(const ROMSDataDescColumns&)

void attachOptionalCols(const MSDataDescription& msDataDesc)


class MSDataDescColumns: public ROMSDataDescColumns

Interface

Public Members
MSDataDescColumns(MSDataDescription& msDataDesc)
~MSDataDescColumns()
ScalarColumn<Bool>& flagRow()
ScalarColumn<Int>& polarizationId()
ScalarColumn<Int>& spectralWindowId()
ScalarColumn<Int>& lagId()
const ROScalarColumn<Bool>& flagRow() const
const ROScalarColumn<Int>& polarizationId() const
const ROScalarColumn<Int>& spectralWindowId() const
const ROScalarColumn<Int>& lagId() const
Protected Members
MSDataDescColumns()
void attach(MSDataDescription& msDataDesc)
Private Members
MSDataDescColumns(const MSDataDescColumns&)
MSDataDescColumns& operator=(const MSDataDescColumns&)
void attachOptionalCols(MSDataDescription& msDataDesc)

Description

Review Status

Reviewed By:
Bob Garwood
Date Reviewed:
1997/02/01

Prerequisite

Etymology

MSDataDescColumns stands for MeasurementSet DataDescription Table columns.

Synopsis

This class provides access to the columns in the MSDataDesc Table, it does the declaration of all the Scalar and ArrayColumns with the correct types, so the application programmer doesn't have to worry about getting those right. There is an access function for every predefined column. Access to non-predefined columns will still have to be done with explicit declarations. See MSColumns for an example.
Warning The Table that is used to construct this class must not be destroyed (or go out of scope) before this class does. Otherwise the scalar and array columns use by this class will be left dangling.

Motivation

See MSColumns for the motivation.

Member Description

MSDataDescColumns(MSDataDescription& msDataDesc)

Create a columns object that accesses the data in the specified Table

~MSDataDescColumns()

The destructor does nothing special

ScalarColumn<Bool>& flagRow()
ScalarColumn<Int>& polarizationId()
ScalarColumn<Int>& spectralWindowId()

Read-write access to required columns

ScalarColumn<Int>& lagId()

read-write access to optional columns

const ROScalarColumn<Bool>& flagRow() const
const ROScalarColumn<Int>& polarizationId() const
const ROScalarColumn<Int>& spectralWindowId() const

Read-only access to required columns

const ROScalarColumn<Int>& lagId() const

Read-only access to optional columns

MSDataDescColumns()

void attach(MSDataDescription& msDataDesc)

MSDataDescColumns(const MSDataDescColumns&)

MSDataDescColumns& operator=(const MSDataDescColumns&)

void attachOptionalCols(MSDataDescription& msDataDesc)