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

More...

`#include <ConcatColumn.h>`

## Public Member Functions

| ConcatColumn (const BaseColumnDesc *, ConcatTable *)
| Construct the ConcatColumn.
| ~ConcatColumn ()
virtual Bool | isWritable () const
| Test if the column is writable in the parent table.
virtual Bool | isStored () const
| Test if the column is stored (otherwise it is virtual).
virtual TableRecord & | rwKeywordSet ()
| Get access to the column keyword set.
virtual TableRecord & | keywordSet ()
virtual rownr_t | nrow () const
| Get nr of rows in the column.
virtual Bool | isDefined (rownr_t rownr) const
| Test if a value in a particular cell has been defined.
virtual void | setShape (rownr_t rownr, const IPosition &shape)
| Set the shape of the array in the given row.
virtual void | setShape (rownr_t rownr, const IPosition &shape, const IPosition &tileShape)
| Set the shape and tile shape of the array in the given row.
virtual uInt | ndimColumn () const
| Get the global #dimensions of an array (i.e.
virtual IPosition | shapeColumn () const
| Get the global shape of an array (i.e.
virtual uInt | ndim (rownr_t rownr) const
| Get the #dimensions of an array in a particular cell.
virtual IPosition | shape (rownr_t rownr) const
| Get the shape of an array in a particular cell.
virtual IPosition | tileShape (rownr_t rownr) const
| Get the tile shape of an array in a particular cell.
virtual Bool | canChangeShape () const
| It can change shape if the underlying column can.
virtual void | initialize (rownr_t startRownr, rownr_t endRownr)
| Initialize the rows from startRownr till endRownr (inclusive) with the default value defined in the column description (if defined).
virtual void | get (rownr_t rownr, void *dataPtr) const
| Get a value from a particular cell.
virtual void | getSlice (rownr_t rownr, const Slicer &, ArrayBase &dataPtr) const
| Get a slice of an N-dimensional array in a particular cell.
virtual void | getArrayColumn (ArrayBase &dataPtr) const
| Get the array of all array values in a column.
virtual void | getColumnSlice (const Slicer &, ArrayBase &dataPtr) const
| Get subsections from all arrays in the column.
virtual void | getArray (rownr_t rownr, ArrayBase &dataPtr) const
| Get an array from a particular cell.
virtual void | getArrayColumnCells (const RefRows &rownrs, ArrayBase &dataPtr) const
| Get the array of some array values in a column.
virtual void | getColumnSliceCells (const RefRows &rownrs, const Slicer &, ArrayBase &dataPtr) const
| Get subsections from some arrays in the column.
virtual void | put (rownr_t rownr, const void *dataPtr)
| Put the scalar value in a particular cell.
virtual void | putArray (rownr_t rownr, const ArrayBase &dataPtr)
| Put the array value in a particular cell.
virtual void | putSlice (rownr_t rownr, const Slicer &, const ArrayBase &dataPtr)
| Put a slice of an N-dimensional array in a particular cell.
virtual void | putArrayColumn (const ArrayBase &dataPtr)
| Put the array of all array values in the column.
virtual void | putColumnSlice (const Slicer &, const ArrayBase &dataPtr)
| Put into subsections of all table arrays in the column.
virtual void | putArrayColumnCells (const RefRows &rownrs, const ArrayBase &dataPtr)
| Get the array of some array values in a column.
virtual void | putColumnSliceCells (const RefRows &rownrs, const Slicer &, const ArrayBase &dataPtr)
| Put subsections of some arrays in the column.
virtual ColumnCache & | columnCache ()
| Get the underlying column cache.
virtual void | setMaximumCacheSize (uInt nbytes)
| Set the maximum cache size (in bytes) to be used by a storage manager.
virtual void | allocIterBuf (void *&lastVal, void *&curVal, std::shared_ptr< BaseCompare > &cmpObj)
| Allocate value buffers for the table iterator.
virtual void | freeIterBuf (void *&lastVal, void *&curVal)
| Free the value buffers allocated by allocIterBuf.
Public Member Functions inherited from casacore::BaseColumn
| BaseColumn (const BaseColumnDesc *)
| Construct it using the given column description.
virtual | ~BaseColumn ()
const ColumnDesc & | columnDesc () const
| Get const access to the column description.
virtual void | getScalarColumn (ArrayBase &dataPtr) const
| Get the vector of all scalar values in a column.
virtual void | getScalarColumnCells (const RefRows &rownrs, ArrayBase &dataPtr) const
| Get the vector of some scalar values in a column.
virtual void | putScalarColumn (const ArrayBase &dataPtr)
| Put the vector of all scalar values in the column.
virtual void | putScalarColumnCells (const RefRows &rownrs, const ArrayBase &dataPtr)
| Get the vector of some scalar values in a column.
void | getScalar (rownr_t rownr, Bool &value) const
| Get the value from the row and convert it to the required type.
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
void | getScalar (rownr_t rownr, TableRecord &value) const
void | getScalar (rownr_t rownr, void *value, const String &dataTypeId) const
| Get a scalar for the other data types.
void | putScalar (rownr_t rownr, const Bool &value)
| Put the value into the row and convert it from the given type.
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 | putScalar (rownr_t rownr, const TableRecord &value)
virtual void | makeSortKey (Sort &, std::shared_ptr< BaseCompare > &cmpObj, Int order, std::shared_ptr< ArrayBase > &dataSave)
| Add this column and its data to the Sort object.
virtual void | makeRefSortKey (Sort &, std::shared_ptr< BaseCompare > &cmpObj, Int order, const Vector< rownr_t > &rownrs, std::shared_ptr< ArrayBase > &dataSave)
| Do it only for the given row numbers.

## Private Types

typedef void | AccessColumnFunc(BaseColumn *col, const Slicer *, ArrayBase &array)
| Define the function to handle access to an entire column.
typedef void | AccessRowsFunc(BaseColumn *col, const RefRows &rows, const Slicer *, ArrayBase &array)
| Define the function to handle access to a number of rows.

## Private Member Functions

void | accessColumn (const Slicer *ns, ArrayBase &dataPtr, AccessColumnFunc *) const
| Access the data for an entire column.
void | accessRows (const RefRows &rownrs, const Slicer *ns, ArrayBase &dataPtr, AccessRowsFunc *) const
| Access the data with multiple rows combined.

## Static Private Member Functions

static void | getColumnPart (BaseColumn *col, const Slicer *, ArrayBase &arr)
| Define the access functions.
static void | putColumnPart (BaseColumn *col, const Slicer *, ArrayBase &arr)
static void | getColumnSlicePart (BaseColumn *col, const Slicer *ns, ArrayBase &arr)
static void | putColumnSlicePart (BaseColumn *col, const Slicer *ns, ArrayBase &arr)
static void | getRowsPart (BaseColumn *col, const RefRows &rows, const Slicer *, ArrayBase &array)
static void | putRowsPart (BaseColumn *col, const RefRows &rows, const Slicer *, ArrayBase &array)
static void | getRowsSlicePart (BaseColumn *col, const RefRows &rows, const Slicer *, ArrayBase &array)
static void | putRowsSlicePart (BaseColumn *col, const RefRows &rows, const Slicer *, ArrayBase &array)

## Additional Inherited Members

Protected Member Functions inherited from casacore::BaseColumn
void | throwGetScalar () const
| Throw exceptions for invalid scalar get or put.
void | throwPutScalar () const
void | throwGetType (const String &type) const
void | throwPutType (const String &type) const
Protected Attributes inherited from casacore::BaseColumn
const BaseColumnDesc * | colDescPtr_p

## Detailed Description

A column in a concatenated table

### Intended use:

Internal

### Review Status

Reviewed By:
  UNKNOWN

### Prerequisite

- ConcatTable
- BaseColumn

### Etymology

ConcatTable represents a column in a ConcatTable. A ConcatTable is a table referencing another table, usually as the result of a select, etc..

### Synopsis

ConcatColumn handles the access of a column in a ConcatTable. It calls the corresponding function in the referenced column while converting the given row number to the row number in the referenced table.

### Motivation

This class is untyped, i.e. not templated. Every call is sent to the underlying referenced BaseColumn which is typed by the virtual function mechanism. A ConcatColumn can never be used directly. A user always has to construct a typed ArrayColumn or ScalarColumn object to access a column. This means everyting is fully type safe.

### To Do

- Act upon removal of rows or the underlying column

Definition at line 88 of file ConcatColumn.h.

## Member Typedef Documentation

## AccessColumnFunc

typedef void casacore::ConcatColumn::AccessColumnFunc(BaseColumn *col, const Slicer *, ArrayBase &array)

private

Define the function to handle access to an entire column.

Definition at line 226 of file ConcatColumn.h.

## AccessRowsFunc

typedef void casacore::ConcatColumn::AccessRowsFunc(BaseColumn *col, const RefRows &rows, const Slicer *, ArrayBase &array)

private

Define the function to handle access to a number of rows.

Definition at line 230 of file ConcatColumn.h.

## Constructor & Destructor Documentation

## ConcatColumn()

casacore::ConcatColumn::ConcatColumn | ( | const BaseColumnDesc * | ,
|  | ConcatTable * | )

Construct the ConcatColumn.

It will point to the given column description, ConcatTable and referenced column. The ConcatTable will be used to convert the rownr to the rownr in the referenced column.

## ~ConcatColumn()

casacore::ConcatColumn::~ConcatColumn | ( |  | ) |

## Member Function Documentation

## accessColumn()

void casacore::ConcatColumn::accessColumn | ( | const Slicer * | ns,
|  | ArrayBase & | dataPtr,
|  | AccessColumnFunc * | ) const

private

Access the data for an entire column.

## accessRows()

void casacore::ConcatColumn::accessRows | ( | const RefRows & | rownrs,
|  | const Slicer * | ns,
|  | ArrayBase & | dataPtr,
|  | AccessRowsFunc * | ) const

private

Access the data with multiple rows combined.

## allocIterBuf()

virtual void casacore::ConcatColumn::allocIterBuf | ( | void *& | lastVal,
|  | void *& | curVal,
|  | std::shared_ptr< BaseCompare > & | cmpObj )

virtual

Allocate value buffers for the table iterator.

Also get a comparison function if undefined. The function freeIterBuf must be called to free the buffers.

Reimplemented from casacore::BaseColumn.

## canChangeShape()

virtual Bool casacore::ConcatColumn::canChangeShape | ( |  | ) | const

virtual

It can change shape if the underlying column can.

Reimplemented from casacore::BaseColumn.

## columnCache()

virtual ColumnCache & casacore::ConcatColumn::columnCache | ( |  | ) |

virtual

Get the underlying column cache.

Implements casacore::BaseColumn.

## freeIterBuf()

virtual void casacore::ConcatColumn::freeIterBuf | ( | void *& | lastVal,
|  | void *& | curVal )

virtual

Free the value buffers allocated by allocIterBuf.

Reimplemented from casacore::BaseColumn.

## get()

virtual void casacore::ConcatColumn::get | ( | rownr_t | rownr,
|  | void * | dataPtr ) const

virtual

Get a value from a particular cell.

Reimplemented from casacore::BaseColumn.

## getArray()

virtual void casacore::ConcatColumn::getArray | ( | rownr_t | rownr,
|  | ArrayBase & | dataPtr ) const

virtual

Get an array from a particular cell.

Reimplemented from casacore::BaseColumn.

## getArrayColumn()

virtual void casacore::ConcatColumn::getArrayColumn | ( | ArrayBase & | dataPtr | ) | const

virtual

Get the array of all array values in a column.

If the column contains n-dim arrays, the resulting array is (n+1)-dim. The arrays in the column have to have the same shape in all cells.

Reimplemented from casacore::BaseColumn.

## getArrayColumnCells()

virtual void casacore::ConcatColumn::getArrayColumnCells | ( | const RefRows & | rownrs,
|  | ArrayBase & | dataPtr ) const

virtual

Get the array of some array values in a column.

If the column contains n-dim arrays, the resulting array is (n+1)-dim. The arrays in the column have to have the same shape in all cells.

Reimplemented from casacore::BaseColumn.

## getColumnPart()

void casacore::ConcatColumn::getColumnPart | ( | BaseColumn * | col,
|  | const Slicer * | ,
|  | ArrayBase & | arr )

static private

Define the access functions.

References casacore::BaseColumn::BaseColumn().

## getColumnSlice()

virtual void casacore::ConcatColumn::getColumnSlice | ( | const Slicer & | ,
|  | ArrayBase & | dataPtr ) const

virtual

Get subsections from all arrays in the column.

If the column contains n-dim arrays, the resulting array is (n+1)-dim. The arrays in the column have to have the same shape in all cells.

Reimplemented from casacore::BaseColumn.

## getColumnSliceCells()

virtual void casacore::ConcatColumn::getColumnSliceCells | ( | const RefRows & | rownrs,
|  | const Slicer & | ,
|  | ArrayBase & | dataPtr ) const

virtual

Get subsections from some arrays in the column.

If the column contains n-dim arrays, the resulting array is (n+1)-dim. The arrays in the column have to have the same shape in all cells.

Reimplemented from casacore::BaseColumn.

## getColumnSlicePart()

void casacore::ConcatColumn::getColumnSlicePart | ( | BaseColumn * | col,
|  | const Slicer * | ns,
|  | ArrayBase & | arr )

static private

References casacore::BaseColumn::BaseColumn().

## getRowsPart()

void casacore::ConcatColumn::getRowsPart | ( | BaseColumn * | col,
|  | const RefRows & | rows,
|  | const Slicer * | ,
|  | ArrayBase & | array )

static private

References casacore::array, and casacore::BaseColumn::BaseColumn().

## getRowsSlicePart()

void casacore::ConcatColumn::getRowsSlicePart | ( | BaseColumn * | col,
|  | const RefRows & | rows,
|  | const Slicer * | ,
|  | ArrayBase & | array )

static private

References casacore::array, and casacore::BaseColumn::BaseColumn().

## getSlice()

virtual void casacore::ConcatColumn::getSlice | ( | rownr_t | rownr,
|  | const Slicer & | ,
|  | ArrayBase & | dataPtr ) const

virtual

Get a slice of an N-dimensional array in a particular cell.

Reimplemented from casacore::BaseColumn.

## initialize()

virtual void casacore::ConcatColumn::initialize | ( | rownr_t | startRownr,
|  | rownr_t | endRownr )

virtual

Initialize the rows from startRownr till endRownr (inclusive) with the default value defined in the column description (if defined).

Implements casacore::BaseColumn.

## isDefined()

virtual Bool casacore::ConcatColumn::isDefined | ( | rownr_t | rownr | ) | const

virtual

Test if a value in a particular cell has been defined.

Implements casacore::BaseColumn.

## isStored()

virtual Bool casacore::ConcatColumn::isStored | ( |  | ) | const

virtual

Test if the column is stored (otherwise it is virtual).

Implements casacore::BaseColumn.

## isWritable()

virtual Bool casacore::ConcatColumn::isWritable | ( |  | ) | const

virtual

Test if the column is writable in the parent table.

Implements casacore::BaseColumn.

## keywordSet()

virtual TableRecord & casacore::ConcatColumn::keywordSet | ( |  | ) |

virtual

Implements casacore::BaseColumn.

## ndim()

virtual uInt casacore::ConcatColumn::ndim | ( | rownr_t | rownr | ) | const

virtual

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

Reimplemented from casacore::BaseColumn.

## ndimColumn()

virtual uInt casacore::ConcatColumn::ndimColumn | ( |  | ) | const

virtual

Get the global #dimensions of an array (i.e.

for all rows).

