SDTableIterator.h
Classes
- SDTableIterator -- (full description)
Interface
- Public Members
- SDTableIterator(const String &tableName, const Record &selection, Table::TableOption opt = Table::Old, TableLock::LockOption lockoption = TableLock::DefaultLocking)
- SDTableIterator(const SDTableIterator& other)
- SDTableIterator(const SDTableIterator& other, const Record &selection)
- ~SDTableIterator()
- SDTableIterator &operator=(const SDTableIterator& other)
- virtual String type() const
- Bool unlock()
- Bool lock(uInt nattempts=0)
- void origin()
- Bool more()
- SDIterator& operator++(int)
- SDIterator& operator++()
- SDIterator& operator--(int)
- SDIterator& operator--()
- uInt where() const
- uInt nrecords()
- void resync()
- void flush()
- void reselect()
- void deepCopy(const String &newName)
- const SDRecord &get()
- const Record &getData()
- const Record &getHeader()
- const Record &getOther()
- const Array<String> getHist()
- Bool put(const SDRecord& rec)
- Bool appendRec(const SDRecord &rec)
- Bool deleteRec()
- Bool isWritable() const
- const Record &stringFields() const
- String name() const
- Bool ok() const
- Private Members
- void cleanup()
- void cleanupMost()
- void copyAll()
- void copyData()
- void copyHeader()
- void copyHist()
- void copyOther()
- Bool replaceAll(const SDRecord& rec, Bool rowIsNew = False)
- Bool ensureSDFITSTable()
- void init()
- void initStatics()
- void applySelection(const Record &selection)
- void createTable(const String& tableName, TableLock::LockOption lockoption, Table::TableOption opt)
- void ensureOutputColumns()
- void setRowShape()
- void initStringFields(Record &fieldsRec, const Record &modelRec)
- String makeFullAxisSel(const String &axisSel, const Vector<String> &ctypeCols, const Vector<String> &axisCols)
- String parseSelection(const Record& selection, const TableDesc& layout, Vector<uInt> &specalRows, Bool &hasSpecial)
- Bool parseSpecialFields(const Record& selection, Vector<uInt> &specialRows)
- Vector<uInt> parseRow(const Record& selection, Int maxRow)
- Bool parseRecord(const Record& selection, const SimpleOrderedMap<String, String>& map, const TableDesc& layout, String& result)
- Bool parseDescRecord(const Record& selection, String& result)
- Double getRefPix(const Vector<Double> &chanVals, Double refVal, Double &delta)
- static void getSpecialVectors(SDIterAxes &axes, Vector<Double> &uts, Vector<String> &dates, uInt nrecs, uInt nrow, Bool doUT, Bool doDate)
- Record getVectorShortCuts(const Record &recTemplate)
- Bool isSDFITSTable(const Table& tab)
- void deleteCopiers()
- void setCopiers()
- Bool copyRecord(Record &outRec, const Record &inRec)
Review Status
- Date Reviewed:
- yyyy/mm/dd
Prerequisite
Etymology
Synopsis
Example
Motivation
Thrown Exceptions
To Do
- FELO velocity axis isn't handled quite right, especially for large velocities
- Try and improve the speed of the copyAll() function
- Separate copyAll() into its constituent parts so that only those parts that
are needed when assembling vectors or returning just the header or desc are filled.
Member Description
SDTableIterator(const String &tableName, const Record &selection, Table::TableOption opt = Table::Old, TableLock::LockOption lockoption = TableLock::DefaultLocking)
construct an iterator from a FLAT Table
for now, this must be an SDFITS table
the selection string is currently ignored
construct from another iterator
SDTableIterator(const SDTableIterator& other, const Record &selection)
construct from another with selection
SDTableIterator &operator=(const SDTableIterator& other)
assiment operator
what type of sditerator is this ("Table")
Unlock this table
Bool lock(uInt nattempts=0)
Lock this table. Try nattempts times.
Resets the iterator to the top
are there any more SDRecords after the current one
step to the next one, if at end, nothing changes
step back, if at end, nothing changes
uInt where() const
return the current row number
how many SDRecords are there
resync with the disk contents
flush the disk contents - a no-op if this is a read-only sditerator
re-select
make a deep copy
return the current SDRecord
return just the data portion of the current SDRecord
return just the header portion of the current SDRecord
return just the other portion of the current SDRecord
return just the hist portion of the current SDRecord
replace the current SDRecord with a new one
add a new record at the end of the iterator
delete the record at the current location
see if this iterator is writable
currently always returns False.
get a record with structure like the current working SDRecord which
contains only fields which are scalar string fields - the value of those
fields is just a boolean. This is necessary so that the proper
parsing of the selection when given as a string can be done for
each field without having to duplicate that code in both glish
and here in C++.
return the name of iterator, the same as the table name
Bool ok() const
other things may not work if ok == False, this needs to be cleaned up
Bool replaceAll(const SDRecord& rec, Bool rowIsNew = False)
void createTable(const String& tableName, TableLock::LockOption lockoption, Table::TableOption opt)
Double getRefPix(const Vector<Double> &chanVals, Double refVal, Double &delta)
static void getSpecialVectors(SDIterAxes &axes, Vector<Double> &uts, Vector<String> &dates, uInt nrecs, uInt nrow, Bool doUT, Bool doDate)
This will likely be more useful elsewhere eventually
Does the table appear to be from an SDFITS file