27.01.2015 Views

CCfits - HEASARC - NASA

CCfits - HEASARC - NASA

CCfits - HEASARC - NASA

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

24.32 <strong>CCfits</strong>::HDU Class Reference 112<br />

Static Public Member Functions<br />

• static std::vector< int > keywordCategories ()<br />

return the enumerated keyword categories used by readAllKeys() and copyAllKeys()<br />

Protected Member Functions<br />

• HDU (FITSBase ∗p=0)<br />

default constructor, called by HDU subclasses that read from FITS files.<br />

• HDU (FITSBase ∗p, int bitpix, int naxis, const std::vector< long > &axes)<br />

constructor for creating new HDU objects, called by HDU subclasses writing to FITS<br />

files.<br />

• virtual ∼HDU ()<br />

destructor<br />

• std::vector< long > & naxes ()<br />

return the HDU data axis array.<br />

24.32.1 Detailed Description<br />

Base class for all HDU [Header-Data Unit] objects.<br />

HDU objects in <strong>CCfits</strong> are either PHDU (Primary HDU objects) or ExtHDU (Extension<br />

HDU) objects. Following the behavior. ExtHDUs are further subclassed into ImageExt<br />

or Table objects, which are finally AsciiTable or BinTable objects.<br />

HDU’s public interface gives access to properties that are common to all HDUs, largely<br />

required keywords, and functions that are common to all HDUs, principally the manipulation<br />

of keywords and their values.<br />

HDUs must be constructed by HDUCreator objects which are called by FITS methods.<br />

Each HDU has an embedded pointer to a FITSBase object, which is private to FITS<br />

[FITSBase is a pointer encapsulating the resources of FITS. For details of this coding<br />

idiom see Exceptional C++ by Herb Sutter (2000) and references therein].<br />

24.32.2 Member Function Documentation<br />

24.32.2.1 template Keyword & <strong>CCfits</strong>::HDU::addKey ( const String & name, T<br />

value, const String & comment )<br />

create a new keyword in the HDU with specified value and comment fields<br />

The function returns a reference to keyword object just created. If a keyword with<br />

this name already exists, it will be overwritten. Note that this is mostly intended for<br />

adding user-defined keywords. It should not be used to add keywords for which there<br />

are already specific HDU functions, such as scaling or checksum. Nor should it be used<br />

Generated on Tue Dec 6 2011 16:12:51 for <strong>CCfits</strong> by Doxygen

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!