28 #ifndef TABLES_STMANAIPSIO_H 29 #define TABLES_STMANAIPSIO_H 33 #include <casacore/casa/aips.h> 34 #include <casacore/tables/DataMan/DataManager.h> 35 #include <casacore/tables/DataMan/StManColumn.h> 36 #include <casacore/casa/Containers/Block.h> 37 #include <casacore/casa/BasicSL/Complex.h> 38 #include <casacore/casa/Arrays/IPosition.h> 39 #include <casacore/casa/BasicSL/String.h> 40 #include <casacore/casa/IO/ByteIO.h> 227 virtual void remove (
uInt rownr);
386 String dataManagerType()
const;
389 String dataManagerName()
const;
395 {
return uniqnr_p++; }
407 Bool canAddRow()
const;
410 Bool canRemoveRow()
const;
413 Bool canAddColumn()
const;
416 Bool canRemoveColumn()
const;
441 virtual void create (
uInt nrrow);
449 virtual void resync (
uInt nrrow);
457 virtual void deleteManager();
463 void removeRow (
uInt rownr);
469 const String& dataTypeID);
472 const String& dataTypeID);
475 const String& dataTypeID);
uInt getBlockStringV(uInt rownr, uInt nrmax, String *dataPtr)
uInt getBlockdoubleV(uInt rownr, uInt nrmax, double *dataPtr)
void putuShortV(uInt rownr, const uShort *dataPtr)
virtual void putData(void *datap, uInt nrval, AipsIO &)
Put the data (nrval elements) in an extension (starting at datap) into AipsIO.
void putfloatV(uInt rownr, const float *dataPtr)
void putBlockShortV(uInt rownr, uInt nrmax, const Short *dataPtr)
void getuShortV(uInt rownr, uShort *dataPtr)
uInt nrext_p
The nr of extensions in use.
void putBlockdoubleV(uInt rownr, uInt nrmax, const double *dataPtr)
void resize(uInt nrval)
Resize the data blocks.
virtual void putFile(uInt nrval, AipsIO &)
Write the column data into AipsIO.
std::complex< Float > Complex
virtual ~StManColumnAipsIO()
Frees up the storage.
void getShortV(uInt rownr, Short *dataPtr)
void putBlockBoolV(uInt rownr, uInt nrmax, const Bool *dataPtr)
Put nrmax scalars from the given row on.
void putBlockfloatV(uInt rownr, uInt nrmax, const float *dataPtr)
AipsIO is the object persistency mechanism of Casacore.
void putShortV(uInt rownr, const Short *dataPtr)
uInt nralloc_p
The number of allocated rows in the column.
virtual Bool ok() const
Check if the class invariants still hold.
Abstract base class for a column in a data manager.
uInt nrow() const
Get the nr of rows in this storage manager.
virtual void getScalarColumnCellsShortV(const RefRows &rownrs, Vector< Short > *dataPtr)
int dtype_p
The data type (for caching purposes).
uInt getBlockDComplexV(uInt rownr, uInt nrmax, DComplex *dataPtr)
uInt getBlockuCharV(uInt rownr, uInt nrmax, uChar *dataPtr)
uInt nextExt(void *&ext, uInt &extnr, uInt nrmax) const
Get the next extension.
void deleteAll()
Delete all extensions.
void putdoubleV(uInt rownr, const double *dataPtr)
void getdoubleV(uInt rownr, double *dataPtr)
virtual void getData(void *datap, uInt index, uInt nrval, AipsIO &, uInt version)
Get data (nrval elements) into an extension (starting at datap plus the given index).
void setHasPut()
Set the hasPut_p flag.
void putBlockIntV(uInt rownr, uInt nrmax, const Int *dataPtr)
uInt getBlockComplexV(uInt rownr, uInt nrmax, Complex *dataPtr)
void putuIntV(uInt rownr, const uInt *dataPtr)
void putBlockuShortV(uInt rownr, uInt nrmax, const uShort *dataPtr)
void putComplexV(uInt rownr, const Complex *dataPtr)
String stmanName_p
Name given by user to this storage manager.
void putBlockuCharV(uInt rownr, uInt nrmax, const uChar *dataPtr)
int dataType() const
Return the data type of the column.
StManAipsIO * stmanPtr_p
The storage manager.
Block< void * > data_p
The assembly of all extensions (actually Block<T*>).
uInt getBlockShortV(uInt rownr, uInt nrmax, Short *dataPtr)
virtual void getScalarColumnCellsStringV(const RefRows &rownrs, Vector< String > *dataPtr)
void putDComplexV(uInt rownr, const DComplex *dataPtr)
virtual void getScalarColumnCellsIntV(const RefRows &rownrs, Vector< Int > *dataPtr)
void getDComplexV(uInt rownr, DComplex *dataPtr)
virtual void getScalarColumnCellsDComplexV(const RefRows &rownrs, Vector< DComplex > *dataPtr)
virtual void getScalarColumnCellsuShortV(const RefRows &rownrs, Vector< uShort > *dataPtr)
StManArrayFile * iosfile_p
The file containing the indirect arrays.
AipsIO table column storage manager class.
void putIntV(uInt rownr, const Int *dataPtr)
Bool byPtr_p
The data is indirectly accessed via a pointer (for the derived classes).
virtual void getScalarColumnCellsuCharV(const RefRows &rownrs, Vector< uChar > *dataPtr)
Block< uInt > ncum_p
The cumulative nr of rows in all extensions.
void * getArrayPtr(uInt rownr)
Get the pointer for the given row.
void getuCharV(uInt rownr, uChar *dataPtr)
StManColumnAipsIO(StManAipsIO *stMan, int dataType, Bool byPtr)
Create a column of the given type.
uInt nrrow_p
The number of rows in the columns.
void deleteData(void *datap, Bool byPtr)
Delete an extension.
virtual void getScalarColumnCellsuIntV(const RefRows &rownrs, Vector< uInt > *dataPtr)
std::complex< Double > DComplex
virtual void getFile(uInt nrval, AipsIO &)
Read the column data from AipsIO.
Class holding the row numbers in a RefTable.
void getIntV(uInt rownr, Int *dataPtr)
virtual void getScalarColumnCellsdoubleV(const RefRows &rownrs, Vector< double > *dataPtr)
virtual void reopenRW()
Reopen the storage manager files for read/write.
void putBlockComplexV(uInt rownr, uInt nrmax, const Complex *dataPtr)
void putArrayPtr(uInt rownr, void *dataPtr)
Put the pointer for the given row.
A hierarchical collection of named fields of various types.
bool Bool
Define the standard types used by Casacore.
virtual void getScalarColumnCellsComplexV(const RefRows &rownrs, Vector< Complex > *dataPtr)
virtual void doCreate(uInt nrrow)
Create the number of rows in a new table.
virtual void getScalarColumnCellsfloatV(const RefRows &rownrs, Vector< float > *dataPtr)
uInt getBlockBoolV(uInt rownr, uInt nrmax, Bool *dataPtr)
Get scalars from the given row on with a maximum of nrmax values.
A drop-in replacement for Block<T*>.
uInt getBlockfloatV(uInt rownr, uInt nrmax, float *dataPtr)
void putBlockStringV(uInt rownr, uInt nrmax, const String *dataPtr)
void putBlockDComplexV(uInt rownr, uInt nrmax, const DComplex *dataPtr)
AipsIO table storage manager class.
OpenOption
Define the possible ByteIO open options.
uInt uniqueNr()
Get a unique column number for the column (it is only unique for this storage manager).
void putBlockuIntV(uInt rownr, uInt nrmax, const uInt *dataPtr)
Abstract base class for a data manager.
StManColumnAipsIO & operator=(const StManColumnAipsIO &)
Forbid assignment.
uInt getBlockuShortV(uInt rownr, uInt nrmax, uShort *dataPtr)
uInt getBlockuIntV(uInt rownr, uInt nrmax, uInt *dataPtr)
void removeData(void *datap, uInt inx, uInt nrvalAfter)
Remove an entry (i.e.
void putBoolV(uInt rownr, const Bool *dataPtr)
Put a scalar value into the given row.
String: the storage and methods of handling collections of characters.
void putStringV(uInt rownr, const String *dataPtr)
virtual void addRow(uInt newNrrow, uInt oldNrrow)
Add (newNrrow-oldNrrow) rows to the column.
PtrBlock< StManColumnAipsIO * > colSet_p
The assembly of all columns.
uInt uniqnr_p
Unique nr for column in this storage manager.
Base table column storage manager class.
void getStringV(uInt rownr, String *dataPtr)
Bool hasPut_p
Has anything been put since the last flush?
void * allocData(uInt nrval, Bool byPtr)
Allocate an extension with the data type of the column.
Read/write array in external format for a storage manager.
uInt findExt(uInt rownr, Bool setCache)
Find the extension in which the row number is.
this file contains all the compiler specific defines
void getComplexV(uInt rownr, Complex *dataPtr)
uInt getBlockIntV(uInt rownr, uInt nrmax, Int *dataPtr)
void getBoolV(uInt rownr, Bool *dataPtr)
Get a scalar value in the given row.
void getfloatV(uInt rownr, float *dataPtr)
void getuIntV(uInt rownr, uInt *dataPtr)
virtual void getScalarColumnCellsBoolV(const RefRows &rownrs, Vector< Bool > *dataPtr)
Get the scalar values in some cells of the column.
void putuCharV(uInt rownr, const uChar *dataPtr)