MSTableIndex.h

Classes

MSTableIndex -- (full description)

class MSTableIndex

Interface

Public Members
MSTableIndex()
MSTableIndex(const Table &subTable, const Vector<String> &indexCols, ColumnsIndex::Compare *compareFunction = 0)
MSTableIndex(const MSTableIndex &other)
virtual ~MSTableIndex()
MSTableIndex &operator=(const MSTableIndex &other)
void attach(const Table &subTable, const Vector<String> &indexCols, ColumnsIndex::Compare *compareFunction = 0)
virtual void setChanged()
virtual Record &accessKey()
virtual Double &time()
virtual Double &interval()
virtual Vector<uInt> getRowNumbers()
virtual uInt getNearestRow(Bool &found)
virtual Bool isNull()
virtual Table &table()
Private Members
void clear()
void makeKeys()
Bool keysChanged()
void getInternals()
void nearestTime()

Description

Review Status

Date Reviewed:
yyyy/mm/dd

Prerequisite

Etymology

Synopsis

Example

Motivation

Thrown Exceptions

To Do

Member Description

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. 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.

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. There is no need to call this when new rows are added to the table

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. 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 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()). This also has the same problem as the previous function.

virtual Bool isNull()

is this attached to a null table

virtual Table &table()

return the subtable being indexed

void clear()

void makeKeys()

Bool keysChanged()

void getInternals()

void nearestTime()