Loading...
Searching...
No Matches
casacore::ScalarRecordColumnDesc Class Reference
tables package (libcasa_tables) » Tables_module

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.
Public Member Functions inherited from casacore::BaseColumnDesc
| BaseColumnDesc (const String &name, const String &comment, const String &dataManagerType, const String &dataManagerGroup, DataType, const String &dataTypeId, Int options, uInt ndim, const IPosition &shape, Bool isScalar, Bool isArray, Bool isTable)
| Construct the column base object.
| BaseColumnDesc (const BaseColumnDesc &)
| Copy constructor (copy semantics).
virtual | ~BaseColumnDesc ()
TableRecord & | rwKeywordSet ()
| Get access to the set of keywords.
const TableRecord & | keywordSet () const
const String & | name () const
| Get the name of the column.
DataType | dataType () const
| Get the data type of the column.
const String & | dataTypeId () const
| Get the type id for non-standard data types (i.e.
const String & | dataManagerType () const
| Get the type name of the default data manager.
String & | dataManagerType ()
| Get the type name of the default data manager.
const String & | dataManagerGroup () const
| Get the data manager group.
String & | dataManagerGroup ()
| Get the data manager group.
void | setDefaultDataManager (Bool always)
| Set the data manager type and group to the default.
const String & | comment () const
| Get comment string.
String & | comment ()
| Get comment string (allowing it to be changed).
Int | options () const
| Get the options.
Bool | isScalar () const
| Test if column is scalar, array or table.
Bool | isArray () const
Bool | isTable () const
Int | ndim () const
| Get the number of dimensions.
const IPosition & | shape () const
| Get the predefined shape.
void | setNdim (uInt ndim)
| Set the number of dimensions.
void | setShape (const IPosition &shape)
| Set the predefined shape.
void | setShape (const IPosition &shape, Bool directOption)
void | setOptions (Int options)
| Set the options to the given value.
uInt | maxLength () const
| Get the maximum value length.
void | setMaxLength (uInt maxLength)
| Set the maximum value length.
const TableDesc * | tableDesc () const
| Get table description (in case column contains subtables).
virtual TableDesc * | tableDesc ()
void | setName (const String &name)
| Set the name of the column (for a rename).

## 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

## Additional Inherited Members

Protected Member Functions inherited from casacore::BaseColumnDesc
BaseColumnDesc & | operator= (const BaseColumnDesc &)
| Assignment (copy semantics).
void | putFile (AipsIO &, const TableAttr &) const
| Put the object.
void | getFile (AipsIO &, const TableAttr &)
| Get the object.
RefColumn * | makeRefColumn (RefTable *, BaseColumn *) const
| Make a RefColumn object out of the description.
virtual ConcatColumn * | makeConcatColumn (ConcatTable *) const
| Make a ConcatColumn object out of the description.
Protected Attributes inherited from casacore::BaseColumnDesc
String | colName_p
String | comment_p
String | dataManType_p
String | dataManGroup_p
DataType | dtype_p
String | dtypeId_p
Int | option_p
Int | nrdim_p
IPosition | shape_p
uInt | maxLength_p
TableRecord * | keySetPtr_p
Bool | isScalar_p
Bool | isArray_p
Bool | isTable_p

## Detailed Description

Class to define columns of scalar records in tables

### Review Status

Reviewed By:
  Wim Brouw
Date Reviewed:
  1998/12/09
Test programs:
  tTableDesc

### Intended use:

Public interface

### Prerequisite

- ColumnDesc
- TableDesc
- TableRecord

### Etymology

This class builds descriptions of table columns where each cell (which may also be called a row) will hold a scalar record value.

### Synopsis

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.

### Example

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"));
casacore::ScalarRecordColumnDesc::ScalarRecordColumnDesc
ScalarRecordColumnDesc(const String &name)
Construct the column with the given name.
casacore::TableDesc
Definition TableDesc.h:189
casacore::TableDesc::New
@ New
Definition TableDesc.h:193

### Motivation

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.

### To Do

- Introduce a class ArrayRecordColumnDesc to support arrays of records.

Definition at line 117 of file ScaRecordColDesc.h.

## Constructor & Destructor Documentation

## ScalarRecordColumnDesc() [1/4]

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

References casacore::BaseColumnDesc::name().

Referenced by operator=(), and ScalarRecordColumnDesc().

## ScalarRecordColumnDesc() [2/4]

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

References casacore::BaseColumnDesc::comment(), and casacore::BaseColumnDesc::name().

## ScalarRecordColumnDesc() [3/4]

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

References casacore::BaseColumnDesc::comment(), and casacore::BaseColumnDesc::name().

## ScalarRecordColumnDesc() [4/4]

casacore::ScalarRecordColumnDesc::ScalarRecordColumnDesc | ( | const ScalarRecordColumnDesc & |  | ) |

Copy constructor (copy semantics);.

References ScalarRecordColumnDesc().

## ~ScalarRecordColumnDesc()

casacore::ScalarRecordColumnDesc::~ScalarRecordColumnDesc | ( |  | ) |

## Member Function Documentation

## className()

virtual String casacore::ScalarRecordColumnDesc::className | ( |  | ) | const

virtual

Get the name of this class.

It is used by the registration process.

Implements casacore::BaseColumnDesc.

## clone()

virtual BaseColumnDesc * casacore::ScalarRecordColumnDesc::clone | ( |  | ) | const

virtual

Clone this column description.

Implements casacore::BaseColumnDesc.

References casacore::BaseColumnDesc::BaseColumnDesc().

## getDesc()

virtual void casacore::ScalarRecordColumnDesc::getDesc | ( | AipsIO & |  | ) |

private virtual

Get the object.

Implements casacore::BaseColumnDesc.

## makeColumn()

virtual PlainColumn * casacore::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 casacore::BaseColumnDesc.

## makeDesc()

BaseColumnDesc * casacore::ScalarRecordColumnDesc::makeDesc | ( | const String & | name | ) |

static

Create the object from AipsIO (this function is registered by ColumnDesc.cc).

References casacore::BaseColumnDesc::BaseColumnDesc(), and casacore::BaseColumnDesc::name().

## operator=()

ScalarRecordColumnDesc & casacore::ScalarRecordColumnDesc::operator= | ( | const ScalarRecordColumnDesc & |  | ) |

Assignment (copy semantics);.

References ScalarRecordColumnDesc().

## putDesc()

virtual void casacore::ScalarRecordColumnDesc::putDesc | ( | AipsIO & |  | ) | const

private virtual

Put the object.

Implements casacore::BaseColumnDesc.

## show()

virtual void casacore::ScalarRecordColumnDesc::show | ( | ostream & | os | ) | const

virtual

Show the column.

Implements casacore::BaseColumnDesc.

## Friends And Related Symbol Documentation

## ColumnDesc

friend class ColumnDesc

friend

Definition at line 119 of file ScaRecordColDesc.h.

References ColumnDesc.

Referenced by ColumnDesc.

The documentation for this class was generated from the following file:

- tables/Tables/ScaRecordColDesc.h