27#ifndef GFITSTABLECOL_HPP
28#define GFITSTABLECOL_HPP
66 virtual std::string
string(
const int& row,
const int& inx = 0)
const = 0;
67 virtual double real(
const int& row,
const int& inx = 0)
const = 0;
68 virtual int integer(
const int& row,
const int& inx = 0)
const = 0;
75 const std::string&
name(
void)
const;
77 const std::string&
unit(
void)
const;
78 void dim(
const std::vector<int>&
dim);
79 const std::vector<int>&
dim(
void)
const;
81 const int&
colnum(
void)
const;
83 const int&
type(
void)
const;
85 const int&
repeat(
void)
const;
87 const int&
width(
void)
const;
89 const int&
number(
void)
const;
93 const int&
nrows(
void)
const;
97 const int&
anynul(
void)
const;
99 const double&
tscale(
void)
const;
121 virtual void save(
void);
128 virtual int offset(
const int& row,
const int& inx)
const;
Definition of interface for all GammaLib classes.
Interface class for all GammaLib classes.
Abstract interface for FITS table column.
void connect(void *vptr)
Connect table column to FITS file.
virtual void resize_data(const int &index, const int &number)=0
int m_length
Length of column (number of rows)
double m_tscale
Optional scaling factor (1 = no scaling)
int m_anynul
Number of NULLs encountered.
std::vector< int > m_dim
Column dimension.
virtual int integer(const int &row, const int &inx=0) const =0
void * m_fitsfile
FITS file pointer associated with column.
virtual void remove(const int &row, const int &nrows)=0
const int & nrows(void) const
Returns number of rows in column.
const int & repeat(void) const
Returns column repeat value (only used for binary tables)
const int & anynul(void) const
Return number of NULLs encountered.
std::vector< int > m_rowstart
Start index of each row.
virtual std::string classname(void) const =0
Return class name.
const std::vector< int > & dim(void) const
Returns column dimension.
std::string m_name
Column name.
virtual void clear(void)=0
Clear object.
int m_repeat
Repeat value of column.
std::string print(const GChatter &chatter=NORMAL) const
Print column information.
int m_size
Size of allocated data area (0 if not loaded)
int m_width
Width in Bytes of single column element.
const bool & is_variable(void) const
Signals if column is of variable length.
int m_varlen
Maximum number of elements in variable-length.
void copy_members(const GFitsTableCol &column)
Copy class members.
virtual void save_column_fixed(void)
Save table column into FITS file.
GFitsTableCol & operator=(const GFitsTableCol &column)
Assignment operator.
const int & number(void) const
Returns number of elements in column.
virtual void * ptr_nulval(void)=0
const double & tscale(void) const
Return TSCALE value.
void free_members(void)
Delete class members.
virtual void * ptr_data(const int &index=0)=0
virtual void init_data(void)=0
virtual void save_column(void)
Save table column into FITS file.
virtual void release_data(void)=0
const std::string & name(void) const
Returns column name.
int m_colnum
Column number (starting from 1). This parameter is used to signal if a table column corresponds to a ...
GFitsTableCol(void)
Void constructor.
virtual double real(const int &row, const int &inx=0) const =0
const int & width(void) const
Return width in Bytes of one column element.
virtual void load_column(void)
Load table column from FITS file.
bool m_variable
Signals if column is variable length.
void init_members(void)
Initialise class members.
virtual int offset(const int &row, const int &inx) const
Compute offset of column element in memory.
virtual void insert(const int &row, const int &nrows)=0
const std::string & unit(void) const
Returns column unit.
virtual std::string string(const int &row, const int &inx=0) const =0
const int & colnum(void) const
Returns column number in FITS file (starting from 1)
virtual bool is_loaded(void) const =0
int m_number
Number of elements in column.
virtual void save_column_variable(void)
Save table column into FITS file.
virtual std::string ascii_format(void) const =0
virtual void fetch_data(void) const =0
void elements(const int &row, const int &elements)
Set number of column elements for specific row.
std::string tform_binary(void) const
Returns TFORM code for binary table column.
virtual void alloc_data(void)=0
virtual void save(void)
Save table column into FITS file.
virtual GFitsTableCol * clone(void) const =0
Clones object.
std::string m_unit
Column unit.
virtual void load_column_fixed(void)
Load fixed-length column from FITS file.
const int & type(void) const
Returns CFITSIO column type.
virtual ~GFitsTableCol(void)
Destructor.
virtual void load_column_variable(void)
Load variable-length column from FITS file.
Abstract interface for FITS table.
int colnum(const std::string &colname) const
Returns column number of a given column name.
const int & nrows(void) const
Return number of rows in table.