15 #include "FitsError.h"
305 InvalidColumnSpecification (
const String& msg,
bool silent =
true);
315 virtual Column&
column (
const String& colName,
bool caseSensitive =
true)
const;
318 virtual long rows ()
const;
320 void rows (
long numRows);
323 void insertRows (
long first,
long number = 1);
324 void deleteRows (
long first,
long number = 1);
325 void deleteRows (
const std::vector<long>& rowList);
330 virtual void copyColumn(
const Column& inColumn,
int colIndx,
bool insertNewCol=
true);
336 Table (
FITS* p, HduType xtype,
const String &hduName,
int rows,
337 const std::vector<String>& columnName,
const std::vector<String>& columnFmt,
const std::vector<String>& columnUnit = std::vector<String>(),
int version = 1);
341 Table (
FITS* p, HduType xtype,
const String &hduName = String(
""),
int version = 1);
345 Table (
FITS* p, HduType xtype,
int number);
347 virtual std::ostream & put (std::ostream &s)
const;
348 void init (
bool readFlag =
false,
const std::vector<String>& keys = std::vector<String>());
349 virtual void setColumn (
const String& colname,
Column* value);
350 void reindex (
int startNum,
bool isInsert);
356 virtual void initRead ();
357 virtual void readTableHeader (
int ncols, std::vector<String>& colName, std::vector<String>& colFmt, std::vector<String>& colUnit) = 0;
360 void copyData (
const Table& right);
void updateRows()
update the number of rows in the table
Definition: Table.cxx:340
virtual ~Table()
destructor
Definition: Table.cxx:174
void init(bool readFlag=false, const std::vector< String > &keys=std::vector< String >())
Definition: Table.cxx:253
int version() const
return the extension version number.
Definition: ExtHDU.h:677
long axis(size_t index) const
return the size of axis numbered index [zero based].
Definition: HDU.h:983
virtual long getRowsize() const
return the optimal number of rows to read or write at a time
Definition: Table.cxx:495
Memory object representation of a disk FITS file.
Definition: FITS.h:628
FitsException is the base class for all exceptions thrown by this library.
Definition: FitsError.h:93
base class for all FITS extension HDUs, i.e. Image Extensions and Tables.
Definition: ExtHDU.h:438
int index() const
return the HDU number
Definition: HDU.h:993
NoSuchColumn(const String &name, bool silent=true)
Exception ctor for exception thrown if the requested column (specified by name) is not present...
Definition: Table.cxx:27
virtual int numCols() const
return the number of Columns in the Table (the TFIELDS keyword).
Definition: Table.h:393
std::multimap< std::string, CCfits::Column * > ColMap
Type definition for a table's column container.
Definition: CCfits.h:142
Exception to be thrown on a failure to retrieve a column specified either by name or index number...
Definition: Table.h:289
virtual const ColMap & column() const
return a reference to the multimap containing the columns.
Definition: Table.h:398
const String & name() const
return the name of the extension.
Definition: ExtHDU.h:651
Table(const Table &right)
copy constructor
Definition: Table.cxx:56
virtual void deleteColumn(const String &columnName)
delete a column in a Table extension by name.
Definition: Table.cxx:377
virtual long rows() const
return the number of rows in the table (NAXIS2).
Definition: Table.h:381
std::vector< long > & naxes()
return the HDU data axis array.
Definition: HDU.h:1086
Abstract base class for Column objects.
Definition: Column.h:841
void insertRows(long first, long number=1)
insert empty rows into the table
Definition: Table.cxx:400
virtual void copyColumn(const Column &inColumn, int colIndx, bool insertNewCol=true)
copy a column (from different or same HDU and file) into an existing table HDU.
Definition: Table.cxx:504
void deleteRows(long first, long number=1)
delete a range of rows in a table.
Definition: Table.cxx:419