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

A class to provide easy read-write access to NewCalTable columns. More...

#include <CTColumns.h>

Inheritance diagram for casa::CTColumns:
casa::CTMainColumns

List of all members.

Public Member Functions

 CTColumns (NewCalTable &caltable)
 Create a columns object that accesses the data in the specified caltable.
 ~CTColumns ()
 The destructor does nothing special.
CTObservationColumnsobservation ()
 Read-write access to required subtables.
CTAntennaColumnsantenna ()
CTFieldColumnsfield ()
CTHistoryColumnshistory ()
CTSpWindowColumnsspectralWindow ()
const ROCTObservationColumnsobservation () const
 Read-write access to optional subtables.
const ROCTAntennaColumnsantenna () const
const ROCTFieldColumnsfield () const
const ROCTHistoryColumnshistory () const
const ROCTSpWindowColumnsspectralWindow () const

Private Attributes

CTObservationColumns observation_p
 protected: friend class NewCalTable;
CTAntennaColumns antenna_p
CTFieldColumns field_p
CTHistoryColumns history_p
CTSpWindowColumns spectralWindow_p

Detailed Description

A class to provide easy read-write access to NewCalTable columns.

Intended use:

Public interface

Prerequisite

Etymology

CTColumns stands for NewCalTable columns.

Synopsis

This class provides access to all the subtables and direct access to all the columns in the NewCalTable. 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.

Example

    // use as follows
    NewCalTable newcalt("mynewcalt",Table::Update);
    CTColumns nctc(newcalt);
    // show time from row 5
    cout << nctc.time()(5);
    // change name of antenna on row 3 in antenna table
    nctc.antenna().name().put(3,"NewAnt-3");

Motivation

Having to type long lists of Scalar and Array column declarations gets very tedious. This class attempts to relieve some of that tedium, while at the same time concentrating all the declarations in one place, making Type errors in the column declaration (only caught at run-time) less probable. Type errors in the use of the columns is caught at compile time.

Definition at line 179 of file CTColumns.h.


Constructor & Destructor Documentation

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

The destructor does nothing special.


Member Function Documentation

Definition at line 191 of file CTColumns.h.

References antenna_p.

const ROCTAntennaColumns& casa::CTColumns::antenna ( ) const [inline]

Definition at line 205 of file CTColumns.h.

References antenna_p.

Definition at line 192 of file CTColumns.h.

References field_p.

const ROCTFieldColumns& casa::CTColumns::field ( ) const [inline]

Definition at line 206 of file CTColumns.h.

References field_p.

Definition at line 193 of file CTColumns.h.

References history_p.

const ROCTHistoryColumns& casa::CTColumns::history ( ) const [inline]

Definition at line 207 of file CTColumns.h.

References history_p.

Read-write access to required subtables.

Definition at line 190 of file CTColumns.h.

References observation_p.

Read-write access to optional subtables.

Read-only access to required subtables

Definition at line 204 of file CTColumns.h.

References observation_p.

Definition at line 194 of file CTColumns.h.

References spectralWindow_p.

Definition at line 208 of file CTColumns.h.

References spectralWindow_p.


Member Data Documentation

Definition at line 217 of file CTColumns.h.

Referenced by antenna().

Definition at line 218 of file CTColumns.h.

Referenced by field().

Definition at line 219 of file CTColumns.h.

Referenced by history().

protected: friend class NewCalTable;

Access to subtables

Definition at line 216 of file CTColumns.h.

Referenced by observation().

Definition at line 220 of file CTColumns.h.

Referenced by spectralWindow().


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