CCfits  2.6
AsciiTable.h
1 // Astrophysics Science Division,
2 // NASA/ Goddard Space Flight Center
3 // HEASARC
4 // http://heasarc.gsfc.nasa.gov
5 // e-mail: ccfits@legacy.gsfc.nasa.gov
6 //
7 // Original author: Ben Dorman
8 
9 #ifndef ASCIITABLE_H
10 #define ASCIITABLE_H 1
11 
12 // HDUCreator
13 #include "HDUCreator.h"
14 // Table
15 #include "Table.h"
16 // needed for CLONE_DEFECT
17 #ifdef _MSC_VER
18 #include "MSconfig.h"
19 #endif
20 
21 
22 namespace CCfits {
23 
136  class AsciiTable : public Table //## Inherits: <unnamed>%3804A75CE420
137  {
138 
139  public:
140  virtual AsciiTable * clone (FITS* p) const;
141  virtual void readData (bool readFlag = false, const std::vector<String>& keys = std::vector<String>());
142  virtual void addColumn (ValueType type, const String& columnName, long repeatWidth, const String& colUnit = String(""), long decimals = 0, size_t columnNumber = 0);
143 
144  // Additional Public Declarations
145 
146  protected:
147  AsciiTable (FITS* p, const String &hduName = String(""), bool readFlag = false, const std::vector<String>& keys = std::vector<String>(), int version = 1);
148  AsciiTable (FITS* p, const String &hduName, int rows, const std::vector<String>& columnName = std::vector<String>(), const std::vector<String>& columnFmt = std::vector<String>(), const std::vector<String>& columnUnit = std::vector<String>(), int version = 1);
149  // ExtHDU constructor for getting ExtHDUs by number.
150  // Necessary since EXTNAME is a reserved not required
151  // keyword.
152  AsciiTable (FITS* p, int number);
153  ~AsciiTable();
154 
155  // Additional Protected Declarations
156 
157  private:
158  AsciiTable(const AsciiTable &right);
159 
160  virtual void readTableHeader (int ncols, std::vector<String>& colName, std::vector<String>& colFmt, std::vector<String>& colUnit);
161 
162  // Additional Private Declarations
163 
164  private: //## implementation
165  // Additional Implementation Declarations
166  friend class HDUCreator;
167  };
168 
169  // Class CCfits::AsciiTable
170 
171 } // namespace CCfits
172 
173 
174 #endif
int version() const
return the extension version number.
Definition: ExtHDU.h:677
Class Representing Ascii Table Extensions.
Definition: AsciiTable.h:136
virtual void readData(bool readFlag=false, const std::vector< String > &keys=std::vector< String >())
read columns and keys specified in the input array.
Definition: AsciiTable.cxx:138
AsciiTable(FITS *p, const String &hduName=String(""), bool readFlag=false, const std::vector< String > &keys=std::vector< String >(), int version=1)
reading constructor: Construct a AsciiTable extension from an extension of an existing disk file...
Definition: AsciiTable.cxx:35
Memory object representation of a disk FITS file.
Definition: FITS.h:628
ValueType
CCfits value types and their CFITSIO equivalents (in caps)
Definition: CCfits.h:81
~AsciiTable()
destructor.
Definition: AsciiTable.cxx:77
Definition: Table.h:282
virtual void addColumn(ValueType type, const String &columnName, long repeatWidth, const String &colUnit=String(""), long decimals=0, size_t columnNumber=0)
add a new column to an existing table HDU.
Definition: AsciiTable.cxx:239
virtual long rows() const
return the number of rows in the table (NAXIS2).
Definition: Table.h:381
virtual AsciiTable * clone(FITS *p) const
virtual copy constructor
Definition: AsciiTable.cxx:131