38 #define G_INSERT "GFitsTableBoolCol::insert(int&, int&)"
39 #define G_REMOVE "GFitsTableBoolCol::remove(int&, int&)"
134 if (
this != &column) {
240 std::string result = (
m_data[
offset(row,inx)]) ?
"T" :
"F";
329 int length = m_length +
nrows;
335 bool* new_data =
new bool[
m_size];
342 int n_after =
m_number * (m_length - row);
346 bool* dst = new_data;
347 for (
int i = 0; i < n_before; ++i) {
350 for (
int i = 0; i < n_insert; ++i) {
353 for (
int i = 0; i < n_after; ++i) {
396 if (nrows < 0 || nrows >
m_length-row) {
418 bool* new_data =
new bool[
m_size];
425 int n_after =
m_number * (length - row);
429 bool* dst = new_data;
430 for (
int i = 0; i < n_before; ++i) {
434 for (
int i = 0; i < n_after; ++i) {
542 for (
int i = 0; i <
m_size; ++i) {
551 #if defined(G_SMALL_MEMORY)
604 for (
int i = 0; i <
m_size; ++i) {
678 for (
int i = 0; i <
m_size; ++i) {
716 bool* dst =
m_data + index;
719 for (
int i = 0; i < num; ++i) {
734 bool* new_data =
new bool[
m_size];
735 bool* dst = new_data;
737 for (
int i = 0; i < index; ++i) {
740 for (
int i = 0; i <
number; ++i) {
743 for (
int i = 0; i <
left; ++i) {
803 for (
int i = 0; i <
m_size; ++i) {
824 for (
int i = 0; i <
m_size; ++i) {
FITS table Boolean column class interface definition.
virtual GFitsTableBoolCol * clone(void) const
Clone column.
std::string number(const std::string &noun, const int &number)
Convert singular noun into number noun.
void free_buffer(void) const
Free CFITSIO transfer buffer.
int m_number
Number of elements in column.
void free_members(void)
Delete class members.
GFitsTableCol & operator=(const GFitsTableCol &column)
Assignment operator.
virtual bool is_loaded(void) const
Checks if column has been loaded.
bool * nulval(void)
Returns pointer to nul value.
int m_varlen
Maximum number of elements in variable-length.
GFitsTableBoolCol(void)
Constructor.
void alloc_buffer(void) const
Allocate CFITSIO transfer buffer.
virtual double real(const int &row, const int &col=0) const
Get double precision value.
virtual void load_column(void)
Load table column from FITS file.
GFitsTableBoolCol & operator=(const GFitsTableBoolCol &column)
Assignment operator.
virtual void insert(const int &row, const int &nrows)
Insert rows in column.
virtual std::string ascii_format(void) const
Returns format string of ASCII table.
const int & number(void) const
Returns number of elements in column.
void init_members(void)
Initialise class members.
CFITSIO interface header.
Abstract interface for FITS table column.
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.
FITS table Boolean column.
virtual void remove(const int &row, const int &nrows)
Remove rows from column.
bool * m_nulval
NULL value.
bool & operator()(const int &row, const int &inx=0)
Column data access operator.
virtual ~GFitsTableBoolCol(void)
Destructor.
void init_members(void)
Initialise class members.
virtual void release_data(void)
Release column data.
void alloc_nulval(const bool *value)
Allocate null value.
virtual void resize_data(const int &index, const int &number)
Resize column data.
char * m_buffer
Data area for CFITSIO transfer.
int m_length
Length of column (number of rows)
int m_size
Size of allocated data area (0 if not loaded)
virtual int offset(const int &row, const int &inx) const
Compute offset of column element in memory.
virtual void alloc_data(void)
Allocates column data.
Exception handler interface definition.
void copy_members(const GFitsTableBoolCol &column)
Copy class members.
virtual void save_column(void)
Save table column into FITS file.
const int & nrows(void) const
Returns number of rows in column.
virtual int integer(const int &row, const int &col=0) const
Get integer value.
virtual void fetch_data(void) const
Fetch column data.
virtual void save(void)
Save table column into FITS file.
virtual std::string string(const int &row, const int &col=0) const
Get string value.
virtual void init_data(void)
Initialise column data.
void free_members(void)
Delete class members.
virtual void clear(void)
Clear instance.
int m_width
Width in Bytes of single column element.
std::string str(const unsigned short int &value)
Convert unsigned short integer value into string.