15 #include "FitsError.h" 294 InvalidColumnSpecification (
const String& msg,
bool silent =
true);
304 virtual Column&
column (
const String& colName,
bool caseSensitive =
true)
const;
307 virtual long rows ()
const;
309 void rows (
long numRows);
312 void insertRows (
long first,
long number = 1);
313 void deleteRows (
long first,
long number = 1);
314 void deleteRows (
const std::vector<long>& rowList);
319 virtual void copyColumn(
const Column& inColumn,
int colIndx,
bool insertNewCol=
true);
325 Table (FITSBase* p, HduType xtype,
const String &hduName,
int rows,
326 const std::vector<String>& columnName,
const std::vector<String>& columnFmt,
const std::vector<String>& columnUnit = std::vector<String>(),
int version = 1);
328 Table (FITSBase* p, HduType xtype,
const String &hduName = String(
""),
int version = 1);
332 Table (FITSBase* p, HduType xtype,
int number);
334 virtual std::ostream & put (std::ostream &s)
const;
335 void init (
bool readFlag =
false,
const std::vector<String>& keys = std::vector<String>());
336 virtual void setColumn (
const String& colname,
Column* value);
337 void reindex (
int startNum,
bool isInsert);
343 virtual void initRead ();
344 virtual void readTableHeader (
int ncols, std::vector<String>& colName, std::vector<String>& colFmt, std::vector<String>& colUnit) = 0;
347 void copyData (
const Table& right);
virtual long rows() const
return the number of rows in the table (NAXIS2).
Definition: Table.h:368
void updateRows()
update the number of rows in the table
Definition: Table.cxx:301
const String & name() const
return the name of the extension.
Definition: ExtHDU.h:651
virtual ~Table()
destructor
Definition: Table.cxx:135
void init(bool readFlag=false, const std::vector< String > &keys=std::vector< String >())
Definition: Table.cxx:214
int version() const
return the extension version number.
Definition: ExtHDU.h:677
int index() const
return the HDU number
Definition: HDU.h:885
virtual int numCols() const
return the number of Columns in the Table (the TFIELDS keyword).
Definition: Table.h:380
FitsException is the base class for all exceptions thrown by this library.
Definition: FitsError.h:93
Namespace enclosing all CCfits classes and globals definitions.
Definition: AsciiTable.cxx:26
base class for all FITS extension HDUs, i.e. Image Extensions and Tables.
Definition: ExtHDU.h:438
long axis(size_t index) const
return the size of axis numbered index [zero based].
Definition: HDU.h:873
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
std::multimap< std::string, CCfits::Column * > ColMap
Type definition for a table's column container.
Definition: CCfits.h:109
Exception to be thrown on a failure to retrieve a column specified either by name or index number...
Definition: Table.h:278
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:314
virtual const ColMap & column() const
return a reference to the multimap containing the columns.
Definition: Table.h:385
virtual long getRowsize() const
return the optimal number of rows to read or write at a time
Definition: Table.cxx:432
std::vector< long > & naxes()
return the HDU data axis array.
Definition: HDU.h:979
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:337
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:441
void deleteRows(long first, long number=1)
delete a range of rows in a table.
Definition: Table.cxx:356