GFitsTableDblCol.hpp
2.91 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
/***************************************************************************
* GFitsTableDblCol.hpp - FITS table double column class *
* ----------------------------------------------------------------------- *
* copyright : (C) 2008 by Jurgen Knodlseder *
* ----------------------------------------------------------------------- *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
/**
* @file GFitsTableDblCol.hpp
* @brief GFitsTableDblCol class definition.
* @author J. Knodlseder
*/
#ifndef GFITSTABLEDBLCOL_HPP
#define GFITSTABLEDBLCOL_HPP
/* __ Includes ___________________________________________________________ */
#include "GFitsCfitsio.hpp"
#include "GFitsTableCol.hpp"
/* __ Namespaces _________________________________________________________ */
/* __ Structures _________________________________________________________ */
/***********************************************************************//**
* @class GFitsTableDblCol
*
* @brief Interface for FITS table double precision column
*
* This class implements a FITS table double precision column.
***************************************************************************/
class GFitsTableDblCol : public GFitsTableCol {
public:
// Constructors and destructors
GFitsTableDblCol();
GFitsTableDblCol(const int& length, const int& size = 1);
GFitsTableDblCol(const GFitsTableDblCol& column);
virtual ~GFitsTableDblCol();
// Operators
GFitsTableDblCol& operator= (const GFitsTableDblCol& column);
double& operator() (const int& row, const int& inx = 0);
const double& operator() (const int& row, const int& inx = 0) const;
// Methods
std::string string(const int& row, const int& inx = 0);
double real(const int& row, const int& inx = 0);
int integer(const int& row, const int& inx = 0);
GFitsTableDblCol* clone(void) const;
double* data(void);
void set_nullval(const double* value);
private:
// Private methods
void init_members(void);
void copy_members(const GFitsTableDblCol& column);
void free_members(void);
void fetch_data(void);
// Private data area
int m_size; //!< Size of data area
double* m_data; //!< Data area
double* m_nulval; //!< NULL value
int m_anynul; //!< Number of NULLs encountered
};
#endif /* GFITSTABLEDBLCOL_HPP */