28 #ifndef TABLES_COLUMNSET_H 29 #define TABLES_COLUMNSET_H 33 #include <casacore/casa/aips.h> 34 #include <casacore/tables/Tables/TableLockData.h> 35 #include <casacore/tables/Tables/BaseTable.h> 36 #include <casacore/tables/Tables/StorageOption.h> 37 #include <casacore/casa/Containers/SimOrdMap.h> 38 #include <casacore/casa/BasicSL/String.h> 56 template<
class T>
class Vector;
void initialize(uInt startRownr, uInt endRownr)
Initialize rows startRownr till endRownr (inclusive).
Bool canAddRow() const
Do all data managers and engines allow to add rows?
A 1-D Specialization of the Array class.
long long Int64
Define the extra non-standard types used by Casacore (like proposed uSize, Size)
void checkReadLock(Bool wait)
Check if the table is locked for read or write.
MultiFileBase * multiFile_p
ColumnSet(TableDesc *, const StorageOption &=StorageOption())
Construct from the table description.
void removeLastDataManager()
Remove the last data manager (used by addColumn after an exception).
Bool putFile(Bool writeTable, AipsIO &, const TableAttr &, Bool fsync)
Write all the data and let the data managers flush their data.
int traceId() const
Get the trace-id of the table.
Main interface class to a read/write table.
Abstract base class to combine multiple files in a single one.
AipsIO is the object persistency mechanism of Casacore.
int traceId() const
Get the table's trace-id.
void addColumn(const ColumnDesc &columnDesc, Bool bigEndian, const TSMOption &tsmOption, Table &tab)
Add a column to the table.
DataManager * findDataManager(const String &name, Bool byColumn=False) const
Find the data manager with the given name or for the given column.
Envelope class for the description of a table column.
void initSomeDataManagers(uInt from, Table &tab)
Let the data managers (from the given index on) initialize themselves.
SimpleOrderedMap< void *, Int > checkRemoveColumn(const Vector< String > &columnNames)
Check if columns to be removed can be removed.
uInt getFile(AipsIO &, Table &tab, uInt nrrow, Bool bigEndian, const TSMOption &tsmOption)
Read the data, reconstruct the data managers, and link those to the table object. ...
Class to hold table lock data.
void renameTables(const String &newName, const String &oldName)
Rename the necessary subtables in the column keywords.
void initDataManagers(uInt nrrow, Bool bigEndian, const TSMOption &tsmOption, Table &tab)
Initialize the data managers for a new table.
Bool readLocking() const
Is read locking needed?
void userUnlock(Bool releaseFlag)
Release a temporary user lock if the given release flag is True.
String uniqueDataManagerName(const String &name) const
Make a unique data manager name by appending a suffix _n if needed where n is a number that makes the...
Class to manage a set of table columns.
Bool canRenameColumn(const String &columnName) const
Can a column be renamed in the data manager?
Options defining how table files are organized.
void doAddColumn(const ColumnDesc &columnDesc, DataManager *dataManPtr)
Do the actual addition of a column.
void autoReleaseLock()
Inspect the auto lock when the inspection interval has expired and release it when another process ne...
Block< void * > blockDataMan_p
void invalidateColumnCaches()
Invalidate the column caches for all columns.
Simple map with keys ordered.
Abstract base class for tables.
void autoRelease(Bool always=False)
When the inspection interval has expired, inspect if another process needs the lock.
DataManager * getDataManager(uInt seqnr) const
Get the correct data manager.
void openMultiFile(uInt from, const Table &tab, ByteIO::OpenOption)
Open or create the MultiFile if needed.
Bool areTablesMultiUsed() const
Are subtables used in other processes.
Options for the Tiled Storage Manager Access.
Bool canRemoveRow() const
Do all data managers and engines allow to remove rows?
A hierarchical collection of named fields of various types.
bool Bool
Define the standard types used by Casacore.
TableDesc actualTableDesc() const
Get the actual table description.
void renameColumn(const String &newName, const String &oldName)
Rename the column in the map.
void syncColumns(const ColumnSet &other, const TableAttr &defaultAttr)
Synchronize the columns after it appeared that data in the main table file have changed.
void linkToLockObject(TableLockData *lockObject)
Link the ColumnSet object to the TableLockData object.
uInt resync(uInt nrrow, Bool forceSync)
Synchronize the data managers when data in them have changed.
Bool checkDataManagerName(const String &name, uInt from, const String &tableName, Bool doTthrow=True) const
Check if a data manager name has not already been used.
void addRow(uInt nrrow)
Add rows to all data managers.
PlainColumn * getColumn(const String &columnName) const
Get a column by name.
Base class for a column in a plain table.
void setTableChanged()
Set the table to being changed.
void checkWriteLock(Bool wait)
void checkDataManagerNames(const String &tableName) const
Check if no double data manager names have been given.
void release(Bool always=False)
Release the lock.
OpenOption
Define the possible ByteIO open options.
const StorageOption & storageOption() const
Get the storage option.
Bool canRemoveColumn(const Vector< String > &columnNames) const
Can the given columns be removed from the data manager?
Abstract base class for a data manager.
Block< Bool > & dataManChanged()
Get the data manager change flags (used by PlainTable).
void linkToTable(BaseTable *baseTableObject)
Link the ColumnSet object to the BaseTable object.
void doLock(FileLocker::LockType, Bool wait)
Check if the table is locked for read or write.
String: the storage and methods of handling collections of characters.
SimpleOrderedMap< String, void * > colMap_p
Bool hasLock(FileLocker::LockType) const
Has this process the read or write lock, thus can the table be read or written safely?
Define the structure of a Casacore table.
void reopenRW()
Reopen the data managers for read/write.
void addDataManager(DataManager *)
Add a data manager.
BaseTable * baseTablePtr_p
LockType
Define the possible lock types.
void prepareSomeDataManagers(uInt from)
Let the data managers (from the given index on) prepare themselves.
Block< Bool > dataManChanged_p
Some attributes of a table.
TableLockData * lockPtr_p
StorageOption storageOpt_p
void removeRow(uInt rownr)
Remove a row from all data managers.
void removeColumn(const Vector< String > &columnNames)
Remove the columns from the map and the data manager.
this file contains all the compiler specific defines
Bool userLock(FileLocker::LockType, Bool wait)
If needed, get a temporary user lock.
virtual void setTableChanged()
Set the table to being changed.
Record dataManagerInfo(Bool virtualOnly=False) const
Get the data manager info.
uInt nrow() const
Get nr of rows.