42 const int& hdunum = 0);
86 const GFitsHDU*
at(
const std::string& extname)
const;
103 void remove(
const std::string& extname);
107 bool contains(
const std::string& extname)
const;
109 int extno(
const std::string& extname)
const;
111 const bool& create =
false);
112 void save(
const bool& clobber =
false);
114 const bool& clobber =
false);
117 const std::string& name =
"")
const;
118 void publish(
const std::string& extname,
119 const std::string& name =
"")
const;
239 return (
int)
m_hdu.size();
253 return (
m_hdu.empty());
300 return (
extno(extname) != -1);
Definition of interface for container classes.
Filename class interface definition.
Abstract FITS extension base class definition.
Abstract FITS image base class definition.
FITS table abstract base class interface definition.
Interface class for container classes.
Abstract FITS extension base class.
Abstract FITS image base class.
Abstract interface for FITS table.
void copy_members(const GFits &fits)
Copy class members.
void * m_fitsfile
FITS file pointer.
int extno(const std::string &extname) const
Return extension number for specified extension name.
GFitsImage * new_image(void)
Allocate new FITS image and return memory pointer.
void init_members(void)
Initialise class members.
void open(const GFilename &filename, const bool &create=false)
Open or (optionally) create FITS file.
std::string classname(void) const
Return class name.
GFitsHDU * operator[](const int &extno)
Get pointer to HDU.
GFits(void)
Void constructor.
void saveto(const GFilename &filename, const bool &clobber=false)
Saves to specified FITS file.
virtual ~GFits(void)
Destructor.
bool m_created
FITS file has been created (true/false)
void extend(const GFits &fits)
Append FITS file.
GFitsHDU * set(const int &extno, const GFitsHDU &hdu)
Set HDU for the specified extension number.
int size(void) const
Return number of HDUs in FITS file.
std::string print(const GChatter &chatter=NORMAL) const
Print FITS information.
GFilename m_filename
FITS file name.
bool contains(const int &extno) const
Check if HDU exists in FITS file.
GFitsHDU * append(const GFitsHDU &hdu)
Append HDU to FITS file.
GFitsImage * image(const int &extno)
Get pointer to image HDU.
bool m_readwrite
FITS file is readwrite (true/false)
void reserve(const int &num)
Reserves space for HDUs in FITS file.
void close(void)
Close FITS file.
GFits & operator=(const GFits &fits)
Assignment operator.
void remove(const int &extno)
Remove HDU from FITS file.
GFitsHDU * insert(const int &extno, const GFitsHDU &hdu)
Set HDU for the specified extension number.
GFitsHDU * at(const int &extno)
Get pointer to HDU.
void save(const bool &clobber=false)
Saves FITS file.
void publish(const int &extno, const std::string &name="") const
Publish FITS HDU on VO Hub.
void free_members(void)
Delete class members.
void clear(void)
Clear FITS file.
const GFilename & filename(void) const
Return FITS filename.
GFitsImage * new_primary(void)
Return minimal primary HDU.
GFitsTable * table(const int &extno)
Get pointer to table HDU.
GFits * clone(void) const
Clone FITS file.
std::vector< GFitsHDU * > m_hdu
Pointers to HDUs.
bool is_empty(void) const
Signals if there are no HDUs in FITS file.
int fits_move_to_hdu(const std::string &caller, void *vptr, const int &hdunum=0)
Move to FITS extension.