casa
$Rev:20696$
|
Class to define columns of scalar records in tables. More...
#include <ScaRecordColDesc.h>
Public Member Functions | |
ScalarRecordColumnDesc (const String &name) | |
Construct the column with the given name. | |
ScalarRecordColumnDesc (const String &name, const String &comment) | |
Construct the column with the given name and comment. | |
ScalarRecordColumnDesc (const String &name, const String &comment, const String &dataManName, const String &dataManGroup) | |
Construct the column with the given name, comment, and default data manager type and group. | |
ScalarRecordColumnDesc (const ScalarRecordColumnDesc &) | |
Copy constructor (copy semantics);. | |
~ScalarRecordColumnDesc () | |
ScalarRecordColumnDesc & | operator= (const ScalarRecordColumnDesc &) |
Assignment (copy semantics);. | |
virtual BaseColumnDesc * | clone () const |
Clone this column description. | |
virtual String | className () const |
Get the name of this class. | |
virtual PlainColumn * | makeColumn (ColumnSet *) const |
Create a Column object out of this. | |
virtual void | show (ostream &os) const |
Show the column. | |
Static Public Member Functions | |
static BaseColumnDesc * | makeDesc (const String &name) |
Create the object from AipsIO (this function is registered by ColumnDesc.cc). | |
Private Member Functions | |
virtual void | putDesc (AipsIO &) const |
Put the object. | |
virtual void | getDesc (AipsIO &) |
Get the object. | |
Friends | |
class | ColumnDesc |
Class to define columns of scalar records in tables.
Public interface
This class builds descriptions of table columns where each cell (which may also be called a row) will hold a scalar record value.
ScalarRecordColumnDesc is the class for defining a table column containing scalar record values. The only record class supported is TableRecord .
This class is similar to the templated class ScalarColumnDesc used to define column descriptions for scalars with a standard data type.
The data managers handle a record as an indirect Vector of uChar, because class ScalarRecordColumnData converts a record to such a vector before passing it to the data manager.
This class is derived from BaseColumnDesc , thus the functions in there also apply to this class.
Once a column description is setup satisfactorily, it must be added to a table description before it can be used by the table system.
TableDesc tabDesc("tTableDesc", "1", TableDesc::New); // Add a scalar integer column ac, define keywords for it // and define a default value 0. ScalarRecordColumnDesc<Int> acColumn("ac"); acColumn.rwKeywordSet().define ("scale", Complex(0)); acColumn.rwKeywordSet().define ("unit", ""); acColumn.setDefault (0); tabDesc.addColumn (acColumn); // Add another column, now with data type String.\. // This can be added directly, because no special things like // keywords or default values have to be set. tabDesc.addColumn (ScalarRecordColumnDesc<String>("name", "comments"));
This class resembles the templated class ScalarColumnDesc a lot, but is different enough to make that templated class not usable for records.
In principle it could have been a template specialization, but not all compilers support specializations so well.
Definition at line 120 of file ScaRecordColDesc.h.
casa::ScalarRecordColumnDesc::ScalarRecordColumnDesc | ( | const String & | name | ) | [explicit] |
Construct the column with the given name.
The data manager type defaults to the StandardStMan storage manager. The data manager group defaults to the data manager type.
casa::ScalarRecordColumnDesc::ScalarRecordColumnDesc | ( | const String & | name, |
const String & | comment | ||
) |
Construct the column with the given name and comment.
The data manager type defaults to the StandardStMan storage manager. The data manager group defaults to the data manager type.
casa::ScalarRecordColumnDesc::ScalarRecordColumnDesc | ( | const String & | name, |
const String & | comment, | ||
const String & | dataManName, | ||
const String & | dataManGroup | ||
) |
Construct the column with the given name, comment, and default data manager type and group.
A blank data manager group defaults to the data manager type.
Copy constructor (copy semantics);.
virtual String casa::ScalarRecordColumnDesc::className | ( | ) | const [virtual] |
Get the name of this class.
It is used by the registration process.
Implements casa::BaseColumnDesc.
virtual BaseColumnDesc* casa::ScalarRecordColumnDesc::clone | ( | ) | const [virtual] |
Clone this column description.
Implements casa::BaseColumnDesc.
virtual void casa::ScalarRecordColumnDesc::getDesc | ( | AipsIO & | ) | [private, virtual] |
Get the object.
Implements casa::BaseColumnDesc.
virtual PlainColumn* casa::ScalarRecordColumnDesc::makeColumn | ( | ColumnSet * | ) | const [virtual] |
Create a Column object out of this.
This is used by class ColumnSet to construct a table column object.
Implements casa::BaseColumnDesc.
static BaseColumnDesc* casa::ScalarRecordColumnDesc::makeDesc | ( | const String & | name | ) | [static] |
Create the object from AipsIO (this function is registered by ColumnDesc.cc).
ScalarRecordColumnDesc& casa::ScalarRecordColumnDesc::operator= | ( | const ScalarRecordColumnDesc & | ) |
Assignment (copy semantics);.
virtual void casa::ScalarRecordColumnDesc::putDesc | ( | AipsIO & | ) | const [private, virtual] |
Put the object.
Implements casa::BaseColumnDesc.
virtual void casa::ScalarRecordColumnDesc::show | ( | ostream & | os | ) | const [virtual] |
Show the column.
Implements casa::BaseColumnDesc.
friend class ColumnDesc [friend] |
Reimplemented from casa::BaseColumnDesc.
Definition at line 122 of file ScaRecordColDesc.h.