EleFits  5.0.0
A modern C++ API on top of CFITSIO
Typedefs | Classes | Macros
Header data classes

Detailed Description

Classes to store header unit data.

Record

A header is made of records, represented in memory by objects of type... Record! A Record is a simple structure which stores the keyword, value, unit and comment, and is templated by the value type.

RecordVec, RecordSeq

Passing a large number of records around can be complex, all the more if the value types are different given how cumbersome it would be to use a std::tuple of various Records.

Two record containers are provided to ease this:

Records in those containers are convertible thanks to an internal casting system.

TypedKey

TypedKey is a tool used to robustify the API, for more safety when reading a record (or a column). It conveys alone both the name and type of the record. TypedKeys are preferrably created with function as().

TypedKeys are used to write the type close to the name of the records in function calls, that is, writing:

header.parseSeq(as<int>("A"), as<float>("B"), as<std::string>("C"));

instead of:

header.parseSeq<int, float, std::string>({ "A", "B", "C" });

which would be error-prone when reading many records.

Typedefs

using VariantValue = boost::any
 The variant value type for records. More...
 
using RecordSeq = RecordVec< VariantValue >
 A sequence of records of any type.
 

Classes

struct  Record< T >
 Keyword-value pair with optional unit and comment. More...
 
class  RecordVec< T >
 A vector of records with find and conversion services. More...
 

Macros

#define ELEFITS_FOREACH_RECORD_TYPE(MACRO)
 Loop over supported record types. More...