28 #ifndef TABLES_COLUMNSINDEXARRAY_H
29 #define TABLES_COLUMNSINDEXARRAY_H
242 Bool lowerInclusive,
Bool upperInclusive,
ColumnsIndexArray & operator=(const ColumnsIndexArray &that)
Assignment (copy semantics).
size_t nelements() const
How many elements does this array have? Product of all axis lengths.
void makeObjects(const RecordDesc &description)
Make the various internal RecordFieldPtr objects.
Main interface class to a read/write table.
Vector< rownr_t > itsUniqueIndex
Record & accessUpperKey()
rownr_t getRowNumber(Bool &found)
Find the row number matching the key.
ColumnsIndexArray(const Table &, const String &columnName)
Create an index on the given table for the given column.
Block< rownr_t > itsRownrs
Index to an array column in a table.
Record & accessKey()
Access the key values.
RowNumbers getRowNumbers(Bool unique=False)
Find the row numbers matching the key.
Description of the fields in a record object.
void fillRownrs(rownr_t npts, const Block< rownr_t > &nrel)
Fill the rownrs belonging to each array value.
A hierarchical collection of named fields of various types.
bool Bool
Define the standard types used by Casacore.
Bool isUnique() const
Are all keys in the index unique?
static Int compare(void *fieldPtr, void *dataPtr, Int dataType, rownr_t index)
Compare the key in fieldPtr with the given index entry.
void copy(const ColumnsIndexArray &that)
Copy that object to this.
void fillRowNumbers(Vector< rownr_t > &rows, rownr_t start, rownr_t end, Bool unique) const
Fill the row numbers vector for the given start till end in the itsUniqueIndexArray vector (end is no...
Record & accessLowerKey()
Read/write access to a table column.
void setChanged()
Something has changed in the table, so the index has to be recreated.
const Table & table() const
Get the table for which this index is created.
uInt64 rownr_t
Define the type of a row number in a table.
void readData()
Read the data of the columns forming the index, sort them and form the index.
String: the storage and methods of handling collections of characters.
void deleteObjects()
Delete all data in the object.
void getArray(Vector< uChar > &result, const String &name)
Get the data if the column is an array.
const String & columnName() const
Return the names of the columns forming the index.
rownr_t bsearch(Bool &found, void *fieldPtr) const
Do a binary search on itsUniqueIndexArray for the key in fieldPtrs.
Vector< rownr_t > itsDataIndex
void addColumnToDesc(RecordDesc &description, const TableColumn &column)
Add a column to the record description for the keys.