EleFits  5.0.0
A modern C++ API on top of CFITSIO
Public Types | Related Functions | List of all members
ContiguousContainerMixin< T, TDerived > Struct Template Reference

#include <ContiguousContainer.h>

Detailed Description

template<typename T, typename TDerived>
struct Euclid::Fits::ContiguousContainerMixin< T, TDerived >

Base class for a FITS data container.

Template Parameters
TThe value type
TDerivedThe child class which implements required methods

This class provides the necessary types and methods to meet the standard ContiguousContainer requirements. This is a CRTP implementation, which means it takes as template parameter the derived class to be empowered.

The derived class must satisfy the SizedData requirements.

Satisfies ContiguousContainer requirements
A contiguous container is a standard container whose elements are stored contiguously in memory.

Public Types

using value_type = T
 The value type.
 
using reference = T &
 The value reference.
 
using const_reference = const T &
 The constant value reference.
 
using iterator = T *
 The value iterator.
 
using const_iterator = const T *
 The constant value iterator.
 
using difference_type = std::ptrdiff_t
 The iterator difference type.
 
using size_type = std::size_t
 The underlying container size type.
 

Public Member Functions

Properties
bool emtpy () const
 Check whether the container is empty. More...
 
Element access
const T & operator[] (size_type index) const
 Access the element with given index.
 
T & operator[] (size_type index)
 Access the element with given index.
 
Iterators
const_iterator begin () const
 Iterator to the first element.
 
iterator begin ()
 Iterator to the first element.
 
const_iterator cbegin ()
 Iterator to the first element.
 
const_iterator end () const
 Iterator to one past the last element.
 
iterator end ()
 Iterator to one past the last element.
 
const_iterator cend ()
 Iterator to one past the last element.
 
Operations
virtual bool operator== (const TDerived &rhs) const
 Check equality.
 
bool operator!= (const TDerived &rhs) const
 Check inequality.
 

Related Functions

(Note that these are not member functions.)

template<typename T , typename TDerived >
std::ostreamoperator<< (std::ostream &os, const ContiguousContainerMixin< T, TDerived > &container)
 Insert a ContiguousContainerMixin into an output stream.
 

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