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

A class to provide easy read-only access to MSDataDesc columns. More...

#include <MSDataDescColumns.h>

Inheritance diagram for casa::ROMSDataDescColumns:
casa::MSDataDescColumns

List of all members.

Public Member Functions

 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
 Access to required columns.
const ROScalarColumn< Int > & polarizationId () const
const ROScalarColumn< Int > & spectralWindowId () const
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.

Protected Member Functions

 ROMSDataDescColumns ()
void attach (const MSDataDescription &msDataDesc)

Private Member Functions

 ROMSDataDescColumns (const ROMSDataDescColumns &)
ROMSDataDescColumnsoperator= (const ROMSDataDescColumns &)
void attachOptionalCols (const MSDataDescription &msDataDesc)

Private Attributes

ROScalarColumn< BoolflagRow_p
ROScalarColumn< IntpolarizationId_p
ROScalarColumn< IntspectralWindowId_p
ROScalarColumn< IntlagId_p

Detailed Description

A class to provide easy read-only access to MSDataDesc columns.

Intended use:

Public interface

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.

Definition at line 74 of file MSDataDescColumns.h.


Constructor & Destructor Documentation

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

The destructor does nothing special.


Member Function Documentation

void casa::ROMSDataDescColumns::attach ( const MSDataDescription msDataDesc) [protected]
void casa::ROMSDataDescColumns::attachOptionalCols ( const MSDataDescription msDataDesc) [private]

Access to required columns.

Reimplemented in casa::MSDataDescColumns.

Definition at line 85 of file MSDataDescColumns.h.

References flagRow_p.

Access to optional columns.

Reimplemented in casa::MSDataDescColumns.

Definition at line 93 of file MSDataDescColumns.h.

References lagId_p.

Int casa::ROMSDataDescColumns::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).

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

Definition at line 97 of file MSDataDescColumns.h.

References flagRow_p.

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

Reimplemented in casa::MSDataDescColumns.

Definition at line 86 of file MSDataDescColumns.h.

References polarizationId_p.

Reimplemented in casa::MSDataDescColumns.

Definition at line 87 of file MSDataDescColumns.h.

References spectralWindowId_p.


Member Data Documentation

Reimplemented in casa::MSDataDescColumns.

Definition at line 125 of file MSDataDescColumns.h.

Referenced by flagRow(), and nrow().

Reimplemented in casa::MSDataDescColumns.

Definition at line 129 of file MSDataDescColumns.h.

Referenced by lagId().

Reimplemented in casa::MSDataDescColumns.

Definition at line 126 of file MSDataDescColumns.h.

Referenced by polarizationId().

Reimplemented in casa::MSDataDescColumns.

Definition at line 127 of file MSDataDescColumns.h.

Referenced by spectralWindowId().


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