casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Private Member Functions | Private Attributes
casa::ForwardColumnIndexedRow Class Reference

Virtual column forwarding to another row/column. More...

#include <ForwardColRow.h>

Inheritance diagram for casa::ForwardColumnIndexedRow:
casa::ForwardColumn casa::DataManagerColumn

List of all members.

Public Member Functions

 ForwardColumnIndexedRow (ForwardColumnIndexedRowEngine *enginePtr, const String &columnName, int dataType, const String &dataTypeId, const Table &referencedTable)
 Construct it for the given column.
 ~ForwardColumnIndexedRow ()
 Destructor is mandatory.
void prepare (const Table &thisTable)
 Initialize the object.

Private Member Functions

 ForwardColumnIndexedRow (const ForwardColumnIndexedRow &)
 Copy constructor is not needed and therefore forbidden (so make it private).
ForwardColumnIndexedRowoperator= (const ForwardColumnIndexedRow &)
 Assignment is not needed and therefore forbidden (so make it private).
Bool canChangeShape () const
 This data manager cannot handle changing array shapes.
Bool canAccessScalarColumn (Bool &reask) const
 This data manager cannot do get/putColumn.
Bool canAccessArrayColumn (Bool &reask) const
 This data manager cannot do get/putColumn.
Bool canAccessColumnSlice (Bool &reask) const
 This data manager cannot do get/putColumn.
void setShape (uInt rownr, const IPosition &shape)
 Set the shape of an (indirect) array in the given row.
Bool isShapeDefined (uInt rownr)
 Is the value shape defined in the given row?
uInt ndim (uInt rownr)
 Get the dimensionality of the item in the given row.
IPosition shape (uInt rownr)
 Get the shape of the item in the given row.
void getBoolV (uInt rownr, Bool *dataPtr)
 Get the scalar value with a standard data type in the given row.
void getuCharV (uInt rownr, uChar *dataPtr)
void getShortV (uInt rownr, Short *dataPtr)
void getuShortV (uInt rownr, uShort *dataPtr)
void getIntV (uInt rownr, Int *dataPtr)
void getuIntV (uInt rownr, uInt *dataPtr)
void getfloatV (uInt rownr, float *dataPtr)
void getdoubleV (uInt rownr, double *dataPtr)
void getComplexV (uInt rownr, Complex *dataPtr)
void getDComplexV (uInt rownr, DComplex *dataPtr)
void getStringV (uInt rownr, String *dataPtr)
void getOtherV (uInt rownr, void *dataPtr)
 Get the scalar value with a non-standard data type in the given row.
void putBoolV (uInt rownr, const Bool *dataPtr)
 Put the scalar value with a standard data type into the given row.
void putuCharV (uInt rownr, const uChar *dataPtr)
void putShortV (uInt rownr, const Short *dataPtr)
void putuShortV (uInt rownr, const uShort *dataPtr)
void putIntV (uInt rownr, const Int *dataPtr)
void putuIntV (uInt rownr, const uInt *dataPtr)
void putfloatV (uInt rownr, const float *dataPtr)
void putdoubleV (uInt rownr, const double *dataPtr)
void putComplexV (uInt rownr, const Complex *dataPtr)
void putDComplexV (uInt rownr, const DComplex *dataPtr)
void putStringV (uInt rownr, const String *dataPtr)
void putOtherV (uInt rownr, const void *dataPtr)
 Put the scalar value with a non-standard data type into the given row.
void getArrayV (uInt rownr, void *dataPtr)
 Get the array value in the given row.
void putArrayV (uInt rownr, const void *dataPtr)
 Put the array value into the given row.
void getSliceV (uInt rownr, const Slicer &slicer, void *dataPtr)
 Get a section of the array in the given row.
void putSliceV (uInt rownr, const Slicer &slicer, const void *dataPtr)
 Put into a section of the array in the given row.
uInt convertRownr (uInt rownr)
 Convert the rownr to the rownr in the underlying table.

Private Attributes

ForwardColumnIndexedRowEngineenginePtr_p

Detailed Description

Virtual column forwarding to another row/column.

Review Status

Reviewed By:
Paul Shannon
Date Reviewed:
1995/05/22
Test programs:
tForwardColRow

Intended use:

Internal

Prerequisite

Etymology

ForwardColumnIndexedRow handles the forwarding of the gets and puts for an individual row/column on behalf of the virtual column engine ForwardColumnIndexedRowEngine. It forwards them to a row/column in another table. The row forwarding is done using a special column containing row numbers indexing the referenced table.

Synopsis

