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

Used to concatenate simple GBT tables. More...

#include <GBTSimpleTable.h>

List of all members.

Public Member Functions

 GBTSimpleTable (const String &tableName, const String &indexColumn=String(""))
 open an already existing table, use the optional index column
 GBTSimpleTable (Table &attachTable, const String &attachKeywordName, const String &tableName, const String &indexColumn=String(""))
 create a new, empty table attached to the given table at the given keyword name, supply an optional index column
 ~GBTSimpleTable ()
void add (const Table &other)
 append the given table to the end of this table adding columns as required, any columns with the same name must have the same type and dimensionality
void add (const RecordInterface &other, Bool nextIndex=True)
 append this record to the end of this table.
uInt nrow ()
 how many rows in this table
const Int index ()
 the current value of the index, returns -1 if this table isn't indexed
const Table & table ()
 return a const reference to the underlying table being filled
void flush ()
 flush this table

Private Member Functions

void updateTableRow ()
void checkRecord (const RecordInterface &other)
 this checks the record and adds columns as required
void attachIndexCol (const String &indexColumn)
void setIndex (Int rownr, Bool nextIndex=True)
 GBTSimpleTable ()
 Undefined and unavailable.
 GBTSimpleTable (const GBTSimpleTable &other)
GBTSimpleTableoperator= (const GBTSimpleTable &other)

Private Attributes

Table * tab_p
TableRow * tabRow_p
Int index_p
ScalarColumn< Int > indexCol_p

Detailed Description

Used to concatenate simple GBT tables.

Intended use:

Internal

Review Status

Date Reviewed:
yyyy/mm/dd

Prerequisite

Etymology

This contains a Table to which other Tables can be appended. Its quite simple and it it used by the GBTBackendFillers.

Synopsis

Example

Motivation

The GBT backend FITS files generally have ancilliar tables such as PHASE and RECEIVER. In the resulting MS, these are just appended to the end of a subtable. This class contains those subtables and does the appending.

With MS 2, this is somewhat more complicated and hence this class probably needs a better name.

To Do

Definition at line 85 of file GBTSimpleTable.h.


Constructor & Destructor Documentation

GBTSimpleTable::GBTSimpleTable ( const String tableName,
const String indexColumn = String("") 
)

open an already existing table, use the optional index column

GBTSimpleTable::GBTSimpleTable ( Table &  attachTable,
const String attachKeywordName,
const String tableName,
const String indexColumn = String("") 
)

create a new, empty table attached to the given table at the given keyword name, supply an optional index column

Undefined and unavailable.

GBTSimpleTable::GBTSimpleTable ( const GBTSimpleTable other) [private]

Member Function Documentation

void GBTSimpleTable::add ( const Table &  other)

append the given table to the end of this table adding columns as required, any columns with the same name must have the same type and dimensionality

void GBTSimpleTable::add ( const RecordInterface &  other,
Bool  nextIndex = True 
)

append this record to the end of this table.

Each field in the record maps to a column in the the table. There must be no subrecords. The types of the fields must match that in the existing table. Fields not already in the table will result in new columns for that table

void GBTSimpleTable::attachIndexCol ( const String indexColumn) [private]
void GBTSimpleTable::checkRecord ( const RecordInterface &  other) [private]

this checks the record and adds columns as required

void GBTSimpleTable::flush ( ) [inline]

flush this table

Definition at line 125 of file GBTSimpleTable.h.

References tab_p.

Referenced by GBTGOFiller::flush(), and GBTIFFiller::flush().

const Int GBTSimpleTable::index ( ) [inline]

the current value of the index, returns -1 if this table isn't indexed

Definition at line 119 of file GBTSimpleTable.h.

References index_p.

Referenced by GBTIFFiller::index().

uInt GBTSimpleTable::nrow ( ) [inline]

how many rows in this table

Definition at line 115 of file GBTSimpleTable.h.

References tab_p.

GBTSimpleTable& GBTSimpleTable::operator= ( const GBTSimpleTable other) [private]
void GBTSimpleTable::setIndex ( Int  rownr,
Bool  nextIndex = True 
) [private]
const Table& GBTSimpleTable::table ( ) [inline]

return a const reference to the underlying table being filled

Definition at line 122 of file GBTSimpleTable.h.

References tab_p.

void GBTSimpleTable::updateTableRow ( ) [private]

Member Data Documentation

Int GBTSimpleTable::index_p [private]

Definition at line 130 of file GBTSimpleTable.h.

Referenced by index().

ScalarColumn<Int> GBTSimpleTable::indexCol_p [private]

Definition at line 131 of file GBTSimpleTable.h.

Table* GBTSimpleTable::tab_p [private]

Definition at line 127 of file GBTSimpleTable.h.

Referenced by flush(), nrow(), and table().

TableRow* GBTSimpleTable::tabRow_p [private]

Definition at line 128 of file GBTSimpleTable.h.


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