Документ взят из кэша поисковой машины. Адрес оригинального документа : http://www.atnf.csiro.au/computing/software/casacore/casacore-1.2.0/doc/html/classcasa_1_1TableKeyword.html
Дата изменения: Unknown
Дата индексирования: Mon Feb 14 22:05:46 2011
Кодировка:
casacore: casa::TableKeyword Class Reference
Public Member Functions | Private Attributes

casa::TableKeyword Class Reference
[Tables_module_internal_classes]

Keyword value representing a table. More...

#include <TableKeyword.h>

List of all members.

Public Member Functions

 TableKeyword (const String &tableDescName)
 Construct a TableKeyword with the given tableDescName.
 TableKeyword (const Table &table, const String &tableDescName)
 Construct a TableKeyword from a Table.
 TableKeyword (const TableKeyword &that)
 Copy constructor (full copy semantics).
TableKeywordoperator= (const TableKeyword &that)
 Assignment (leaves tableDescName_p untouched).
TableKeywordoperator= (const Table &table)
 ~TableKeyword ()
void set (const String &name, const TableAttr &parentAttr)
 Set the name of the table and the writable switch.
void setRW ()
 Set the keyword to read/write access.
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.
const StringtableName () const
 Get the name of the table.
String tableName (const String &parentName) const
 Get the name of the table relative to parent table.
String tableName (const TableAttr &parentAttr) const
Table table () const
 Get the table.
const TableAttrtableAttributes () const
 Get the table attributes.
void setTableAttributes (const TableAttr &attr)
 Set the table attributes.
void close () const
 Close the table.
void flush (Bool fsync) const
 Flush and optionally fsync the table.
void renameTable (const String &newParentName, const String &oldParentName)
 Rename the table if its path contains the old parent table name.
Bool conform (const TableKeyword &that) const
 Test if the table in other conforms this table keyword.
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.

Private Attributes

Tabletable_p
TableAttr attr_p
String tableDescName_p

Detailed Description

Keyword value representing a table.

Intended use:

Internal

Review Status

Reviewed By:
Mark Wieringa
Date Reviewed:
1996/04/15
Test programs:
tTableRecord

Prerequisite

Synopsis

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:

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

    // Store a table in the keyword set.
    void someFunc (const Table& subTable)
    {
        // Open the table and get access to the table keyword set.
        Table table("table.data", Table::Update);
        TableRecord& keyset = table.rwKeywordSet();
        keyset.defineTable ("KeyTab", subTable);
    }
   
    // Open the table and get the table from keyword KeyTab.
    // It shows that this can be done in one statement.
    Table table("table.data");
    Table subTab = table.keywordSet().asTable ("KeyTab");

Definition at line 119 of file TableKeyword.h.


Constructor & Destructor Documentation

casa::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.

casa::TableKeyword::TableKeyword ( const Table table,
const String tableDescName 
)

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.

casa::TableKeyword::TableKeyword ( const TableKeyword that  ) 

Copy constructor (full copy semantics).

casa::TableKeyword::~TableKeyword (  ) 

Member Function Documentation

void casa::TableKeyword::close (  )  const

Close the table.

Bool casa::TableKeyword::conform ( const Table that  )  const
Bool casa::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 casa::TableKeyword::flush ( Bool  fsync  )  const

Flush and optionally fsync the table.

Bool casa::TableKeyword::isFixed (  )  const [inline]

Has the table a fixed description name? It has when its description name is not empty.

Definition at line 218 of file TableKeyword.h.

Bool casa::TableKeyword::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.

TableKeyword& casa::TableKeyword::operator= ( const TableKeyword that  ) 

Assignment (leaves tableDescName_p untouched).

This is only possible when both objects conform.

TableKeyword& casa::TableKeyword::operator= ( const Table table  ) 
void casa::TableKeyword::renameTable ( const String newParentName,
const String oldParentName 
)

Rename the table if its path contains the old parent table name.

void casa::TableKeyword::set ( const String name,
const TableAttr parentAttr 
)

Set the name of the table and the writable switch.

This is used when reading back a keyword.

void casa::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.

void casa::TableKeyword::setTableAttributes ( const TableAttr attr  )  [inline]

Set the table attributes.

Definition at line 180 of file TableKeyword.h.

References attr_p.

Table casa::TableKeyword::table (  )  const

Get the table.

It will be opened when necessary.

const TableAttr& casa::TableKeyword::tableAttributes (  )  const [inline]

Get the table attributes.

Definition at line 176 of file TableKeyword.h.

References attr_p.

String casa::TableKeyword::tableName ( const TableAttr parentAttr  )  const [inline]

Definition at line 167 of file TableKeyword.h.

String casa::TableKeyword::tableName ( const String parentName  )  const

Get the name of the table relative to parent table.

const String & casa::TableKeyword::tableName (  )  const [inline]

Get the name of the table.

Definition at line 213 of file TableKeyword.h.

References attr_p, and casa::TableAttr::name().


Member Data Documentation

Definition at line 207 of file TableKeyword.h.

Referenced by setTableAttributes(), tableAttributes(), and tableName().

Definition at line 206 of file TableKeyword.h.

Definition at line 208 of file TableKeyword.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines