GammaLib  2.1.0.dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
GFitsBinTable.hpp
Go to the documentation of this file.
1 /***************************************************************************
2  * GFitsBinTable.hpp - FITS binary table class *
3  * ----------------------------------------------------------------------- *
4  * copyright (C) 2008-2018 by Juergen Knoedlseder *
5  * ----------------------------------------------------------------------- *
6  * *
7  * This program is free software: you can redistribute it and/or modify *
8  * it under the terms of the GNU General Public License as published by *
9  * the Free Software Foundation, either version 3 of the License, or *
10  * (at your option) any later version. *
11  * *
12  * This program is distributed in the hope that it will be useful, *
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
15  * GNU General Public License for more details. *
16  * *
17  * You should have received a copy of the GNU General Public License *
18  * along with this program. If not, see <http://www.gnu.org/licenses/>. *
19  * *
20  ***************************************************************************/
21 /**
22  * @file GFitsBinTable.hpp
23  * @brief FITS binary table class definition
24  * @author Juergen Knoedlseder
25  */
26 
27 #ifndef GFITSBINTABLE_HPP
28 #define GFITSBINTABLE_HPP
29 
30 /* __ Includes ___________________________________________________________ */
31 #include "GFitsTable.hpp"
32 
33 
34 /***********************************************************************//**
35  * @class GFitsBinTable
36  *
37  * @brief FITS binary table class
38  ***************************************************************************/
39 class GFitsBinTable : public GFitsTable {
40 
41 public:
42  // Constructors and destructors
43  GFitsBinTable(void);
44  explicit GFitsBinTable(const int& nrows);
45  GFitsBinTable(const GFitsBinTable& table);
46  virtual ~GFitsBinTable(void);
47 
48  // Operators
49  GFitsBinTable& operator=(const GFitsBinTable& table);
50 
51  // Implemented pure virtual methods
52  virtual void clear(void);
53  virtual GFitsBinTable* clone(void) const;
54  virtual std::string classname(void) const;
55  HDUType exttype(void) const;
56 
57 private:
58  // Private methods
59  void init_members(void);
60  void copy_members(const GFitsBinTable& table);
61  void free_members(void);
62  void init_table_header(void);
63 };
64 
65 
66 /***********************************************************************//**
67  * @brief Return class name
68  *
69  * @return String containing the class name ("GFitsBinTable").
70  ***************************************************************************/
71 inline
72 std::string GFitsBinTable::classname(void) const
73 {
74  return ("GFitsBinTable");
75 }
76 
77 
78 /***********************************************************************//**
79  * @brief Return extension type
80  *
81  * @return Extension type (HT_BIN_TABLE).
82  ***************************************************************************/
83 inline
85 {
86  return (HT_BIN_TABLE);
87 }
88 
89 #endif /* GFITSBINTABLE_HPP */
virtual std::string classname(void) const
Return class name.
HDUType exttype(void) const
Return extension type.
GFitsBinTable(void)
Void constructor.
void copy_members(const GFitsBinTable &table)
Copy class members.
void init_members(void)
Initialise class members.
virtual void clear(void)
Clear binary table.
virtual ~GFitsBinTable(void)
Destructor.
Abstract interface for FITS table.
Definition: GFitsTable.hpp:44
const int & nrows(void) const
Return number of rows in table.
Definition: GFitsTable.hpp:119
void init_table_header(void)
Initialise binary table header.
FITS binary table class.
virtual GFitsBinTable * clone(void) const
Clone binary table.
GFitsBinTable & operator=(const GFitsBinTable &table)
Assignment operator.
void free_members(void)
Delete class members.
FITS table abstract base class interface definition.