Go to the documentation of this file.
28 #ifndef TABLES_REFTABLE_H
29 #define TABLES_REFTABLE_H
33 #include <casacore/casa/aips.h>
34 #include <casacore/tables/Tables/BaseTable.h>
35 #include <casacore/casa/BasicSL/String.h>
36 #include <casacore/casa/Arrays/Vector.h>
284 Bool byColumn)
const;
318 Bool determineOrder)
const;
358 std::map<String,String>& nameMap,
Define the structure of a Casacore table.
static void makeDesc(TableDesc &desc, const TableDesc &rootDesc, std::map< String, String > &nameMap, Vector< String > &names)
Make a table description for the given columns.
virtual Bool asBigEndian() const
Is the table stored in big or little endian format?
virtual Bool adjustRownrs(uInt nrrow, Vector< uInt > &rownrs, Bool determineOrder) const
Adjust the row numbers to be the actual row numbers in the root table.
virtual TableDesc actualTableDesc() const
Get the actual table description.
virtual Vector< uInt > * rowStorage()
Get row number vector.
std::map< String, RefColumn * > colMap_p
RefTable(BaseTable *, Bool rowOrder, uInt initialNrrow)
Create a reference table object referencing the given BaseTable object.
AipsIO is the object persistency mechanism of Casacore
Abstract base class for a data manager.
RefTable & operator=(const RefTable &)
Assignment is forbidden, because copying a table requires some more knowledge (like table name of res...
virtual TableRecord & rwKeywordSet()
Get read/write access to the table keyword set.
virtual ~RefTable()
The destructor flushes (i.e.
A hierarchical collection of named fields of various types.
virtual Bool canRemoveColumn(const Vector< String > &columnNames) const
Test if columns can be removed (yes).
LockType
Define the possible lock types.
Bool checkAddColumn(const String &name, Bool addToParent)
Check if a column can be added.
void addRefCol(const ColumnDesc &cd)
Add a column.
Abstract base class for tables.
void refNot(uInt nr1, const uInt *rows1, uInt nrmain)
std::map< String, String > nameMap_p
virtual Bool rowOrder() const
Tell if the table is in row order.
const TableDesc & tableDesc() const
Get the table description.
virtual void renameColumn(const String &newName, const String &oldName)
Rename a column.
void refXor(uInt nr1, const uInt *rows1, uInt nr2, const uInt *rows2)
virtual const StorageOption & storageOption() const
Get the storage option used for the table.
virtual Bool canRemoveRow() const
Test if it is possible to remove a row from this table.
Abstract base class for a table column.
virtual const TableLock & lockOptions() const
Get the locking info.
Vector< uInt > rowStorage_p
virtual void addColumn(const ColumnDesc &columnDesc, Bool addToParent)
Add one or more columns to the table.
void addRownr(uInt rownr)
Add a rownr to reference table.
static uInt * getStorage(Vector< uInt > &rownrs)
Get the internal pointer in a rowStorage vector.
virtual Bool hasLock(FileLocker::LockType) const
Has this process the read or write lock, thus can the table be read or written safely?
virtual BaseColumn * getColumn(uInt columnIndex) const
Get a column object using its index.
virtual TableRecord & keywordSet()
Get readonly access to the table keyword set.
virtual int tableType() const
It returns the type of the parent table.
virtual DataManager * findDataManager(const String &name, Bool byColumn) const
Find the data manager with the given name or for the given column.
virtual void flush(Bool fsync, Bool recursive)
Flush the table, i.e.
Class to hold table lock options.
this file contains all the compiler specific defines
virtual void reopenRW()
Try to reopen the table (the underlying one) for read/write access.
void setup(BaseTable *btp, const Vector< String > &columnNames)
Setup the main parts of the object.
static void getLayout(TableDesc &desc, AipsIO &ios)
Return the layout of a table (i.e.
virtual void resync()
Resync the Table object with the table file.
void showStructureExtra(std::ostream &) const
Show the extra table structure info (name of root table).
virtual void mergeLock(const TableLock &lockOptions)
Merge the given lock info with the existing one.
virtual void removeColumn(const Vector< String > &columnNames)
Remove columns.
virtual Bool lock(FileLocker::LockType, uInt nattempts)
Try to lock the table for read or write access.
void refSub(uInt nr1, const uInt *rows1, uInt nr2, const uInt *rows2)
uInt rootRownr(uInt rownr) const
Get rownr in root table.
virtual Bool isWritable() const
Test if the parent table is opened as writable.
void refAnd(uInt nr1, const uInt *rows1, uInt nr2, const uInt *rows2)
And, or, subtract or xor the row numbers of 2 tables.
Options for the Tiled Storage Manager Access.
virtual uInt getModifyCounter() const
Get the modify counter.
void writeRefTable(Bool fsync)
Write a reference table.
virtual void deepCopy(const String &newName, const Record &dataManagerInfo, const StorageOption &, int tableOption, Bool, int endianFormat, Bool noRows) const
Copy the table and all its subtables.
virtual void copy(const String &newName, int tableOption) const
This is doing a shallow copy.
void copyRefTable(const String &newName, int tableOption)
Copy a RefTable that is not persistent.
int tableOption() const
Get the table option.
String: the storage and methods of handling collections of characters.
bool Bool
Define the standard types used by Casacore.
virtual Record dataManagerInfo() const
Get the data manager info.
virtual void renameHypercolumn(const String &newName, const String &oldName)
Rename a hypercolumn.
virtual Vector< uInt > rowNumbers() const
Get a vector of row numbers.
A hierarchical collection of named fields of various types.
virtual void removeRow(uInt rownr)
Remove the given row.
void refOr(uInt nr1, const uInt *rows1, uInt nr2, const uInt *rows2)
void getRef(AipsIO &, int option, const TableLock &lockOptions, const TSMOption &tsmOption)
Read a reference table from a file.
virtual void unlock()
Unlock the table.
void makeRefCol()
Create the RefColumn objects for all columns in the description.
Options defining how table files are organized.
virtual BaseTable * root()
Get parent of this table.
virtual Bool canRenameColumn(const String &columnName) const
Test if a column can be renamed (yes).
virtual Bool isMultiUsed(Bool checkSubTable) const
Is the table in use (i.e.
Class for a table as a view of another table.
Envelope class for the description of a table column.
virtual void getPartNames(Block< String > &names, Bool recursive) const
Get the names of the tables this table consists of.
void setNrrow(uInt nrrow)
Set the exact number of rows in the table.