casa
$Rev:20696$
|
#include <MSTableIndex.h>
Public Member Functions | |
MSTableIndex () | |
no index attached, use the attach function or assignment operator to change that | |
MSTableIndex (const Table &subTable, const Vector< String > &indexCols, ColumnsIndex::Compare *compareFunction=0) | |
construct one using the indicated subtable which is part of the parent MS using the indicated index columns. | |
MSTableIndex (const MSTableIndex &other) | |
construct one from another | |
virtual | ~MSTableIndex () |
MSTableIndex & | operator= (const MSTableIndex &other) |
assignment operator, refernce semantics | |
void | attach (const Table &subTable, const Vector< String > &indexCols, ColumnsIndex::Compare *compareFunction=0) |
attach this to a subtable using indexCols | |
virtual void | setChanged () |
Call this when an index in an existing row has changed. | |
virtual Record & | accessKey () |
access the record of index (integer) keys | |
virtual Double & | time () |
access the TIME to use in the search (seconds) | |
virtual Double & | interval () |
access the INTERVAL to use in the search (seconds), must be >= 0 | |
virtual Vector< uInt > | getRowNumbers () |
get all of the rows in the subTable which have data during the indicated time and interval values. | |
virtual uInt | getNearestRow (Bool &found) |
get the row number which falls in the interval and has the time nearest to the center of the interval (time()). | |
virtual Bool | isNull () |
is this attached to a null table | |
virtual Table & | table () |
return the subtable being indexed | |
Private Member Functions | |
void | clear () |
void | makeKeys () |
Bool | keysChanged () |
void | getInternals () |
void | nearestTime () |
Private Attributes | |
Table | tab_p |
the subtable | |
ROScalarColumn< Double > | timeColumn_p |
ROScalarColumn< Double > | intervalColumn_p |
Vector< Double > | timeVec_p |
Vector< Double > | intervalVec_p |
const Double * | timeVals_p |
const Double * | intervalVals_p |
Bool | deleteItTime_p |
Bool | deleteItInterval_p |
Record * | key_p |
Internal keys - set by user. | |
Block< RecordFieldPtr< Int > > | intKeys_p |
Double | time_p |
Double | interval_p |
Vector< Int > | lastKeys_p |
last known integer key values | |
Double | lastTime_p |
last known time and interval | |
Double | lastInterval_p |
Vector< uInt > | lastSearch_p |
last search result - matching integer keys | |
Int | lastNearest_p |
last nearest | |
Bool | nearestFound_p |
Bool | nearestReady_p |
uInt | nrows_p |
last known sub-table size | |
Bool | hasChanged_p |
ColumnsIndex * | index_p |
Block< RecordFieldPtr< Int > > | indexKeys_p |
Bool | hasTime_p |
Bool | hasInterval_p |
Public interface
<h3>Review Status</h3><dl><dt>Date Reviewed:<dd>yyyy/mm/dd</dl>
Definition at line 81 of file MSTableIndex.h.
no index attached, use the attach function or assignment operator to change that
casa::MSTableIndex::MSTableIndex | ( | const Table & | subTable, |
const Vector< String > & | indexCols, | ||
ColumnsIndex::Compare * | compareFunction = 0 |
||
) |
construct one using the indicated subtable which is part of the parent MS using the indicated index columns.
All index columns must be scalar integer columns. TIME and INTERVAL will be used when present. A compare function can be provided to over-ride literal matching of column values.
casa::MSTableIndex::MSTableIndex | ( | const MSTableIndex & | other | ) |
construct one from another
virtual casa::MSTableIndex::~MSTableIndex | ( | ) | [virtual] |
virtual Record& casa::MSTableIndex::accessKey | ( | ) | [inline, virtual] |
access the record of index (integer) keys
Definition at line 111 of file MSTableIndex.h.
References key_p.
void casa::MSTableIndex::attach | ( | const Table & | subTable, |
const Vector< String > & | indexCols, | ||
ColumnsIndex::Compare * | compareFunction = 0 |
||
) |
attach this to a subtable using indexCols
void casa::MSTableIndex::clear | ( | ) | [private] |
void casa::MSTableIndex::getInternals | ( | ) | [private] |
virtual uInt casa::MSTableIndex::getNearestRow | ( | Bool & | found | ) | [virtual] |
get the row number which falls in the interval and has the time nearest to the center of the interval (time()).
This also has the same problem as the previous function.
virtual Vector<uInt> casa::MSTableIndex::getRowNumbers | ( | ) | [virtual] |
get all of the rows in the subTable which have data during the indicated time and interval values.
For now, this code will miss the case where the subtable has interval = -1 and the start time is outside of the time range implied by the time and interval. If the table has changed and the time is >
virtual Double& casa::MSTableIndex::interval | ( | ) | [inline, virtual] |
access the INTERVAL to use in the search (seconds), must be >= 0
Definition at line 117 of file MSTableIndex.h.
References interval_p.
virtual Bool casa::MSTableIndex::isNull | ( | ) | [inline, virtual] |
is this attached to a null table
Definition at line 130 of file MSTableIndex.h.
References casa::Table::isNull(), and tab_p.
Bool casa::MSTableIndex::keysChanged | ( | ) | [private] |
void casa::MSTableIndex::makeKeys | ( | ) | [private] |
void casa::MSTableIndex::nearestTime | ( | ) | [private] |
MSTableIndex& casa::MSTableIndex::operator= | ( | const MSTableIndex & | other | ) |
assignment operator, refernce semantics
virtual void casa::MSTableIndex::setChanged | ( | ) | [virtual] |
Call this when an index in an existing row has changed.
There is no need to call this when new rows are added to the table
virtual Table& casa::MSTableIndex::table | ( | ) | [inline, virtual] |
virtual Double& casa::MSTableIndex::time | ( | ) | [inline, virtual] |
access the TIME to use in the search (seconds)
Definition at line 114 of file MSTableIndex.h.
References time_p.
Bool casa::MSTableIndex::deleteItInterval_p [private] |
Definition at line 141 of file MSTableIndex.h.
Bool casa::MSTableIndex::deleteItTime_p [private] |
Definition at line 141 of file MSTableIndex.h.
Bool casa::MSTableIndex::hasChanged_p [private] |
Definition at line 163 of file MSTableIndex.h.
Bool casa::MSTableIndex::hasInterval_p [private] |
Definition at line 167 of file MSTableIndex.h.
Bool casa::MSTableIndex::hasTime_p [private] |
Definition at line 167 of file MSTableIndex.h.
ColumnsIndex* casa::MSTableIndex::index_p [private] |
Definition at line 165 of file MSTableIndex.h.
Block<RecordFieldPtr<Int> > casa::MSTableIndex::indexKeys_p [private] |
Definition at line 166 of file MSTableIndex.h.
Double casa::MSTableIndex::interval_p [private] |
Definition at line 146 of file MSTableIndex.h.
Referenced by interval().
Definition at line 138 of file MSTableIndex.h.
const Double * casa::MSTableIndex::intervalVals_p [private] |
Definition at line 140 of file MSTableIndex.h.
Vector<Double> casa::MSTableIndex::intervalVec_p [private] |
Definition at line 139 of file MSTableIndex.h.
Block<RecordFieldPtr<Int> > casa::MSTableIndex::intKeys_p [private] |
Definition at line 145 of file MSTableIndex.h.
Record* casa::MSTableIndex::key_p [private] |
Internal keys - set by user.
Definition at line 144 of file MSTableIndex.h.
Referenced by accessKey().
Double casa::MSTableIndex::lastInterval_p [private] |
Definition at line 151 of file MSTableIndex.h.
Vector<Int> casa::MSTableIndex::lastKeys_p [private] |
last known integer key values
Definition at line 149 of file MSTableIndex.h.
Int casa::MSTableIndex::lastNearest_p [private] |
last nearest
Definition at line 157 of file MSTableIndex.h.
Vector<uInt> casa::MSTableIndex::lastSearch_p [private] |
last search result - matching integer keys
Definition at line 154 of file MSTableIndex.h.
Double casa::MSTableIndex::lastTime_p [private] |
last known time and interval
Definition at line 151 of file MSTableIndex.h.
Bool casa::MSTableIndex::nearestFound_p [private] |
Definition at line 158 of file MSTableIndex.h.
Bool casa::MSTableIndex::nearestReady_p [private] |
Definition at line 158 of file MSTableIndex.h.
uInt casa::MSTableIndex::nrows_p [private] |
last known sub-table size
Definition at line 161 of file MSTableIndex.h.
Table casa::MSTableIndex::tab_p [private] |
Double casa::MSTableIndex::time_p [private] |
Definition at line 146 of file MSTableIndex.h.
Referenced by time().
ROScalarColumn<Double> casa::MSTableIndex::timeColumn_p [private] |
Definition at line 138 of file MSTableIndex.h.
const Double* casa::MSTableIndex::timeVals_p [private] |
Definition at line 140 of file MSTableIndex.h.
Vector<Double> casa::MSTableIndex::timeVec_p [private] |
Definition at line 139 of file MSTableIndex.h.