28 #ifndef TABLES_ARRAYCOLUMN_H
29 #define TABLES_ARRAYCOLUMN_H
42 template<
class T>
class Array;
43 template<
class T>
class BaseSlicesFunctor;
106 class ArrayColumn :
public TableColumn
123 ArrayColumn (
const Table&,
const String& columnName);
141 ArrayColumn<T>&
operator= (
const ArrayColumn<T>&);
325 const Slicer& arraySection)
const;
330 const Slicer& arraySection)
const;
372 {
put (rownr, that, rownr, preserveTileShape); }
472 const String& where)
const;
475 const char * where)
const;
523 if (! message.
empty()){
581 return String::format (
"Number of data slicers (%d) and destination slicers (%d) "
586 return String::format (
"At least one destination and one data slicer required.");
594 "destination slicer [%d] (%s) must be equal",
628 #define ROArrayColumn ArrayColumn
631 #ifndef CASACORE_NO_AUTO_TEMPLATES
632 #include <casacore/tables/Tables/ArrayColumn.tcc>
633 #endif //# CASACORE_NO_AUTO_TEMPLATES
A Vector of integers, for indexing into Array<T> objects.
virtual IPosition shape(uInt rownr) const
Get the shape of an array in a particular cell.
void getSlice(uInt rownr, const Slicer &arraySection, Array< T > &array, Bool resize=False) const
Get a slice of an N-dimensional array in a particular cell (i.e.
A 1-D Specialization of the Array class.
#define TABLECOLUMNCHECKROW(ROWNR)
const Vector< Slicer * > & getDestinationSlicers() const
Accessor that returns the desintation slicers.
ArrayColumn< T > & operator=(const ArrayColumn< T > &)
Assignment uses reference semantics, thus works the same as function reference.
Array< T > getColumn() const
Main interface class to a read/write table.
ColumnSlicer(const IPosition &shape, Vector< Slicer * > dataSlicers, Vector< Slicer * > destinationSlicers)
Create a ColumnSlicer for use in one of the overloads of ArrayColumn::getColumnCells.
TableExprNode array(const TableExprNode &values, const TableExprNodeSet &shape)
Create an array of the given shape and fill it with the values.
void checkDataType() const
Check if the data type matches the column data type.
Vector< Slicer * > dataSlicers_p
void put(uInt rownr, const Array< T > &array)
Put the array in a particular cell (i.e.
IPosition shape(uInt rownr) const
Get the shape of an array in a particular cell.
void reference(const ArrayColumn< T > &)
Change the reference to another column.
void baseGet(uInt rownr, Array< T > &array) const
The get() function like above which does not check shapes, etc.
void putColumn(const Array< T > &array)
Put the array of all values in the column.
Bool canAccessSlice_p
Keep switches to determine if a slice or an entire column can be accessed or the change of an array c...
const Vector< Slicer * > & getDataSlicers() const
Accessor that returns the dataSlicers.
TableColumn()
The default constructor creates a null object, i.e.
BaseColumn * baseColPtr_p
Vector< Slicer * > destinationSlicers_p
Table table() const
Get the Table object this column belongs to.
uInt ndim(uInt rownr) const
Get the #dimensions of an array in a particular cell.
Array< T > operator()(uInt rownr) const
~ColumnSlicer()
Kill off the Slicer objects.
String validateParameters()
ArrayColumn()
The default constructor creates a null object, i.e.
void putSliceFromRows(const RefRows &rows, const Vector< Vector< Slice > > &arraySlices, const Array< T > &source)
Bool reaskAccessSlice_p
Keep switches to know if access knowledge is permanent or has to be asked again the next time...
void put(uInt rownr, const TableColumn &that, Bool preserveTileShape=False)
Copy the value of a cell of that column to a cell of this column.
LatticeExprNode length(const LatticeExprNode &expr, const LatticeExprNode &axis)
2-argument function to get the length of an axis.
Class holding the row numbers in a RefTable.
void handleSlices(const Vector< Vector< Slice > > &slices, BaseSlicesFunctor< T > &functor, const Slicer &slicer, IPosition &arrEnd, Array< T > &array) const
A common function used by all functions that can get or put irregular array slices.
void putSlice(uInt rownr, const Slicer &arraySection, const Array< T > &array)
Put into a slice of an N-dimensional array in a particular cell.
void putColumnRange(const Slicer &rowRange, const Array< T > &arr)
Put the array of some values in the column.
void fillColumn(const Array< T > &value)
Put the same value in all cells of the column.
bool Bool
Define the standard types used by Casacore.
void attach(const Table &table, const String &columnName)
Attach a column to the object.
Read and write access to an array table column with arbitrary data type.
Read/write access to a table column.
static String format(const char *picture,...)
Create a formatted string using the given printf format string.
void basePut(uInt rownr, const Array< T > &array)
The put() function like above which does not check shapes, etc.
TableExprNode toString(const TableExprNode &node)
Function to convert any value to a string.
void setShape(uInt rownr, const IPosition &shape)
Set the shape of the array in the given row.
template <class T, class U> class vector;
void putColumnCells(const RefRows &rownrs, const Array< T > &arr)
void getColumnCells(const RefRows &rownrs, Array< T > &arr, Bool resize=False) const
Specify which elements to extract from an n-dimensional array.
IPosition tileShape(uInt rownr) const
Get the tile shape of an array in a particular cell.
Base class for all Casacore library errors.
virtual void get(uInt rownr, void *dataPtr) const =0
Get the value from a particular cell.
void getColumnRange(const Slicer &rowRange, Array< T > &arr, Bool resize=False) const
Get the array of some values in a column.
String: the storage and methods of handling collections of characters.
virtual TableColumn * clone() const
Clone the object.
Abstract baseclass for slices functors.
const IPosition & shape() const
Accessor that returns the shape.
Bool canAccessColumnSlice_p
void checkShape(const IPosition &shp, Array< T > &arr, Bool resize, const String &where) const
Check the shape of the array.
Bool reaskAccessColumnSlice_p
virtual void put(uInt rownr, const void *dataPtr)=0
Put the value in a particular cell.
LatticeExprNode value(const LatticeExprNode &expr)
This function returns the value of the expression without a mask.
Bool empty() const
Test for empty.
virtual uInt ndim(uInt rownr) const
Get the #dimensions of an array in a particular cell.
#define casacore
<X11/Intrinsic.h> #defines true, false, casacore::Bool, and String.