ForwardColumnIndexedRow represents a virtual column which forwards the gets and puts to a column with the same name in another table. It is, in fact, a reference to the other column. The row numbers in the column are mapped to row numbers in the referenced column using a special column containing the mapping. The name of the other table is stored as a keyword in the forwarding column. When the referenced column is in its turn a ForwardColumn (note: not a ForwardColumnIndexedRow), the table mentioned in there will be used. In this way, the length of the forwarding chain is kept to a minimum.

An object of this class is created (and deleted) by the virtual column engine

ForwardColumnIndexedRowEngine which creates a ForwardColumnIndexedRow object for each column being forwarded.

Definition at line 85 of file ForwardColRow.h.


Constructor & Destructor Documentation

casa::ForwardColumnIndexedRow::ForwardColumnIndexedRow ( ForwardColumnIndexedRowEngine enginePtr,
const String columnName,
int  dataType,
const String dataTypeId,
const Table referencedTable 
)

Construct it for the given column.

Destructor is mandatory.

Copy constructor is not needed and therefore forbidden (so make it private).


Member Function Documentation

Bool casa::ForwardColumnIndexedRow::canAccessArrayColumn ( Bool reask) const [private, virtual]

This data manager cannot do get/putColumn.

Reimplemented from casa::ForwardColumn.

Bool casa::ForwardColumnIndexedRow::canAccessColumnSlice ( Bool reask) const [private, virtual]

This data manager cannot do get/putColumn.

Reimplemented from casa::ForwardColumn.

Bool casa::ForwardColumnIndexedRow::canAccessScalarColumn ( Bool reask) const [private, virtual]

This data manager cannot do get/putColumn.

Reimplemented from casa::ForwardColumn.

This data manager cannot handle changing array shapes.

Reimplemented from casa::ForwardColumn.

Convert the rownr to the rownr in the underlying table.

Definition at line 406 of file ForwardColRow.h.

References casa::ForwardColumnIndexedRowEngine::convertRownr(), and enginePtr_p.

void casa::ForwardColumnIndexedRow::getArrayV ( uInt  rownr,
void *  dataPtr 
) [private, virtual]

Get the array value in the given row.

The argument dataPtr is in fact a Array<T>*, but a void* is needed to be generic. The array pointed to by dataPtr has to have the correct shape (which is guaranteed by the ArrayColumn get function).

Reimplemented from casa::ForwardColumn.

void casa::ForwardColumnIndexedRow::getBoolV ( uInt  rownr,
Bool dataPtr 
) [private, virtual]

Get the scalar value with a standard data type in the given row.

Reimplemented from casa::ForwardColumn.

void casa::ForwardColumnIndexedRow::getComplexV ( uInt  rownr,
Complex *  dataPtr 
) [private, virtual]

Reimplemented from casa::ForwardColumn.

void casa::ForwardColumnIndexedRow::getDComplexV ( uInt  rownr,
DComplex *  dataPtr 
) [private, virtual]

Reimplemented from casa::ForwardColumn.

void casa::ForwardColumnIndexedRow::getdoubleV ( uInt  rownr,
double *  dataPtr 
) [private, virtual]

Reimplemented from casa::ForwardColumn.

void casa::ForwardColumnIndexedRow::getfloatV ( uInt  rownr,
float *  dataPtr 
) [private, virtual]

Reimplemented from casa::ForwardColumn.

void casa::ForwardColumnIndexedRow::getIntV ( uInt  rownr,
Int dataPtr 
) [private, virtual]

Reimplemented from casa::ForwardColumn.

void casa::ForwardColumnIndexedRow::getOtherV ( uInt  rownr,
void *  dataPtr 
) [private, virtual]

Get the scalar value with a non-standard data type in the given row.

Reimplemented from casa::ForwardColumn.

void casa::ForwardColumnIndexedRow::getShortV ( uInt  rownr,
Short dataPtr 
) [private, virtual]

Reimplemented from casa::ForwardColumn.

void casa::ForwardColumnIndexedRow::getSliceV ( uInt  rownr,
const Slicer slicer,
void *  dataPtr 
) [private, virtual]

Get a section of the array in the given row.

The argument dataPtr is in fact a Array<T>*, but a void* is needed to be generic. The array pointed to by dataPtr has to have the correct shape (which is guaranteed by the ArrayColumn getSlice function).

Reimplemented from casa::ForwardColumn.

void casa::ForwardColumnIndexedRow::getStringV ( uInt  rownr,
String dataPtr 
) [private, virtual]

Reimplemented from casa::ForwardColumn.

void casa::ForwardColumnIndexedRow::getuCharV ( uInt  rownr,
uChar dataPtr 
) [private, virtual]

Reimplemented from casa::ForwardColumn.

