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

More...

`#include <TableColumn.h>`

## Public Member Functions

| TableColumn ()
| The default constructor creates a null object, i.e.
| TableColumn (const Table &, const String &columnName)
| Construct the object for a column in the table using its name.
| TableColumn (const Table &, uInt columnIndex)
| Construct the object for a column in the table using its index.
| TableColumn (const TableColumn &)
| Copy constructor (reference semantics).
virtual | ~TableColumn ()
TableColumn & | operator= (const TableColumn &)
| Assignment has reference semantics.
virtual TableColumn * | clone () const
| Clone the object.
void | reference (const TableColumn &)
| Change the reference to another column.
void | attach (const Table &table, const String &columnName)
| Attach a column to the object.
void | attach (const Table &table, uInt columnIndex)
Bool | isNull () const
| Test if the object is null, i.e.
void | throwIfNull () const
| Throw an exception if the object is null, i.e.
Bool | isWritable () const
| Test if the column can be written to, thus if the column and the underlying table can be written to.
Bool | isWritableAtAll () const
| Test if the column is writable at all (virtual columns might not be).
void | checkWritable () const
| Check if the column is writable and throw an exception if not.
const TableRecord & | keywordSet () const
| Get readonly access to the column keyword set.
TableRecord & | rwKeywordSet ()
| Get read/write access to the column keyword set.
const ColumnDesc & | columnDesc () const
| Get const access to the column description.
Table | table () const
| Get the Table object this column belongs to.
rownr_t | nrow () const
| Get the number of rows in the column.
Bool | canChangeShape () const
| Can the shape of an already existing non-FixedShape array be changed?
uInt | ndimColumn () const
| Get the global #dimensions of an array (ie.
IPosition | shapeColumn () const
| Get the global shape of an array (ie.
Bool | isDefined (rownr_t rownr) const
| Test if the given cell contains a defined value.
Bool | hasContent (rownr_t rownr=0) const
| Does the column has content in the given row (default is the first row)?
uInt | ndim (rownr_t rownr) const
| Get the #dimensions of an array in a particular cell.
IPosition | shape (rownr_t rownr) const
| Get the shape of an array in a particular cell.
IPosition | tileShape (rownr_t rownr) const
| Get the tile shape of an array in a particular cell.
void | getScalar (rownr_t rownr, Bool &value) const
| Get the value of a scalar in the given row.
void | getScalar (rownr_t rownr, uChar &value) const
void | getScalar (rownr_t rownr, Short &value) const
void | getScalar (rownr_t rownr, uShort &value) const
void | getScalar (rownr_t rownr, Int &value) const
void | getScalar (rownr_t rownr, uInt &value) const
void | getScalar (rownr_t rownr, Int64 &value) const
void | getScalar (rownr_t rownr, float &value) const
void | getScalar (rownr_t rownr, double &value) const
void | getScalar (rownr_t rownr, Complex &value) const
void | getScalar (rownr_t rownr, DComplex &value) const
void | getScalar (rownr_t rownr, String &value) const
Bool | asBool (rownr_t rownr) const
| Get the value from the row and convert it to the required type.
uChar | asuChar (rownr_t rownr) const
Short | asShort (rownr_t rownr) const
uShort | asuShort (rownr_t rownr) const
Int | asInt (rownr_t rownr) const
uInt | asuInt (rownr_t rownr) const
Int64 | asInt64 (rownr_t rownr) const
float | asfloat (rownr_t rownr) const
double | asdouble (rownr_t rownr) const
Complex | asComplex (rownr_t rownr) const
DComplex | asDComplex (rownr_t rownr) const
String | asString (rownr_t rownr) const
void | getScalarValue (rownr_t rownr, Bool *value, const String &) const
| Get the value of a scalar in the given row.
void | getScalarValue (rownr_t rownr, uChar *value, const String &) const
void | getScalarValue (rownr_t rownr, Short *value, const String &) const
void | getScalarValue (rownr_t rownr, uShort *value, const String &) const
void | getScalarValue (rownr_t rownr, Int *value, const String &) const
void | getScalarValue (rownr_t rownr, uInt *value, const String &) const
void | getScalarValue (rownr_t rownr, Int64 *value, const String &) const
void | getScalarValue (rownr_t rownr, float *value, const String &) const
void | getScalarValue (rownr_t rownr, double *value, const String &) const
void | getScalarValue (rownr_t rownr, Complex *value, const String &) const
void | getScalarValue (rownr_t rownr, DComplex *value, const String &) const
void | getScalarValue (rownr_t rownr, String *value, const String &) const
void | getScalarValue (rownr_t rownr, void *value, const String &dataTypeId) const
void | put (rownr_t rownr, const TableColumn &that, Bool preserveTileShape=False)
| Copy the value of a cell of that column to a cell of this column.
virtual void | put (rownr_t thisRownr, const TableColumn &that, rownr_t thatRownr, Bool preserveTileShape=False)
| Use possibly different row numbers for that (i.e.
void | putColumn (const TableColumn &that)
| Copy the values of that column to this column.
void | putScalar (rownr_t rownr, const Bool &value)
| Put the value of a scalar in the given row.
void | putScalar (rownr_t rownr, const uChar &value)
void | putScalar (rownr_t rownr, const Short &value)
void | putScalar (rownr_t rownr, const uShort &value)
void | putScalar (rownr_t rownr, const Int &value)
void | putScalar (rownr_t rownr, const uInt &value)
void | putScalar (rownr_t rownr, const Int64 &value)
void | putScalar (rownr_t rownr, const float &value)
void | putScalar (rownr_t rownr, const double &value)
void | putScalar (rownr_t rownr, const Complex &value)
void | putScalar (rownr_t rownr, const DComplex &value)
void | putScalar (rownr_t rownr, const String &value)
void | putScalar (rownr_t rownr, const Char *value)
void | checkRowNumber (rownr_t rownr) const
| Check if the row number is valid.
void | setMaximumCacheSize (uInt nbytes) const
| Set the maximum cache size (in bytes) to be used by a storage manager.

## Protected Member Functions

BaseColumn * | baseColPtr () const
| Get the baseColPtr_p of this TableColumn object.
BaseColumn * | baseColPtr (const TableColumn &that) const
| Get the baseColPtr_p of another TableColumn object.

## Protected Attributes

BaseTable * | baseTabPtr_p
BaseColumn * | baseColPtr_p
const ColumnCache * | colCachePtr_p
Bool | canChangeShape_p
Bool | isColWritable_p

## Private Member Functions

void | throwNotWritable () const
| Throw the exception that the column is not writable.

## Friends

class | ForwardColumn

## Detailed Description

Read/write access to a table column

### Intended use:

Public interface

### Review Status

Reviewed By:
  dschieb
Date Reviewed:
  1994/08/10
Test programs:
  none

### Prerequisite

- Table
- ColumnDesc

### Synopsis

The class TableColumn gives read and write access to a column in a table. In particular access to the column description (for name, data type, etc.) and to the column keyword set can be obtained. Another important function is isDefined, which tests if a cell (i.e. table row) in a column contains a value.

The classes ScalarColumn<T> and ArrayColumn<T> have to be used to get/put the data in the column cells. However, TableColumn has get functions for the basic data types (Bool, uChar, Short, uSort, Int, uInt, Int64, float, double, Complex, DComplex and String). Opposite to the get functions in ScalarColumn<T>, the TableColumn get functions support data type promotion.

A default constructor is defined to allow construction of an array of TableColumn objects. However, this constructs an object not referencing a column. Functions like get, etc. will fail (i.e. result in a segmentation fault) when used on such objects. The functions isNull and throwIfNull can be used to test on this. The functions attach and reference can fill in the object.

### Example

See module Tables.

Definition at line 96 of file TableColumn.h.

## Constructor & Destructor Documentation

## TableColumn() [1/4]

casacore::TableColumn::TableColumn | ( |  | ) |

The default constructor creates a null object, i.e.

it does not reference a table column. The sole purpose of this constructor is to allow construction of an array of TableColumn objects. The functions reference and attach can be used to make a null object reference a column. Note that get functions, etc. will cause a segmentation fault when operating on a null object. It was felt it was too expensive to test on null over and over again. The user should use the isNull or throwIfNull function in case of doubt.

Referenced by casacore::ArrayColumnBase::ArrayColumnBase(), attach(), attach(), baseColPtr(), casacore::ScalarColumn< T >::clone(), clone(), operator=(), casacore::ScalarColumn< T >::put(), casacore::ScalarColumn< T >::put(), put(), put(), putColumn(), reference(), casacore::ScalarColumn< T >::ScalarColumn(), and TableColumn().

## TableColumn() [2/4]

casacore::TableColumn::TableColumn | ( | const Table & | ,
|  | const String & | columnName )

Construct the object for a column in the table using its name.

## TableColumn() [3/4]

casacore::TableColumn::TableColumn | ( | const Table & | ,
|  | uInt | columnIndex )

Construct the object for a column in the table using its index.

This allows to loop through all columns in a table as:

for (uInt=0; i<tab.ncolumn(); i++) {
TableColumn tabcol(tab,i);
}
casacore::TableColumn::TableColumn
TableColumn()
The default constructor creates a null object, i.e.
casacore::uInt
unsigned int uInt
Definition aipstype.h:49

## TableColumn() [4/4]

casacore::TableColumn::TableColumn | ( | const TableColumn & |  | ) |

Copy constructor (reference semantics).

References TableColumn().

## ~TableColumn()

virtual casacore::TableColumn::~TableColumn | ( |  | ) |

virtual

## Member Function Documentation

## asBool()

Bool casacore::TableColumn::asBool | ( | rownr_t | rownr | ) | const

Get the value from the row and convert it to the required type.

This can only be used for scalar columns with a standard data type.

## asComplex()

Complex casacore::TableColumn::asComplex | ( | rownr_t | rownr | ) | const

## asDComplex()

DComplex casacore::TableColumn::asDComplex | ( | rownr_t | rownr | ) | const

## asdouble()

double casacore::TableColumn::asdouble | ( | rownr_t | rownr | ) | const

## asfloat()

float casacore::TableColumn::asfloat | ( | rownr_t | rownr | ) | const

## asInt()

Int casacore::TableColumn::asInt | ( | rownr_t | rownr | ) | const

## asInt64()

Int64 casacore::TableColumn::asInt64 | ( | rownr_t | rownr | ) | const

## asShort()

Short casacore::TableColumn::asShort | ( | rownr_t | rownr | ) | const

## asString()

String casacore::TableColumn::asString | ( | rownr_t | rownr | ) | const

## asuChar()

uChar casacore::TableColumn::asuChar | ( | rownr_t | rownr | ) | const

## asuInt()

uInt casacore::TableColumn::asuInt | ( | rownr_t | rownr | ) | const

## asuShort()

uShort casacore::TableColumn::asuShort | ( | rownr_t | rownr | ) | const

## attach() [1/2]

void casacore::TableColumn::attach | ( | const Table & | table,
|  | const String & | columnName )

inline

Attach a column to the object.

This is in fact only a shorthand for <
reference (TableColumn (table, columnName));

Definition at line 151 of file TableColumn.h.

References reference(), table(), and TableColumn().

## attach() [2/2]

void casacore::TableColumn::attach | ( | const Table & | table,
|  | uInt | columnIndex )

inline

Definition at line 153 of file TableColumn.h.

References reference(), table(), and TableColumn().

## baseColPtr() [1/2]

BaseColumn * casacore::TableColumn::baseColPtr | ( |  | ) | const

inline protected

Get the baseColPtr_p of this TableColumn object.

Definition at line 393 of file TableColumn.h.

References baseColPtr_p.

## baseColPtr() [2/2]

BaseColumn * casacore::TableColumn::baseColPtr | ( | const TableColumn & | that | ) | const

inline protected

Get the baseColPtr_p of another TableColumn object.

This is needed for function put, because baseColPtr_p is a protected member of TableColumn. Another TableColumn has no access to that.

Definition at line 400 of file TableColumn.h.

References baseColPtr_p, and TableColumn().

## canChangeShape()

Bool casacore::TableColumn::canChangeShape | ( |  | ) | const

inline

Can the shape of an already existing non-FixedShape array be changed?

This depends on the storage manager. Most storage managers can handle it, but TiledDataStMan and TiledColumnStMan can not.

Definition at line 201 of file TableColumn.h.

References canChangeShape_p.

## checkRowNumber()

void casacore::TableColumn::checkRowNumber | ( | rownr_t | rownr | ) | const

inline

Check if the row number is valid.

It throws an exception if out of range.

Definition at line 377 of file TableColumn.h.

References baseTabPtr_p.

## checkWritable()

void casacore::TableColumn::checkWritable | ( |  | ) | const

inline

Check if the column is writable and throw an exception if not.

Definition at line 176 of file TableColumn.h.

References isWritable(), and throwNotWritable().

Referenced by casacore::ScalarColumn< T >::put().

## clone()

virtual TableColumn * casacore::TableColumn::clone | ( |  | ) | const

virtual

Clone the object.

Reimplemented in casacore::ArrayColumn< T >, casacore::ArrayColumn< Bool >, casacore::ArrayColumn< casacore::String >, casacore::ArrayColumn< Complex >, casacore::ArrayColumn< DComplex >, casacore::ArrayColumn< Double >, casacore::ArrayColumn< Float >, casacore::ArrayColumn< Int >, casacore::ArrayColumn< Int64 >, casacore::ArrayColumn< Short >, casacore::ArrayColumn< StoredType >, casacore::ArrayColumn< uChar >, casacore::ArrayColumn< uInt >, casacore::ArrayColumn< uShort >, casacore::ScalarColumn< T >, casacore::ScalarColumn< Bool >, casacore::ScalarColumn< casacore::String >, casacore::ScalarColumn< casacore::TableRecord >, casacore::ScalarColumn< Double >, casacore::ScalarColumn< Float >, casacore::ScalarColumn< Int >, casacore::ScalarColumn< int >, casacore::ScalarColumn< uInt >, and casacore::ScalarColumn< VirtualType >.

References TableColumn().

## columnDesc()

const ColumnDesc & casacore::TableColumn::columnDesc | ( |  | ) | const

Get const access to the column description.

ColumnDesc functions have to be used to get the data type, etc..

## getScalar() [1/12]

void casacore::TableColumn::getScalar | ( | rownr_t | rownr,
|  | Bool & | value ) const

inline

Get the value of a scalar in the given row.

Data type promotion is possible. These functions only work for the standard data types.

Definition at line 240 of file TableColumn.h.

References baseColPtr_p, casacore::NewDelAllocator< T >::value, and TABLECOLUMNCHECKROW.

## getScalar() [2/12]

void casacore::TableColumn::getScalar | ( | rownr_t | rownr,
|  | Complex & | value ) const

inline

Definition at line 258 of file TableColumn.h.

References baseColPtr_p, casacore::NewDelAllocator< T >::value, and TABLECOLUMNCHECKROW.

## getScalar() [3/12]

void casacore::TableColumn::getScalar | ( | rownr_t | rownr,
|  | DComplex & | value ) const

inline

Definition at line 260 of file TableColumn.h.

References baseColPtr_p, casacore::NewDelAllocator< T >::value, and TABLECOLUMNCHECKROW.

## getScalar() [4/12]

void casacore::TableColumn::getScalar | ( | rownr_t | rownr,
|  | double & | value ) const

inline

Definition at line 256 of file TableColumn.h.

References baseColPtr_p, casacore::NewDelAllocator< T >::value, and TABLECOLUMNCHECKROW.

## getScalar() [5/12]

void casacore::TableColumn::getScalar | ( | rownr_t | rownr,
|  | float & | value ) const

inline

Definition at line 254 of file TableColumn.h.

References baseColPtr_p, casacore::NewDelAllocator< T >::value, and TABLECOLUMNCHECKROW.

## getScalar() [6/12]

void casacore::TableColumn::getScalar | ( | rownr_t | rownr,
|  | Int & | value ) const

inline

Definition at line 248 of file TableColumn.h.

References baseColPtr_p, casacore::NewDelAllocator< T >::value, and TABLECOLUMNCHECKROW.

## getScalar() [7/12]

void casacore::TableColumn::getScalar | ( | rownr_t | rownr,
|  | Int64 & | value ) const

inline

Definition at line 252 of file TableColumn.h.

References baseColPtr_p, casacore::NewDelAllocator< T >::value, and TABLECOLUMNCHECKROW.

## getScalar() [8/12]

void casacore::TableColumn::getScalar | ( | rownr_t | rownr,
|  | Short & | value ) const

inline

Definition at line 244 of file TableColumn.h.

References baseColPtr_p, casacore::NewDelAllocator< T >::value, and TABLECOLUMNCHECKROW.

## getScalar() [9/12]

void casacore::TableColumn::getScalar | ( | rownr_t | rownr,
|  | String & | value ) const

inline

Definition at line 262 of file TableColumn.h.

References baseColPtr_p, casacore::NewDelAllocator< T >::value, and TABLECOLUMNCHECKROW.

## getScalar() [10/12]

void casacore::TableColumn::getScalar | ( | rownr_t | rownr,
|  | uChar & | value ) const

inline

Definition at line 242 of file TableColumn.h.

References baseColPtr_p, casacore::NewDelAllocator< T >::value, and TABLECOLUMNCHECKROW.

## getScalar() [11/12]

void casacore::TableColumn::getScalar | ( | rownr_t | rownr,
|  | uInt & | value ) const

inline

Definition at line 250 of file TableColumn.h.

References baseColPtr_p, casacore::NewDelAllocator< T >::value, and TABLECOLUMNCHECKROW.

## getScalar() [12/12]

void casacore::TableColumn::getScalar | ( | rownr_t | rownr,
|  | uShort & | value ) const

inline

Definition at line 246 of file TableColumn.h.

References baseColPtr_p, casacore::NewDelAllocator< T >::value, and TABLECOLUMNCHECKROW.

## getScalarValue() [1/13]

void casacore::TableColumn::getScalarValue | ( | rownr_t | rownr,
|  | Bool * | value,
|  | const String & | ) const

inline

Get the value of a scalar in the given row.

These functions work for all data types. Data type promotion is possible for the standard data types. The functions are primarily meant for ScalarColumn<T>.

Definition at line 288 of file TableColumn.h.

References baseColPtr_p, casacore::NewDelAllocator< T >::value, and TABLECOLUMNCHECKROW.

## getScalarValue() [2/13]

void casacore::TableColumn::getScalarValue | ( | rownr_t | rownr,
|  | Complex * | value,
|  | const String & | ) const

inline

Definition at line 306 of file TableColumn.h.

References baseColPtr_p, casacore::NewDelAllocator< T >::value, and TABLECOLUMNCHECKROW.

## getScalarValue() [3/13]

void casacore::TableColumn::getScalarValue | ( | rownr_t | rownr,
|  | DComplex * | value,
|  | const String & | ) const

inline

Definition at line 308 of file TableColumn.h.

References baseColPtr_p, casacore::NewDelAllocator< T >::value, and TABLECOLUMNCHECKROW.

## getScalarValue() [4/13]

void casacore::TableColumn::getScalarValue | ( | rownr_t | rownr,
|  | double * | value,
|  | const String & | ) const

inline

Definition at line 304 of file TableColumn.h.

References baseColPtr_p, casacore::NewDelAllocator< T >::value, and TABLECOLUMNCHECKROW.

## getScalarValue() [5/13]

void casacore::TableColumn::getScalarValue | ( | rownr_t | rownr,
|  | float * | value,
|  | const String & | ) const

inline

Definition at line 302 of file TableColumn.h.

References baseColPtr_p, casacore::NewDelAllocator< T >::value, and TABLECOLUMNCHECKROW.

## getScalarValue() [6/13]

void casacore::TableColumn::getScalarValue | ( | rownr_t | rownr,
|  | Int * | value,
|  | const String & | ) const

inline

Definition at line 296 of file TableColumn.h.

References baseColPtr_p, casacore::NewDelAllocator< T >::value, and TABLECOLUMNCHECKROW.

## getScalarValue() [7/13]

void casacore::TableColumn::getScalarValue | ( | rownr_t | rownr,
|  | Int64 * | value,
|  | const String & | ) const

inline

Definition at line 300 of file TableColumn.h.

References baseColPtr_p, casacore::NewDelAllocator< T >::value, and TABLECOLUMNCHECKROW.

## getScalarValue() [8/13]

void casacore::TableColumn::getScalarValue | ( | rownr_t | rownr,
|  | Short * | value,
|  | const String & | ) const

inline

Definition at line 292 of file TableColumn.h.

References baseColPtr_p, casacore::NewDelAllocator< T >::value, and TABLECOLUMNCHECKROW.

## getScalarValue() [9/13]

void casacore::TableColumn::getScalarValue | ( | rownr_t | rownr,
|  | String * | value,
|  | const String & | ) const

inline

Definition at line 310 of file TableColumn.h.

References baseColPtr_p, casacore::NewDelAllocator< T >::value, and TABLECOLUMNCHECKROW.

## getScalarValue() [10/13]

void casacore::TableColumn::getScalarValue | ( | rownr_t | rownr,
|  | uChar * | value,
|  | const String & | ) const

inline

Definition at line 290 of file TableColumn.h.

References baseColPtr_p, casacore::NewDelAllocator< T >::value, and TABLECOLUMNCHECKROW.

## getScalarValue() [11/13]

void casacore::TableColumn::getScalarValue | ( | rownr_t | rownr,
|  | uInt * | value,
|  | const String & | ) const

inline

Definition at line 298 of file TableColumn.h.

References baseColPtr_p, casacore::NewDelAllocator< T >::value, and TABLECOLUMNCHECKROW.

## getScalarValue() [12/13]

void casacore::TableColumn::getScalarValue | ( | rownr_t | rownr,
|  | uShort * | value,
|  | const String & | ) const

inline

Definition at line 294 of file TableColumn.h.

References baseColPtr_p, casacore::NewDelAllocator< T >::value, and TABLECOLUMNCHECKROW.

## getScalarValue() [13/13]

void casacore::TableColumn::getScalarValue | ( | rownr_t | rownr,
|  | void * | value,
|  | const String & | dataTypeId ) const

inline

Definition at line 312 of file TableColumn.h.

References baseColPtr_p, casacore::NewDelAllocator< T >::value, and TABLECOLUMNCHECKROW.

## hasContent()

Bool casacore::TableColumn::hasContent | ( | rownr_t | rownr = 0 | ) | const

Does the column has content in the given row (default is the first row)?

It has if it is defined and does not contain an empty array.

## isDefined()

Bool casacore::TableColumn::isDefined | ( | rownr_t | rownr | ) | const

inline

Test if the given cell contains a defined value.

Definition at line 217 of file TableColumn.h.

References baseColPtr_p, and TABLECOLUMNCHECKROW.

## isNull()

Bool casacore::TableColumn::isNull | ( |  | ) | const

inline

Test if the object is null, i.e.

does not reference a column.

Definition at line 158 of file TableColumn.h.

References baseColPtr_p, casacore::False, and casacore::True.

## isWritable()

Bool casacore::TableColumn::isWritable | ( |  | ) | const

inline

Test if the column can be written to, thus if the column and the underlying table can be written to.

Definition at line 167 of file TableColumn.h.

References baseTabPtr_p, and isColWritable_p.

Referenced by checkWritable().

## isWritableAtAll()

Bool casacore::TableColumn::isWritableAtAll | ( |  | ) | const

inline

Test if the column is writable at all (virtual columns might not be).

Note that keywords can always be written, even for virtual columns.

Definition at line 172 of file TableColumn.h.

References isColWritable_p.

## keywordSet()

const TableRecord & casacore::TableColumn::keywordSet | ( |  | ) | const

inline

Get readonly access to the column keyword set.

Definition at line 180 of file TableColumn.h.

References baseColPtr_p.

## ndim()

uInt casacore::TableColumn::ndim | ( | rownr_t | rownr | ) | const

inline

Get the #dimensions of an array in a particular cell.

Definition at line 225 of file TableColumn.h.

References baseColPtr_p, and TABLECOLUMNCHECKROW.

## ndimColumn()

uInt casacore::TableColumn::ndimColumn | ( |  | ) | const

inline

Get the global #dimensions of an array (ie.

for all cells in column). This is always set for fixed shape arrays. Otherwise, 0 will be returned.

Definition at line 207 of file TableColumn.h.

References baseColPtr_p.

## nrow()

rownr_t casacore::TableColumn::nrow | ( |  | ) | const

inline

Get the number of rows in the column.

Definition at line 195 of file TableColumn.h.

References baseColPtr_p.

## operator=()

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

Assignment has reference semantics.

It copies the object, not the data of that column to this column. Function putColumn can be used to copy the data of a column.
It does the same as the reference function.

References TableColumn().

## put() [1/2]

void casacore::TableColumn::put | ( | rownr_t | rownr,
|  | const TableColumn & | that,
|  | Bool | preserveTileShape = False )

inline

Copy the value of a cell of that column to a cell of this column.

This function only works for the standard data types. Data type promotion will be done if needed. An exception is thrown if this column is not writable or if the data cannot be converted.

Use the same row numbers for both cells.

Definition at line 325 of file TableColumn.h.

References casacore::False, put(), and TableColumn().

Referenced by put().

## put() [2/2]

virtual void casacore::TableColumn::put | ( | rownr_t | thisRownr,
|  | const TableColumn & | that,
|  | rownr_t | thatRownr,
|  | Bool | preserveTileShape = False )

virtual

Use possibly different row numbers for that (i.e.

input) and and this (i.e. output) cell.

Reimplemented in casacore::ArrayColumn< T >, and casacore::ScalarColumn< T >.

References casacore::False, and TableColumn().

## putColumn()

void casacore::TableColumn::putColumn | ( | const TableColumn & | that | ) |

Copy the values of that column to this column.

The numbers of rows in both columns must be equal. Data type promotion is possible. An exception is thrown if the data cannot be converted. This function is useful to copy one column to another without knowing their data types. In fact, this function is an assignment operator with copy semantics.

References TableColumn().

## putScalar() [1/13]

void casacore::TableColumn::putScalar | ( | rownr_t | rownr,
|  | const Bool & | value )

inline

Put the value of a scalar in the given row.

Data type promotion is possible. These functions only work for the standard data types.

Definition at line 347 of file TableColumn.h.

References baseColPtr_p, casacore::NewDelAllocator< T >::value, and TABLECOLUMNCHECKROW.

Referenced by putScalar().

## putScalar() [2/13]

void casacore::TableColumn::putScalar | ( | rownr_t | rownr,
|  | const Char * | value )

inline

Definition at line 371 of file TableColumn.h.

References casacore::NewDelAllocator< T >::value, and putScalar().

## putScalar() [3/13]

void casacore::TableColumn::putScalar | ( | rownr_t | rownr,
|  | const Complex & | value )

inline

Definition at line 365 of file TableColumn.h.

References baseColPtr_p, casacore::NewDelAllocator< T >::value, and TABLECOLUMNCHECKROW.

## putScalar() [4/13]

void casacore::TableColumn::putScalar | ( | rownr_t | rownr,
|  | const DComplex & | value )

inline

Definition at line 367 of file TableColumn.h.

References baseColPtr_p, casacore::NewDelAllocator< T >::value, and TABLECOLUMNCHECKROW.

## putScalar() [5/13]

void casacore::TableColumn::putScalar | ( | rownr_t | rownr,
|  | const double & | value )

inline

Definition at line 363 of file TableColumn.h.

References baseColPtr_p, casacore::NewDelAllocator< T >::value, and TABLECOLUMNCHECKROW.

## putScalar() [6/13]

void casacore::TableColumn::putScalar | ( | rownr_t | rownr,
|  | const float & | value )

inline

Definition at line 361 of file TableColumn.h.

References baseColPtr_p, casacore::NewDelAllocator< T >::value, and TABLECOLUMNCHECKROW.

## putScalar() [7/13]

void casacore::TableColumn::putScalar | ( | rownr_t | rownr,
|  | const Int & | value )

inline

Definition at line 355 of file TableColumn.h.

References baseColPtr_p, casacore::NewDelAllocator< T >::value, and TABLECOLUMNCHECKROW.

## putScalar() [8/13]

void casacore::TableColumn::putScalar | ( | rownr_t | rownr,
|  | const Int64 & | value )

inline

Definition at line 359 of file TableColumn.h.

References baseColPtr_p, casacore::NewDelAllocator< T >::value, and TABLECOLUMNCHECKROW.

## putScalar() [9/13]

void casacore::TableColumn::putScalar | ( | rownr_t | rownr,
|  | const Short & | value )

inline

Definition at line 351 of file TableColumn.h.

References baseColPtr_p, casacore::NewDelAllocator< T >::value, and TABLECOLUMNCHECKROW.

## putScalar() [10/13]

void casacore::TableColumn::putScalar | ( | rownr_t | rownr,
|  | const String & | value )

inline

Definition at line 369 of file TableColumn.h.

References baseColPtr_p, casacore::NewDelAllocator< T >::value, and TABLECOLUMNCHECKROW.

## putScalar() [11/13]

void casacore::TableColumn::putScalar | ( | rownr_t | rownr,
|  | const uChar & | value )

inline

Definition at line 349 of file TableColumn.h.

References baseColPtr_p, casacore::NewDelAllocator< T >::value, and TABLECOLUMNCHECKROW.

## putScalar() [12/13]

void casacore::TableColumn::putScalar | ( | rownr_t | rownr,
|  | const uInt & | value )

inline

Definition at line 357 of file TableColumn.h.

References baseColPtr_p, casacore::NewDelAllocator< T >::value, and TABLECOLUMNCHECKROW.

## putScalar() [13/13]

void casacore::TableColumn::putScalar | ( | rownr_t | rownr,
|  | const uShort & | value )

inline

Definition at line 353 of file TableColumn.h.

References baseColPtr_p, casacore::NewDelAllocator< T >::value, and TABLECOLUMNCHECKROW.

## reference()

void casacore::TableColumn::reference | ( | const TableColumn & |  | ) |

Change the reference to another column.

This is in fact an assignment operator with reference semantics. It removes the reference to the current column and creates a reference to the column referenced in the other object. It will handle null objects correctly.

References TableColumn().

Referenced by attach(), and attach().

## rwKeywordSet()

TableRecord & casacore::TableColumn::rwKeywordSet | ( |  | ) |

Get read/write access to the column keyword set.

An exception is thrown if the table is not writable.

## setMaximumCacheSize()

void casacore::TableColumn::setMaximumCacheSize | ( | uInt | nbytes | ) | const

inline

Set the maximum cache size (in bytes) to be used by a storage manager.

Definition at line 381 of file TableColumn.h.

References baseColPtr_p.

## shape()

IPosition casacore::TableColumn::shape | ( | rownr_t | rownr | ) | const

inline

Get the shape of an array in a particular cell.

Definition at line 229 of file TableColumn.h.

References baseColPtr_p, and TABLECOLUMNCHECKROW.

## shapeColumn()

IPosition casacore::TableColumn::shapeColumn | ( |  | ) | const

inline

Get the global shape of an array (ie.

for all cells in the column). This is always set for fixed shape arrays. Otherwise, a 0-dim shape will be returned.

Definition at line 213 of file TableColumn.h.

References baseColPtr_p.

## table()

Table casacore::TableColumn::table | ( |  | ) | const

Get the Table object this column belongs to.

Referenced by casacore::ArrayColumn< T >::attach(), casacore::ScalarColumn< T >::attach(), attach(), and attach().

## throwIfNull()

void casacore::TableColumn::throwIfNull | ( |  | ) | const

Throw an exception if the object is null, i.e.

if function isNull() is True.

## throwNotWritable()

void casacore::TableColumn::throwNotWritable | ( |  | ) | const

private

Throw the exception that the column is not writable.

Referenced by checkWritable().

## tileShape()

IPosition casacore::TableColumn::tileShape | ( | rownr_t | rownr | ) | const

inline

Get the tile shape of an array in a particular cell.

Definition at line 233 of file TableColumn.h.

References baseColPtr_p, and TABLECOLUMNCHECKROW.

Referenced by casacore::ArrayColumn< T >::setShape(), and casacore::ArrayColumnBase::setShape().

## Friends And Related Symbol Documentation

## ForwardColumn

friend class ForwardColumn

friend

Definition at line 98 of file TableColumn.h.

References ForwardColumn.

Referenced by ForwardColumn.

## Member Data Documentation

## baseColPtr_p

BaseColumn* casacore::TableColumn::baseColPtr_p

protected

Definition at line 386 of file TableColumn.h.

Referenced by baseColPtr(), baseColPtr(), casacore::ArrayColumnBase::baseGet(), casacore::ArrayColumnBase::baseGetSlice(), casacore::ArrayColumnBase::basePut(), casacore::ArrayColumnBase::basePutSlice(), casacore::ScalarColumn< T >::get(), getScalar(), getScalar(), getScalar(), getScalar(), getScalar(), getScalar(), getScalar(), getScalar(), getScalar(), getScalar(), getScalar(), getScalar(), getScalarValue(), getScalarValue(), getScalarValue(), getScalarValue(), getScalarValue(), getScalarValue(), getScalarValue(), getScalarValue(), getScalarValue(), getScalarValue(), getScalarValue(), getScalarValue(), getScalarValue(), isDefined(), isNull(), keywordSet(), casacore::ArrayColumn< T >::ndim(), casacore::ArrayColumnBase::ndim(), ndim(), ndimColumn(), nrow(), casacore::ScalarColumn< T >::put(), putScalar(), putScalar(), putScalar(), putScalar(), putScalar(), putScalar(), putScalar(), putScalar(), putScalar(), putScalar(), putScalar(), putScalar(), setMaximumCacheSize(), casacore::ArrayColumn< T >::shape(), casacore::ArrayColumnBase::shape(), shape(), shapeColumn(), and tileShape().

## baseTabPtr_p

BaseTable* casacore::TableColumn::baseTabPtr_p

protected

Definition at line 385 of file TableColumn.h.

Referenced by checkRowNumber(), and isWritable().

## canChangeShape_p

Bool casacore::TableColumn::canChangeShape_p

protected

Definition at line 388 of file TableColumn.h.

Referenced by canChangeShape().

## colCachePtr_p

const ColumnCache* casacore::TableColumn::colCachePtr_p

protected

Definition at line 387 of file TableColumn.h.

Referenced by casacore::ScalarColumn< T >::get().

## isColWritable_p

Bool casacore::TableColumn::isColWritable_p

protected

Definition at line 389 of file TableColumn.h.

Referenced by isWritable(), and isWritableAtAll().

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

- tables/Tables/TableColumn.h