26#ifndef MS_MSTABLEINDEX_H
27#define MS_MSTABLEINDEX_H
29#include <casacore/casa/aips.h>
30#include <casacore/casa/Arrays/Vector.h>
31#include <casacore/casa/Containers/Block.h>
32#include <casacore/casa/Containers/RecordField.h>
33#include <casacore/tables/Tables/Table.h>
34#include <casacore/tables/Tables/ScalarColumn.h>
35#include <casacore/tables/Tables/ColumnsIndex.h>
Int Compare(const Block< void * > &fieldPtrs, const Block< void * > &dataPtrs, const Block< Int > &dataTypes, rownr_t index)
Define the signature of a comparison function.
virtual Double & interval()
access the INTERVAL to use in the search (seconds), must be >= 0
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 c...
virtual Double & time()
access the TIME to use in the search (seconds)
virtual void setChanged()
Call this when an index in an existing row has changed.
ScalarColumn< Double > timeColumn_p
Int64 lastNearest_p
last nearest
Record * key_p
Internal keys - set by user.
Vector< Int > lastKeys_p
last known integer key values
MSTableIndex & operator=(const MSTableIndex &other)
assignment operator, refernce semantics
Block< RecordFieldPtr< Int > > intKeys_p
RowNumbers lastSearch_p
last search result - matching integer keys
Vector< Double > intervalVec_p
Vector< Double > timeVec_p
ScalarColumn< Double > intervalColumn_p
virtual Table & table()
return the subtable being indexed
MSTableIndex()
no index attached, use the attach function or assignment operator to change that
const Double * intervalVals_p
Double lastTime_p
last known time and interval
virtual Bool isNull()
is this attached to a null table
virtual Int64 getNearestRow(Bool &found)
get the row number which falls in the interval and has the time nearest to the center of the interval...
virtual RowNumbers getRowNumbers()
get all of the rows in the subTable which have data during the indicated time and interval values.
MSTableIndex(const MSTableIndex &other)
construct one from another
rownr_t nrows_p
last known sub-table size
virtual Record & accessKey()
access the record of index (integer) keys
const Double * timeVals_p
Block< RecordFieldPtr< Int > > indexKeys_p
void attach(const Table &subTable, const Vector< String > &indexCols, ColumnsIndex::Compare *compareFunction=0)
attach this to a subtable using indexCols
Bool isNull() const
Test if the object is null, i.e.
this file contains all the compiler specific defines
long long Int64
Define the extra non-standard types used by Casacore (like proposed uSize, Size)
bool Bool
Define the standard types used by Casacore.
uInt64 rownr_t
Define the type of a row number in a table.