void casa::ForwardColumnIndexedRow::getuIntV ( uInt  rownr,
uInt dataPtr 
) [private, virtual]

Reimplemented from casa::ForwardColumn.

void casa::ForwardColumnIndexedRow::getuShortV ( uInt  rownr,
uShort dataPtr 
) [private, virtual]

Reimplemented from casa::ForwardColumn.

Is the value shape defined in the given row?

Reimplemented from casa::ForwardColumn.

uInt casa::ForwardColumnIndexedRow::ndim ( uInt  rownr) [private, virtual]

Get the dimensionality of the item in the given row.

Reimplemented from casa::ForwardColumn.

ForwardColumnIndexedRow& casa::ForwardColumnIndexedRow::operator= ( const ForwardColumnIndexedRow ) [private]

Assignment is not needed and therefore forbidden (so make it private).

void casa::ForwardColumnIndexedRow::prepare ( const Table thisTable) [virtual]

Initialize the object.

This means binding the column to the column with the same name in the original table. It checks if the description of both columns is the same.

Reimplemented from casa::ForwardColumn.

void casa::ForwardColumnIndexedRow::putArrayV ( uInt  rownr,
const void *  dataPtr 
) [private, virtual]

Put the array value into the given row.

This throws an exception, because putting is not supported.

Reimplemented from casa::ForwardColumn.

void casa::ForwardColumnIndexedRow::putBoolV ( uInt  rownr,
const Bool dataPtr 
) [private, virtual]

Put the scalar value with a standard data type into the given row.

This throws an exception, because putting is not supported.

Reimplemented from casa::ForwardColumn.

void casa::ForwardColumnIndexedRow::putComplexV ( uInt  rownr,
const Complex *  dataPtr 
) [private, virtual]

Reimplemented from casa::ForwardColumn.

void casa::ForwardColumnIndexedRow::putDComplexV ( uInt  rownr,
const DComplex *  dataPtr 
) [private, virtual]

Reimplemented from casa::ForwardColumn.

void casa::ForwardColumnIndexedRow::putdoubleV ( uInt  rownr,
const double *  dataPtr 
) [private, virtual]

Reimplemented from casa::ForwardColumn.

void casa::ForwardColumnIndexedRow::putfloatV ( uInt  rownr,
const float *  dataPtr 
) [private, virtual]

Reimplemented from casa::ForwardColumn.

void casa::ForwardColumnIndexedRow::putIntV ( uInt  rownr,
const Int dataPtr 
) [private, virtual]

Reimplemented from casa::ForwardColumn.

void casa::ForwardColumnIndexedRow::putOtherV ( uInt  rownr,
const void *  dataPtr 
) [private, virtual]

Put the scalar value with a non-standard data type into the given row.

This throws an exception, because putting is not supported.

Reimplemented from casa::ForwardColumn.

void casa::ForwardColumnIndexedRow::putShortV ( uInt  rownr,
const Short dataPtr 
) [private, virtual]

Reimplemented from casa::ForwardColumn.

void casa::ForwardColumnIndexedRow::putSliceV ( uInt  rownr,
const Slicer slicer,
const void *  dataPtr 
) [private, virtual]

Put into a section of the array in the given row.

This throws an exception, because putting is not supported.

Reimplemented from casa::ForwardColumn.

void casa::ForwardColumnIndexedRow::putStringV ( uInt  rownr,
const String dataPtr 
) [private, virtual]

Reimplemented from casa::ForwardColumn.

void casa::ForwardColumnIndexedRow::putuCharV ( uInt  rownr,
const uChar dataPtr 
) [private, virtual]

Reimplemented from casa::ForwardColumn.

void casa::ForwardColumnIndexedRow::putuIntV ( uInt  rownr,
const uInt dataPtr 
) [private, virtual]

Reimplemented from casa::ForwardColumn.

void casa::ForwardColumnIndexedRow::putuShortV ( uInt  rownr,
const uShort dataPtr 
) [private, virtual]

Reimplemented from casa::ForwardColumn.

void casa::ForwardColumnIndexedRow::setShape ( uInt  rownr,
const IPosition shape 
) [private, virtual]

Set the shape of an (indirect) array in the given row.

This throws an exception, because putting is not supported.

Reimplemented from casa::ForwardColumn.

IPosition casa::ForwardColumnIndexedRow::shape ( uInt  rownr) [private, virtual]

Get the shape of the item in the given row.

Reimplemented from casa::ForwardColumn.


Member Data Documentation

Reimplemented from casa::ForwardColumn.

Definition at line 202 of file ForwardColRow.h.

Referenced by convertRownr().


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