15 #include "FitsError.h"
303 InvalidColumnSpecification (
const String& msg,
bool silent =
true);
313 virtual Column&
column (
const String& colName,
bool caseSensitive =
true)
const;
316 virtual long rows ()
const;
318 void rows (
long numRows);
321 void insertRows (
long first,
long number = 1);
322 void deleteRows (
long first,
long number = 1);
323 void deleteRows (
const std::vector<long>& rowList);
326 virtual const std::map<string, Column*>&
column ()
const;
327 virtual std::map<string, Column*>&
column ();
333 Table (FITSBase* p, HduType xtype,
const String &hduName,
int rows,
334 const std::vector<String>& columnName,
const std::vector<String>& columnFmt,
const std::vector<String>& columnUnit = std::vector<String>(),
int version = 1);
336 Table (FITSBase* p, HduType xtype,
const String &hduName = String(
""),
int version = 1);
340 Table (FITSBase* p, HduType xtype,
int number);
342 virtual std::ostream & put (std::ostream &s)
const;
344 void init (
bool readFlag =
false,
const std::vector<String>& keys = std::vector<String>());
352 virtual void initRead ();
353 virtual void readTableHeader (
int ncols, std::vector<String>& colName, std::vector<String>& colFmt, std::vector<String>& colUnit) = 0;
356 void copyData (
const Table& right);
365 std::map<string, Column*> m_column;
virtual void setColumn(const String &colname, Column *value)
set the column with name colname to the input value.
Definition: Table.cxx:313
void updateRows()
update the number of rows in the table
Definition: Table.cxx:305
virtual ~Table()
destructor
Definition: Table.cxx:128
void init(bool readFlag=false, const std::vector< String > &keys=std::vector< String >())
Definition: Table.cxx:219
int version() const
return the extension version number.
Definition: ExtHDU.h:659
long axis(size_t index) const
return the size of axis numbered index [zero based].
Definition: HDU.h:841
virtual long getRowsize() const
return the optimal number of rows to read or write at a time
Definition: Table.cxx:418
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:421
int index() const
return the HDU number
Definition: HDU.h:853
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:26
virtual int numCols() const
return the number of Columns in the Table (the TFIELDS keyword).
Definition: Table.h:389
Exception to be thrown on a failure to retrieve a column specified either by name or index number...
Definition: Table.h:287
const String & name() const
return the name of the extension.
Definition: ExtHDU.h:633
Table(const Table &right)
copy constructor
Definition: Table.cxx:55
virtual void deleteColumn(const String &columnName)
delete a column in a Table extension by name.
Definition: Table.cxx:320
virtual long rows() const
return the number of rows in the table (NAXIS2).
Definition: Table.h:377
std::vector< long > & naxes()
return the HDU data axis array.
Definition: HDU.h:943
Abstract base class for Column objects.
Definition: Column.h:827
virtual const std::map< string, Column * > & column() const
return a reference to the array containing the columns.
Definition: Table.h:394
void insertRows(long first, long number=1)
insert empty rows into the table
Definition: Table.cxx:331
void deleteRows(long first, long number=1)
delete a range of rows in a table.
Definition: Table.cxx:350