28 #ifndef TABLES_ARRAYCOLUMNBASE_H
29 #define TABLES_ARRAYCOLUMNBASE_H
33 #include <casacore/casa/aips.h>
34 #include <casacore/tables/Tables/TableColumn.h>
35 #include <casacore/casa/Arrays/Vector.h>
40 class BaseSlicesFunctor;
#define TABLECOLUMNCHECKROW(ROWNR)
Non-templated base class for templated Array class.
void acbPutSlice(rownr_t rownr, const Vector< Vector< Slice > > &arraySlices, const ArrayBase &arr)
void reference(const ArrayColumnBase &)
Change the reference to another column.
void acbGetColumnCells(const RefRows &rownrs, const Slicer &arraySection, ArrayBase &arr, Bool resize) const
void acbGetColumn(const Vector< Vector< Slice > > &arraySection, ArrayBase &array, Bool resize) const
Get irregular slices from all arrays in the column as given by the vectors of Slice objects.
void baseGetSlice(rownr_t rownr, const Slicer &arraySection, ArrayBase &array) const
void acbGetColumn(ArrayBase &array, Bool resize) const
Get the array of all values in a column.
void acbPutColumn(const ArrayBase &array)
Put the array of all values in the column.
void acbPutColumnCells(const RefRows &rownrs, const Slicer &arraySection, const ArrayBase &arr)
void acbGetColumnRange(const Slicer &rowRange, ArrayBase &arr, Bool resize) const
Get the array of some values in a column.
void handleSlices(const Vector< Vector< Slice > > &slices, BaseSlicesFunctor &functor, const Slicer &slicer, const ArrayBase &array) const
A common function used by all functions that can get or put irregular array slices.
void setShape(rownr_t rownr, const IPosition &shape, const IPosition &tileShape)
Try to store the array in a tiled way using the given tile shape.
Bool checkShape(const IPosition &expShape, const IPosition &arrShape, Bool noSlicing, Int64 rownr, const String &where) const
Throw an exception if the array does not have the expected shape.
void acbGetColumnRange(const Slicer &rowRange, const Slicer &arraySection, ArrayBase &arr, Bool resize) const
Get slices from some arrays in a column.
ArrayColumnBase(const Table &, const String &columnName)
Construct for the given column in the given table.
void acbPutColumn(const Slicer &arraySection, const ArrayBase &array)
Put into subsections of the table arrays in the entire column.
void acbGetColumnCells(const RefRows &rownrs, ArrayBase &arr, Bool resize) const
void acbGetColumnCells(const RefRows &rows, const ColumnSlicer &columnSlicer, ArrayBase &destination, Bool resize) const
Get various slices from the given rows.
void acbPutColumn(const ArrayColumnBase &that)
Put the contents of that column into this one.
ArrayColumnBase(const ArrayColumnBase &)
Copy constructor (reference semantics).
void acbPutColumnCells(const RefRows &rows, const Vector< Vector< Slice > > &arraySlices, const ArrayBase &source)
Put various slices in the given rows.
ArrayColumnBase & operator=(const ArrayColumnBase &)
Assignment uses reference semantics, thus works the same as function reference.
ArrayColumnBase(const TableColumn &column)
Construct from the given table column.
void acbPutColumnRange(const Slicer &rowRange, const Slicer &arraySection, const ArrayBase &arr)
Put into subsection of the table arrays in some rows of the column.
void acbPutColumnCells(const RefRows &rows, const ColumnSlicer &columnSlicer, const ArrayBase &source)
void baseGet(rownr_t rownr, ArrayBase &array) const
Counterparts of the acbGet() functions below not checking shapes, etc.
void basePut(rownr_t rownr, const ArrayBase &array)
Counterparts of the acbPut() functions below not checking shapes, etc.
void acbGetSlice(rownr_t rownr, const Slicer &arraySection, ArrayBase &array, Bool resize) const
Get a slice of an N-dimensional array in a particular cell (i.e.
void acbPut(rownr_t rownr, const ArrayBase &array)
Put the array in a particular cell (i.e.
void basePutSlice(rownr_t rownr, const Slicer &arraySection, const ArrayBase &array)
void adaptShape(const IPosition &shp, ArrayBase &arr, Bool resize, Int64 rownr, const String &where) const
Adapt the shape of the array if possible.
void acbGet(rownr_t rownr, ArrayBase &array, Bool resize) const
Get the array value in a particular cell (i.e.
void acbGetSlice(rownr_t rownr, const Vector< Vector< Slice > > &arraySlices, ArrayBase &arr, Bool resize) const
Get an irregular slice of an N-dimensional array in a particular cell (i.e.
ArrayColumnBase()
The default constructor creates a null object, i.e.
void acbFillColumn(const ArrayBase &value)
Put the same value in all cells of the column.
void acbGetColumn(const Slicer &arraySection, ArrayBase &array, Bool resize) const
Get regular slices from all arrays in the column.
void setShape(rownr_t rownr, const IPosition &shape)
Set the shape of the array in the given row.
uInt ndim(rownr_t rownr) const
Get the #dimensions of an array in a particular cell.
void acbPutColumnCells(const RefRows &rownrs, const ArrayBase &arr)
void acbPutColumnRange(const Slicer &rowRange, const ArrayBase &arr)
Put the array of some values in the column.
IPosition shape(rownr_t rownr) const
Get the shape of an array in a particular cell.
void acbPutSlice(rownr_t rownr, const Slicer &arraySection, const ArrayBase &array)
Put into a slice of an N-dimensional array in a particular cell.
void acbPutColumn(const Vector< Vector< Slice > > &arraySlices, const ArrayBase &arr)
virtual void getArray(rownr_t rownr, ArrayBase &dataPtr) const
Get an array 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 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 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.
String validateParameters() const
Check if the slicers match the array shape.
Vector< Slicer * > destinationSlicers_p
const Vector< Slicer * > & getDestinationSlicers() const
Get the desintation slicers.
void freeSlicers()
Delete all Slicer objects.
const IPosition & shape() const
Get the shape.
ColumnSlicer(const IPosition &shape, const Vector< Slicer * > &dataSlicers, const Vector< Slicer * > &destinationSlicers)
Construct the object.
Vector< Slicer * > dataSlicers_p
const Vector< Slicer * > & getDataSlicers() const
Get the data slicers.
~ColumnSlicer()
The destructor deletes all Slicer objects.
String: the storage and methods of handling collections of characters.
IPosition tileShape(rownr_t rownr) const
Get the tile shape of an array in a particular cell.
BaseColumn * baseColPtr_p
this file contains all the compiler specific defines
TableExprNode array(const TableExprNode &values, const TableExprNodeSet &shape)
Create an array of the given shape and fill it with the values.
long long Int64
Define the extra non-standard types used by Casacore (like proposed uSize, Size)
bool Bool
Define the standard types used by Casacore.
LatticeExprNode value(const LatticeExprNode &expr)
This function returns the value of the expression without a mask.
uInt64 rownr_t
Define the type of a row number in a table.