Reimplemented from casacore::BaseColumn.

## nrow()

virtual rownr_t casacore::ConcatColumn::nrow | ( |  | ) | const

virtual

Get nr of rows in the column.

Implements casacore::BaseColumn.

## put()

virtual void casacore::ConcatColumn::put | ( | rownr_t | rownr,
|  | const void * | dataPtr )

virtual

Put the scalar value in a particular cell.

Reimplemented from casacore::BaseColumn.

## putArray()

virtual void casacore::ConcatColumn::putArray | ( | rownr_t | rownr,
|  | const ArrayBase & | dataPtr )

virtual

Put the array value in a particular cell.

Reimplemented from casacore::BaseColumn.

## putArrayColumn()

virtual void casacore::ConcatColumn::putArrayColumn | ( | const ArrayBase & | dataPtr | ) |

virtual

Put the array of all array values in the column.

If the column contains n-dim arrays, the source array is (n+1)-dim. The arrays in the column have to have the same shape in all cells.

Reimplemented from casacore::BaseColumn.

## putArrayColumnCells()

virtual void casacore::ConcatColumn::putArrayColumnCells | ( | const RefRows & | rownrs,
|  | const ArrayBase & | dataPtr )

virtual

Get the array of some array values in a column.

If the column contains n-dim arrays, the resulting array is (n+1)-dim. The arrays in the column have to have the same shape in all cells.

