casa
5.7.0-16
|
Driver for interacting with the table on disk. More...
#include <TBTableDriver.h>
Public Member Functions | |
TBTableDriver (TableParams *tp, TBTable *table) | |
Constructor that takes the table and the table parameters. More... | |
virtual | ~TBTableDriver () |
void | setPrintDebug (bool pdb) |
Sets whether the driver should print debug information or not. More... | |
virtual bool | canRead ()=0 |
canRead() must be implemented by any subclass. More... | |
virtual bool | canWrite ()=0 |
canWrite() must be implemented by any subclass. More... | |
virtual bool | tryWriteLock ()=0 |
tryWriteLock() must be implemented by any subclass. More... | |
virtual bool | releaseWriteLock ()=0 |
releaseWriteLock() must be implemented by any subclass. More... | |
virtual Result | loadRows (int start=0, int num=TBConstants::DEFAULT_SELECT_NUM, bool full=false, std::vector< casacore::String > *fields=NULL, bool parsedata=true, ProgressHelper *pp=NULL)=0 |
loadRows() must be implemented by any subclass. More... | |
virtual void | loadArray (TBArrayData *d, unsigned int row, unsigned int col)=0 |
loadArray() must be implemented by any subclass. More... | |
virtual std::vector< int > | dimensionsOf (unsigned int col)=0 |
dimensionsOf() must be implemented by any subclass. More... | |
virtual Result | editData (unsigned int row, unsigned int col, TBData *newVal, std::vector< int > *d=NULL)=0 |
editData() must be implemented by any subclass. More... | |
virtual int | totalRowsOf (casacore::String location)=0 |
totalRowsOf() must be implemented by any subclass. More... | |
virtual Result | insertRows (int n)=0 |
insertRows() must be implemented by any subclass. More... | |
virtual Result | deleteRows (std::vector< int > r)=0 |
deleteRows() must be implemented by any subclass. More... | |
Protected Attributes | |
casacore::String | location |
The location of the table. More... | |
bool & | insertRow |
Reference to the table's insertRow parameter. More... | |
bool & | removeRow |
Reference to the table's removeRow parameter. More... | |
std::vector< std::vector < TBData * > * > & | data |
Reference to the table's data parameter. More... | |
std::vector< TBField * > & | fields |
Reference to the table's fields parameter. More... | |
std::vector< TBKeyword * > & | keywords |
Reference to the table's keywords parameter. More... | |
std::vector< int > & | subtableRows |
Reference to the table's subtableRows parameter. More... | |
int & | totalRows |
Reference to the table's totalRows parameter. More... | |
int & | loadedRows |
Reference to the table's loadedRows parameter. More... | |
std::vector< bool > & | writable |
Reference to the table's writable parameter. More... | |
bool & | taql |
Reference to the table's taql parameter. More... | |
DriverParams * | dp |
Copy of the table's driver parameters. More... | |
bool | printdebug |
Indicates whether the driver should print debug information or not. More... | |
TBTable * | table |
Reference to the table. More... | |
Driver for interacting with the table on disk.
TBTableDriver is an abstract superclass that defines how any implementing subclass must behave in order to be used by a TBTable. Any implementing subclass should update the table parameters that the driver has references to via the TableParams passed into the constructor.
Definition at line 68 of file TBTableDriver.h.
casa::TBTableDriver::TBTableDriver | ( | TableParams * | tp, |
TBTable * | table | ||
) |
Constructor that takes the table and the table parameters.
|
virtual |
|
pure virtual |
canRead() must be implemented by any subclass.
Returns whether or not the underlying table can be read (i.e., the read lock is set). Does not necessary guarantee that the next read operation will succeed, but a sufficiently close check before a read should suffice in most situations.
Implemented in casa::TBTableDriverDirect.
|
pure virtual |
canWrite() must be implemented by any subclass.
Returns whether or not the underlying table can be written (i.e., the write lock is set). Does not necessary guarantee that the next write operation will succeed, but a sufficiently close check before a write should suffice in most situations.
Implemented in casa::TBTableDriverDirect.
|
pure virtual |
deleteRows() must be implemented by any subclass.
Deletes the given rows. See TBTable::deleteRows().
Implemented in casa::TBTableDriverXML, and casa::TBTableDriverDirect.
|
pure virtual |
dimensionsOf() must be implemented by any subclass.
Returns the array dimensions of the given field. See TBTable::dimensionsOf().
Implemented in casa::TBTableDriverXML, and casa::TBTableDriverDirect.
|
pure virtual |
editData() must be implemented by any subclass.
Updates the cell at the given coordinates to have the given value. If the data is an array, the array coordinates are provided in d. Returns the result of the operation.
Implemented in casa::TBTableDriverXML, and casa::TBTableDriverDirect.
|
pure virtual |
insertRows() must be implemented by any subclass.
Inserts the given number of rows at the end of the table. See TBTable::insertRows().
Implemented in casa::TBTableDriverXML, and casa::TBTableDriverDirect.
|
pure virtual |
loadArray() must be implemented by any subclass.
Loads the data into the given array at the given coordinates.
Implemented in casa::TBTableDriverXML, and casa::TBTableDriverDirect.
|
pure virtual |
loadRows() must be implemented by any subclass.
Loads the given rows into the table. See TBTable::loadRows();
Implemented in casa::TBTableDriverXML, and casa::TBTableDriverDirect.
|
pure virtual |
releaseWriteLock() must be implemented by any subclass.
Releases the write lock if needed.
Implemented in casa::TBTableDriverDirect.
void casa::TBTableDriver::setPrintDebug | ( | bool | pdb | ) |
Sets whether the driver should print debug information or not.
|
pure virtual |
totalRowsOf() must be implemented by any subclass.
Returns the total rows of the table at the given location. See TBTable::totalRowsOf().
Implemented in casa::TBTableDriverXML, and casa::TBTableDriverDirect.
|
pure virtual |
tryWriteLock() must be implemented by any subclass.
Tries to reopen the table using a write lock, and returns whether the operation succeeded or not. This MUST be done before any editing operations, and the lock should be released afterwards using releaseWriteLock().
Implemented in casa::TBTableDriverDirect.
|
protected |
Reference to the table's data parameter.
Definition at line 155 of file TBTableDriver.h.
|
protected |
Copy of the table's driver parameters.
Definition at line 179 of file TBTableDriver.h.
|
protected |
Reference to the table's fields parameter.
Definition at line 158 of file TBTableDriver.h.
|
protected |
Reference to the table's insertRow parameter.
Definition at line 149 of file TBTableDriver.h.
|
protected |
Reference to the table's keywords parameter.
Definition at line 161 of file TBTableDriver.h.
|
protected |
Reference to the table's loadedRows parameter.
Definition at line 170 of file TBTableDriver.h.
|
protected |
The location of the table.
Definition at line 146 of file TBTableDriver.h.
|
protected |
Indicates whether the driver should print debug information or not.
Definition at line 182 of file TBTableDriver.h.
|
protected |
Reference to the table's removeRow parameter.
Definition at line 152 of file TBTableDriver.h.
|
protected |
Reference to the table's subtableRows parameter.
Definition at line 164 of file TBTableDriver.h.
|
protected |
Reference to the table.
Definition at line 185 of file TBTableDriver.h.
|
protected |
Reference to the table's taql parameter.
Definition at line 176 of file TBTableDriver.h.
|
protected |
Reference to the table's totalRows parameter.
Definition at line 167 of file TBTableDriver.h.
|
protected |
Reference to the table's writable parameter.
Definition at line 173 of file TBTableDriver.h.