casacore::ConcatColumn Class Reference

A column in a concatenated table. More...

#include <ConcatColumn.h>

Inheritance diagram for casacore::ConcatColumn:
casacore::BaseColumn casacore::ConcatScalarColumn< T >

List of all members.

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 TableRecordrwKeywordSet ()
 Get access to the column keyword set.
virtual TableRecordkeywordSet ()
virtual uInt nrow () const
 Get nr of rows in the column.
virtual Bool isDefined (uInt rownr) const
 Test if a value in a particular cell has been defined.
virtual void setShape (uInt rownr, const IPosition &shape)
 Set the shape of the array in the given row.
virtual void setShape (uInt 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 (uInt rownr) const
 Get the #dimensions of an array in a particular cell.
virtual IPosition shape (uInt rownr) const
 Get the shape of an array in a particular cell.
virtual Bool canChangeShape () const
 It can change shape if the underlying column can.
virtual Bool canAccessScalarColumn (Bool &reask) const
 It can handle a scalar column if the underlying column can handle cells in a scalar column.
virtual Bool canAccessArrayColumn (Bool &reask) const
 It can handle an array column if the underlying column can handle cells in an array column.
virtual Bool canAccessSlice (Bool &reask) const
 It can handle a cell slice if the underlying column can do it.
virtual Bool canAccessColumnSlice (Bool &reask) const
 It can handle a column slice if the underlying column can handle a collection of cells in a column and a column slice.
virtual Bool canAccessScalarColumnCells (Bool &reask) const
 It can handle cells in a scalar column if the underlying column can do it.
virtual Bool canAccessArrayColumnCells (Bool &reask) const
 It can handle cells in an array column if the underlying column can do it.
void initialize (uInt startRownr, uInt endRownr)
 Initialize the rows from startRownr till endRownr (inclusive) with the default value defined in the column description (if defined).
virtual void get (uInt rownr, void *dataPtr) const
 Get the value from a particular cell.
virtual void getSlice (uInt rownr, const Slicer &, void *dataPtr) const
 Get a slice of an N-dimensional array in a particular cell.
virtual void put (uInt rownr, const void *dataPtr)
 Put the value in a particular cell.
virtual void putSlice (uInt rownr, const Slicer &, const void *dataPtr)
 Put a slice of an N-dimensional array in a particular cell.
virtual void getArrayColumn (void *dataPtr) const
 Get the array of all array values in a column.
virtual void getColumnSlice (const Slicer &, void *dataPtr) const
 Get subsections from all arrays in the column.
virtual void getArrayColumnCells (const RefRows &rownrs, void *dataPtr) const
 Get the array of some array values in a column.
virtual void getColumnSliceCells (const RefRows &rownrs, const Slicer &, void *dataPtr) const
 Get subsections from some arrays in the column.
virtual void putArrayColumn (const void *dataPtr)
 Put the array of all array values in the column.
virtual void putColumnSlice (const Slicer &, const void *dataPtr)
 Put into subsections of all table arrays in the column.
virtual void putArrayColumnCells (const RefRows &rownrs, const void *dataPtr)
 Get the array of some array values in a column.
virtual void putColumnSliceCells (const RefRows &rownrs, const Slicer &, const void *dataPtr)
 Put subsections of some arrays in the column.
virtual ColumnCachecolumnCache ()
 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, CountedPtr< BaseCompare > &cmpObj)
 Allocate value buffers for the table iterator.
virtual void freeIterBuf (void *&lastVal, void *&curVal)
 Free the value buffers allocated by allocIterBuf.

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, void *dataPtr, AccessColumnFunc *) const
 Access the data for an entire column.
void accessRows (const RefRows &rownrs, const Slicer *ns, void *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)

Detailed Description

A column in a concatenated table.

Intended use:

Internal

Review Status

Reviewed By:
UNKNOWN

Prerequisite

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

Definition at line 91 of file ConcatColumn.h.


Member Typedef Documentation

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 245 of file ConcatColumn.h.

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 249 of file ConcatColumn.h.


Constructor & Destructor Documentation

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.

casacore::ConcatColumn::~ConcatColumn (  ) 

Member Function Documentation

void casacore::ConcatColumn::accessColumn ( const Slicer ns,
void *  dataPtr,
AccessColumnFunc  
) const [private]

Access the data for an entire column.

void casacore::ConcatColumn::accessRows ( const RefRows rownrs,
const Slicer ns,
void *  dataPtr,
AccessRowsFunc  
) const [private]

Access the data with multiple rows combined.