Reimplemented from casacore::BaseColumn.

## putColumnPart()

void casacore::ConcatColumn::putColumnPart | ( | BaseColumn * | col,
|  | const Slicer * | ,
|  | ArrayBase & | arr )

static private

References casacore::BaseColumn::BaseColumn().

## putColumnSlice()

virtual void casacore::ConcatColumn::putColumnSlice | ( | const Slicer & | ,
|  | const ArrayBase & | dataPtr )

virtual

Put into subsections of all table arrays in the column.

If the column contains n-dim arrays, the source array is (n+1)-dim. The arrays in the column have to have the same shape in all cells.

Reimplemented from casacore::BaseColumn.

## putColumnSliceCells()

virtual void casacore::ConcatColumn::putColumnSliceCells | ( | const RefRows & | rownrs,
|  | const Slicer & | ,
|  | const ArrayBase & | dataPtr )

virtual

Put subsections of some arrays in the column.

If the column contains n-dim arrays, the source array is (n+1)-dim. The arrays in the column have to have the same shape in all cells.

Reimplemented from casacore::BaseColumn.

## putColumnSlicePart()

void casacore::ConcatColumn::putColumnSlicePart | ( | BaseColumn * | col,
|  | const Slicer * | ns,
|  | ArrayBase & | arr )

