casacore
|
Keyword value representing a table. More...
#include <TableKeyword.h>
Public Member Functions | |
TableKeyword (const String &tableDescName) | |
Construct a TableKeyword with the given tableDescName. More... | |
TableKeyword (const Table &table, const String &tableDescName) | |
Construct a TableKeyword from a Table. More... | |
TableKeyword (const TableKeyword &that) | |
Copy constructor (full copy semantics). More... | |
TableKeyword & | operator= (const TableKeyword &that) |
Assignment (leaves tableDescName_p untouched). More... | |
TableKeyword & | operator= (const Table &table) |
~TableKeyword () | |
void | set (const String &name, const TableAttr &parentAttr) |
Set the name of the table and the writable switch. More... | |
void | setRW () |
Set the keyword to read/write access. More... | |
Bool | isMultiUsed (Bool checkSubTables) const |
Is the table in use in another process? If checkSubTables is set, it is also checked if a subtable is used in another process. More... | |
const String & | tableName () const |
Get the name of the table. More... | |
String | tableName (const String &parentName) const |
Get the name of the table relative to parent table. More... | |
String | tableName (const TableAttr &parentAttr) const |
Table | table (const TableLock *lockOptions=0) const |
Get the table. More... | |
const TableAttr & | tableAttributes () const |
Get the table attributes. More... | |
void | setTableAttributes (const TableAttr &attr) |
Set the table attributes. More... | |
void | close () const |
Close the table. More... | |
void | flush (Bool fsync) const |
Flush and optionally fsync the table. More... | |
void | renameTable (const String &newParentName, const String &oldParentName) |
Rename the table if its path contains the old parent table name. More... | |
Bool | conform (const TableKeyword &that) const |
Test if the table in other conforms this table keyword. More... | |
Bool | conform (const Table &that) const |
Bool | isFixed () const |
Has the table a fixed description name? It has when its description name is not empty. More... | |
Private Attributes | |
Table * | table_p |
TableAttr | attr_p |
String | tableDescName_p |
Keyword value representing a table.
Internal
TableKeyword represents a record keyword field containing a table. It is used by class TableRecord, which in its turn is meant to be used by the Table class. It serves the following purposes:
This class provides the extra functionality for keywords containing tables. This is needed because tables are much more complex entities than scalars or arrays.
Definition at line 121 of file TableKeyword.h.
casacore::TableKeyword::TableKeyword | ( | const String & | tableDescName | ) |
Construct a TableKeyword with the given tableDescName.
When the tableDescName is empty the keyword is variable structured. Otherwise it is fixed structured, meaning that only tables with a description of that name can be assigned to this keyword.
Construct a TableKeyword from a Table.
When the tableDescName is empty the keyword is variable structured. Otherwise it is fixed structured, meaning that only tables with a description of that name can be assigned to this keyword.
casacore::TableKeyword::TableKeyword | ( | const TableKeyword & | that | ) |
Copy constructor (full copy semantics).
casacore::TableKeyword::~TableKeyword | ( | ) |
void casacore::TableKeyword::close | ( | ) | const |
Close the table.
Bool casacore::TableKeyword::conform | ( | const TableKeyword & | that | ) | const |
Test if the table in other conforms this table keyword.
It conforms when this description name is blank or matches the table description name of the other.
void casacore::TableKeyword::flush | ( | Bool | fsync | ) | const |
Flush and optionally fsync the table.
|
inline |
Has the table a fixed description name? It has when its description name is not empty.
Definition at line 222 of file TableKeyword.h.
References casacore::String::empty(), and tableDescName_p.
Is the table in use in another process? If checkSubTables
is set, it is also checked if a subtable is used in another process.
TableKeyword& casacore::TableKeyword::operator= | ( | const TableKeyword & | that | ) |
Assignment (leaves tableDescName_p untouched).
This is only possible when both objects conform.
TableKeyword& casacore::TableKeyword::operator= | ( | const Table & | table | ) |
void casacore::TableKeyword::renameTable | ( | const String & | newParentName, |
const String & | oldParentName | ||
) |
Rename the table if its path contains the old parent table name.
Set the name of the table and the writable switch.
This is used when reading back a keyword.
void casacore::TableKeyword::setRW | ( | ) |
Set the keyword to read/write access.
If the table is already open, it will be reopened with read/write access if the table is writable.
|
inline |
Get the table.
It will be opened when necessary. If given, the lockOptions will be used instead of the ones in the table attributes.
|
inline |
|
inline |
Get the name of the table.
Definition at line 217 of file TableKeyword.h.
References attr_p, and casacore::TableAttr::name().
Referenced by tableName().
Get the name of the table relative to parent table.
Definition at line 169 of file TableKeyword.h.
References casacore::TableAttr::name(), and tableName().
|
private |
Definition at line 211 of file TableKeyword.h.
Referenced by setTableAttributes(), tableAttributes(), and tableName().
|
private |
Definition at line 210 of file TableKeyword.h.
|
private |
Definition at line 212 of file TableKeyword.h.
Referenced by isFixed().