TableKeywords.h

Classes

TableKeywords -- Keyword values representing tables (full description)

class TableKeywords : public TypedKeywords<Table>

Interface

Public Members
TableKeywords (KeywordSet* pool, DataType, const DataType& dflt)
~TableKeywords()
void getData (AipsIO& ios, Bool openWritable)
Private Members
TableKeywords (const TableKeywords&)
TableKeywords& operator= (const TableKeywords&)

Description

Review Status

Reviewed By:
Gareth Hunt
Date Reviewed:
94Nov17

Prerequisite

Synopsis

TableKeywords represents the set of keywords containing tables. It is derived from TypedKeywords and adds one thing. When reading the table back, a switch is passed to tell if the table should be opened as read/write or as readonly. In this way a table can force that the tables in its keywords are opened in the same way as the table itself.

In the future possible other things could be done:

To the user this class is identical to TypedKeywords

. All TypedKeywords functions can be used in the standard way.

Motivation

This class provides the extra functionality for keywords containing tables. This is needed because tables are much more complex entities than scalars or arrays.

Example

    // Open the table and get access to the table keyword set.
    // Use that to get access to the keywords containing tables.
    Table table("table.data");
    const TableKeywordSet& keyset = table.keywordSet();
    const TableKeywords& tkeys = keyset.keysTable();
    // Now get the table assigned to keyword keytab.
    Table keyTab = tkeys("keytab");
    // Of course it could be combined into one statement:
    //     Table keyTab = table.keywordSet().keysTable()("keytab");
    

To Do

Member Description

TableKeywords (KeywordSet* pool, DataType, const DataType& dflt)

Construct with a given name pool and the data type used. The default value is needed for the SimpleOrderedMap constructor.

~TableKeywords()

void getData (AipsIO& ios, Bool openWritable)

Read from AipsIO stream.

TableKeywords (const TableKeywords&)

Forbid copy constructor.

TableKeywords& operator= (const TableKeywords&)

Forbid assignment.


Copyright © 1995 Associated Universities Inc., Washington, D.C.