virtual void casacore::ConcatColumn::allocIterBuf ( void *&  lastVal,
void *&  curVal,
CountedPtr< 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.

virtual Bool casacore::ConcatColumn::canAccessArrayColumn ( Bool reask  )  const [virtual]

It can handle an array column if the underlying column can handle cells in an array column.

Reimplemented from casacore::BaseColumn.

virtual Bool casacore::ConcatColumn::canAccessArrayColumnCells ( Bool reask  )  const [virtual]

It can handle cells in an array column if the underlying column can do it.

Reimplemented from casacore::BaseColumn.

virtual Bool casacore::ConcatColumn::canAccessColumnSlice ( Bool reask  )  const [virtual]

It can handle a column slice if the underlying column can handle a collection of cells in a column and a column slice.

Reimplemented from casacore::BaseColumn.

virtual Bool casacore::ConcatColumn::canAccessScalarColumn ( Bool reask  )  const [virtual]

It can handle a scalar column if the underlying column can handle cells in a scalar column.

Reimplemented from casacore::BaseColumn.

virtual Bool casacore::ConcatColumn::canAccessScalarColumnCells ( Bool reask  )  const [virtual]

It can handle cells in a scalar column if the underlying column can do it.

Reimplemented from casacore::BaseColumn.

virtual Bool casacore::ConcatColumn::canAccessSlice ( Bool reask  )  const [virtual]

It can handle a cell slice if the underlying column can do it.

Reimplemented from casacore::BaseColumn.

virtual Bool casacore::ConcatColumn::canChangeShape (  )  const [virtual]

It can change shape if the underlying column can.

Reimplemented from casacore::BaseColumn.

virtual ColumnCache& casacore::ConcatColumn::columnCache (  )  [virtual]

Get the underlying column cache.

Implements casacore::BaseColumn.

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

Free the value buffers allocated by allocIterBuf.

Reimplemented from casacore::BaseColumn.

virtual void casacore::ConcatColumn::get ( uInt  rownr,
void *  dataPtr 
) const [virtual]

Get the value from a particular cell.

This can be a scalar or an array.

Implements casacore::BaseColumn.

virtual void casacore::ConcatColumn::getArrayColumn ( void *  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.

virtual void casacore::ConcatColumn::getArrayColumnCells ( const RefRows rownrs,
void *  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.

static void casacore::ConcatColumn::getColumnPart ( BaseColumn col,
const Slicer ,
ArrayBase arr 
) [static, private]

Define the access functions.

virtual void casacore::ConcatColumn::getColumnSlice ( const Slicer ,
void *  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.

virtual void casacore::ConcatColumn::getColumnSliceCells ( const RefRows rownrs,
const Slicer ,
void *  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.

static void casacore::ConcatColumn::getColumnSlicePart ( BaseColumn col,
const Slicer ns,
ArrayBase arr 
) [static, private]
static void casacore::ConcatColumn::getRowsPart ( BaseColumn col,
const RefRows rows,
const Slicer ,
ArrayBase array 
) [static, private]
static void casacore::ConcatColumn::getRowsSlicePart ( BaseColumn col,
const RefRows rows,
const Slicer ,
ArrayBase array 
) [static, private]
virtual void casacore::ConcatColumn::getSlice ( uInt  rownr,
const Slicer ,
void *  dataPtr 
) const [virtual]

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

Reimplemented from casacore::BaseColumn.

void casacore::ConcatColumn::initialize ( uInt  startRownr,
uInt  endRownr 
) [virtual]

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

Implements casacore::BaseColumn.

virtual Bool casacore::ConcatColumn::isDefined ( uInt  rownr  )  const [virtual]

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

Implements casacore::BaseColumn.

virtual Bool casacore::ConcatColumn::isStored (  )  const [virtual]

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

Implements casacore::BaseColumn.

virtual Bool casacore::ConcatColumn::isWritable (  )  const [virtual]

Test if the column is writable in the parent table.

Implements casacore::BaseColumn.

virtual TableRecord& casacore::ConcatColumn::keywordSet (  )  [virtual]

Implements casacore::BaseColumn.

virtual uInt casacore::ConcatColumn::ndim ( uInt  rownr  )  const [virtual]

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

Reimplemented from casacore::BaseColumn.

virtual uInt casacore::ConcatColumn::ndimColumn (  )  const [virtual]

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

for all rows).

Reimplemented from casacore::BaseColumn.

virtual uInt casacore::ConcatColumn::nrow (  )  const [virtual]

Get nr of rows in the column.

Implements casacore::BaseColumn.

virtual void casacore::ConcatColumn::put ( uInt  rownr,
const void *  dataPtr 
) [virtual]

Put the value in a particular cell.

This can be a scalar or an array.

Implements casacore::BaseColumn.

virtual void casacore::ConcatColumn::putArrayColumn ( const void *  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.

virtual void casacore::ConcatColumn::putArrayColumnCells ( const RefRows rownrs,
const void *  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.

static void casacore::ConcatColumn::putColumnPart ( BaseColumn col,
const Slicer ,
ArrayBase arr 
) [static, private]
virtual void casacore::ConcatColumn::putColumnSlice ( const Slicer ,
const void *  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.

virtual void casacore::ConcatColumn::putColumnSliceCells ( const RefRows rownrs,
const Slicer ,
const void *  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.

static void casacore::ConcatColumn::putColumnSlicePart ( BaseColumn col,
const Slicer ns,
ArrayBase arr 
) [static, private]
static void casacore::ConcatColumn::putRowsPart ( BaseColumn col,
const RefRows rows,
const Slicer ,
ArrayBase array 
) [static, private]
static void casacore::ConcatColumn::putRowsSlicePart ( BaseColumn col,
const RefRows rows,
const Slicer ,
ArrayBase array 
) [static, private]
virtual void casacore::ConcatColumn::putSlice ( uInt  rownr,
const Slicer ,
const void *  dataPtr 
) [virtual]

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

Reimplemented from casacore::BaseColumn.

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.

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.

virtual void casacore::ConcatColumn::setShape ( uInt  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.

virtual void casacore::ConcatColumn::setShape ( uInt  rownr,
const IPosition shape 
) [virtual]

Set the shape of the array in the given row.

Reimplemented from casacore::BaseColumn.

virtual IPosition casacore::ConcatColumn::shape ( uInt  rownr  )  const [virtual]

Get the shape of an array in a particular cell.

Reimplemented from casacore::BaseColumn.

virtual IPosition casacore::ConcatColumn::shapeColumn (  )  const [virtual]

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

for all rows).

Reimplemented from casacore::BaseColumn.


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

Generated on 31 Aug 2016 for casa by  doxygen 1.6.1