EleFits  5.3.0
A modern C++ API on top of CFITSIO
Loading...
Searching...
No Matches
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.parse_n(as<int>("A"), as<float>("B"), as<std::string>("C"));

instead of:

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

which would be error-prone when reading many records.

Typedefs

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

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...