casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
casacore::ROMSDataDescColumns Class Reference

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

#include <MSDataDescColumns.h>

Inheritance diagram for casacore::ROMSDataDescColumns:
casacore::MSDataDescColumns

Public Member Functions

 ROMSDataDescColumns (const MSDataDescription &msDataDesc)
 Create a columns object that accesses the data in the specified Table. More...
 
 ~ROMSDataDescColumns ()
 The destructor does nothing special. More...
 
const ROScalarColumn< Bool > & flagRow () const
 Access to required columns. More...
 
const ROScalarColumn< Int > & polarizationId () const
 
const ROScalarColumn< Int > & spectralWindowId () const
 
const ROScalarColumn< Int > & lagId () const
 Access to optional columns. More...
 
uInt nrow () const
 Convenience function that returns the number of rows in any of the columns. More...
 
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. More...
 

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

casacore::ROMSDataDescColumns::ROMSDataDescColumns ( const MSDataDescription msDataDesc)

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

casacore::ROMSDataDescColumns::~ROMSDataDescColumns ( )

The destructor does nothing special.

casacore::ROMSDataDescColumns::ROMSDataDescColumns ( )
protected
casacore::ROMSDataDescColumns::ROMSDataDescColumns ( const ROMSDataDescColumns )
private

Member Function Documentation

void casacore::ROMSDataDescColumns::attach ( const MSDataDescription msDataDesc)
protected
void casacore::ROMSDataDescColumns::attachOptionalCols ( const MSDataDescription msDataDesc)
private
const ROScalarColumn<Bool>& casacore::ROMSDataDescColumns::flagRow ( ) const
inline

Access to required columns.

Definition at line 85 of file MSDataDescColumns.h.

References flagRow_p.

Referenced by casacore::MSDataDescColumns::flagRow().

const ROScalarColumn<Int>& casacore::ROMSDataDescColumns::lagId ( ) const
inline

Access to optional columns.

Definition at line 93 of file MSDataDescColumns.h.

References lagId_p.

Referenced by casacore::MSDataDescColumns::lagId().

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

uInt casacore::ROMSDataDescColumns::nrow ( ) const
inline

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& casacore::ROMSDataDescColumns::operator= ( const ROMSDataDescColumns )
private
const ROScalarColumn<Int>& casacore::ROMSDataDescColumns::polarizationId ( ) const
inline

Definition at line 86 of file MSDataDescColumns.h.

References polarizationId_p.

Referenced by casacore::MSDataDescColumns::polarizationId().

const ROScalarColumn<Int>& casacore::ROMSDataDescColumns::spectralWindowId ( ) const
inline

Definition at line 87 of file MSDataDescColumns.h.

References spectralWindowId_p.

Referenced by casacore::MSDataDescColumns::spectralWindowId().

Member Data Documentation

ROScalarColumn<Bool> casacore::ROMSDataDescColumns::flagRow_p
private

Definition at line 125 of file MSDataDescColumns.h.

Referenced by flagRow(), and nrow().

ROScalarColumn<Int> casacore::ROMSDataDescColumns::lagId_p
private

Definition at line 129 of file MSDataDescColumns.h.

Referenced by lagId().

ROScalarColumn<Int> casacore::ROMSDataDescColumns::polarizationId_p
private

Definition at line 126 of file MSDataDescColumns.h.

Referenced by polarizationId().

ROScalarColumn<Int> casacore::ROMSDataDescColumns::spectralWindowId_p
private

Definition at line 127 of file MSDataDescColumns.h.

Referenced by spectralWindowId().


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