static private

References casacore::BaseColumn::BaseColumn().

## putRowsPart()

void casacore::ConcatColumn::putRowsPart | ( | BaseColumn * | col,
|  | const RefRows & | rows,
|  | const Slicer * | ,
|  | ArrayBase & | array )

static private

References casacore::array, and casacore::BaseColumn::BaseColumn().

## putRowsSlicePart()

void casacore::ConcatColumn::putRowsSlicePart | ( | BaseColumn * | col,
|  | const RefRows & | rows,
|  | const Slicer * | ,
|  | ArrayBase & | array )

static private

References casacore::array, and casacore::BaseColumn::BaseColumn().

## putSlice()

virtual void casacore::ConcatColumn::putSlice | ( | rownr_t | rownr,
|  | const Slicer & | ,
|  | const ArrayBase & | dataPtr )

virtual

Put a slice of an N-dimensional array in a particular cell.

Reimplemented from casacore::BaseColumn.

## rwKeywordSet()

virtual TableRecord & casacore::ConcatColumn::rwKeywordSet | ( |  | ) |

virtual

Get access to the column keyword set.

The initial keyword set is a copy of the keyword set of the first table.

Implements casacore::BaseColumn.

## setMaximumCacheSize()

virtual void casacore::ConcatColumn::setMaximumCacheSize | ( | uInt | nbytes | ) |

