38 #define G_INSERT "GFitsTableLongLongCol::insert(int&, int&)"
39 #define G_REMOVE "GFitsTableLongLongCol::remove(int&, int&)"
134 if (
this != &column) {
326 int length = m_length +
nrows;
332 long long* new_data =
new long long[
m_size];
339 int n_after =
m_number * (m_length - row);
343 long long* dst = new_data;
344 for (
int i = 0; i < n_before; ++i) {
347 for (
int i = 0; i < n_insert; ++i) {
350 for (
int i = 0; i < n_after; ++i) {
392 if (nrows < 0 || nrows >
m_length-row) {
414 long long* new_data =
new long long[
m_size];
421 int n_after =
m_number * (length - row);
425 long long* dst = new_data;
426 for (
int i = 0; i < n_before; ++i) {
430 for (
int i = 0; i < n_after; ++i) {
536 for (
int i = 0; i <
m_size; ++i) {
545 #if defined(G_SMALL_MEMORY)
586 format.append(
"I20");
655 long long* dst =
m_data + index;
658 for (
int i = 0; i < num; ++i) {
672 long long* new_data =
new long long[
m_size];
673 long long* dst = new_data;
675 for (
int i = 0; i < index; ++i) {
678 for (
int i = 0; i <
number; ++i) {
681 for (
int i = 0; i <
left; ++i) {
743 for (
int i = 0; i <
m_size; ++i) {
virtual int integer(const int &row, const int &col=0) const
Get integer value.
void copy_members(const GFitsTableLongLongCol &column)
Copy class members.
std::string number(const std::string &noun, const int &number)
Convert singular noun into number noun.
virtual double real(const int &row, const int &col=0) const
Get double precision value.
virtual void insert(const int &row, const int &nrows)
Insert rows in column.
int m_number
Number of elements in column.
void free_members(void)
Delete class members.
GFitsTableCol & operator=(const GFitsTableCol &column)
Assignment operator.
long long * m_data
Data vector.
FITS table long long integer column class interface definition.
int m_varlen
Maximum number of elements in variable-length.
virtual void clear(void)
Clear instance.
virtual std::string ascii_format(void) const
Returns format string of ASCII table.
virtual void fetch_data(void) const
Fetch column data.
virtual void load_column(void)
Load table column from FITS file.
virtual GFitsTableLongLongCol * clone(void) const
Clone column.
const int & number(void) const
Returns number of elements in column.
virtual std::string string(const int &row, const int &col=0) const
Get string value.
virtual void remove(const int &row, const int &nrows)
Remove rows from column.
void free_members(void)
Delete class members.
void init_members(void)
Initialise class members.
virtual bool is_loaded(void) const
Checks if column has been loaded.
CFITSIO interface header.
Abstract interface for FITS table column.
long long & operator()(const int &row, const int &inx=0)
Column data access operator.
std::vector< int > m_rowstart
Start index of each row.
std::string left(const std::string &s, const int &n, const char &c= ' ')
Left justify string to achieve a length of n characters.
long long * nulval(void)
Returns pointer to nul value.
virtual void init_data(void)
Initialise column data.
FITS table long long integer column.
int m_length
Length of column (number of rows)
virtual ~GFitsTableLongLongCol(void)
Destructor.
void init_members(void)
Initialise class members.
int m_size
Size of allocated data area (0 if not loaded)
virtual void release_data(void)
Release column data.
virtual int offset(const int &row, const int &inx) const
Compute offset of column element in memory.
Exception handler interface definition.
GFitsTableLongLongCol & operator=(const GFitsTableLongLongCol &column)
Assignment operator.
virtual void alloc_data(void)
Allocates column data.
GFitsTableLongLongCol(void)
Constructor.
const int & nrows(void) const
Returns number of rows in column.
void alloc_nulval(const long long *value)
Allocates null value.
long long * m_nulval
NULL value.
virtual void resize_data(const int &index, const int &number)
Resize column data.
std::string str(const unsigned short int &value)
Convert unsigned short integer value into string.