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:
- Open a table when needed, thus when the
keyword is accessed for the first time.
- When a table gets written, it is possible to write it as
part of the parent table.
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
- allow writing into parent table
(this could be done when the keyword table is a scratch table).
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.
void getData (AipsIO& ios, Bool openWritable)
Read from AipsIO stream.
Forbid copy constructor.
TableKeywords& operator= (const TableKeywords&)
Forbid assignment.
Copyright © 1995 Associated Universities Inc., Washington, D.C.