virtual

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

Implements casacore::BaseColumn.

## setShape() [1/2]

virtual void casacore::ConcatColumn::setShape | ( | rownr_t | rownr,
|  | const IPosition & | shape )

virtual

Set the shape of the array in the given row.

Reimplemented from casacore::BaseColumn.

References shape().

## setShape() [2/2]

virtual void casacore::ConcatColumn::setShape | ( | rownr_t | rownr,
|  | const IPosition & | shape,
|  | const IPosition & | tileShape )

virtual

Set the shape and tile shape of the array in the given row.

Reimplemented from casacore::BaseColumn.

References shape(), and tileShape().

## shape()

virtual IPosition casacore::ConcatColumn::shape | ( | rownr_t | rownr | ) | const

virtual

Get the shape of an array in a particular cell.

Reimplemented from casacore::BaseColumn.

Referenced by setShape(), and setShape().

## shapeColumn()

virtual IPosition casacore::ConcatColumn::shapeColumn | ( |  | ) | const

virtual

Get the global shape of an array (i.e.

for all rows).

Reimplemented from casacore::BaseColumn.

## tileShape()

virtual IPosition casacore::ConcatColumn::tileShape | ( | rownr_t | rownr | ) | const

virtual

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

Reimplemented from casacore::BaseColumn.

Referenced by setShape().

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

- tables/Tables/ConcatColumn.h