EleFits  4.0.1
A modern C++ API on top of CFitsIO
Public Types | Public Member Functions | List of all members
Euclid::Fits::Column< T > Class Template Referenceabstract

#include <Column.h>

Class Description

template<typename T>
class Euclid::Fits::Column< T >

Binary table column data and metadata.

This is an interface to be implemented with a concrete data container (e.g. std::vector). Some implementations are provided with the library, but others could be useful to interface with client code (e.g. with other external libraries with custom containers).

See also
Data classes
Inheritance diagram for Euclid::Fits::Column< T >:
[legend]

Public Types

using Value = T
 The element value type.
 

Public Member Functions

 Column (ColumnInfo< std::decay_t< T >> info)
 Create a column with given metadata.
 
virtual ~Column ()=default
 Destructor.
 
Get/set properties.
const ColumnInfo< std::decay_t< T > > & info () const
 Get the column metadata.
 
void rename (const std::string &name)
 Change the column name.
 
void reshape (long repeatCount=1)
 Change the column repeat count (fold/unfold). More...
 
long elementCount () const
 Number of elements in the column, i.e. repeat count * number of rows. More...
 
long rowCount () const
 Number of rows in the column.
 
Access elements
const T * data () const
 Const pointer to the first data element. More...
 
T * data ()
 Pointer to the first data element.
 
const T & operator() (long row, long repeat=0) const
 Access the value at given row and repeat indices.
 
T & operator() (long row, long repeat=0)
 Access the value at given row and repeat indices. More...
 
const T & at (long row, long repeat=0) const
 Access the value at given row and repeat indices. More...
 
T & at (long row, long repeat=0)
 Access the value at given row and repeat indices. More...
 
Slicing
const PtrColumn< const T > slice (const Segment &rows) const
 Get a view on contiguous rows.
 
PtrColumn< T > slice (const Segment &rows)
 Get a view on contiguous rows. More...
 

The documentation for this class was generated from the following file: