EleFits  5.0.0
A modern C++ API on top of CFITSIO
Public Types | Public Member Functions | Public Attributes | Related Functions | List of all members
TypedKey< TReturn, TKey > Struct Template Reference

#include <DataUtils.h>

Detailed Description

template<typename TReturn, typename TKey>
struct Euclid::Fits::TypedKey< TReturn, TKey >

A light structure to bind a return type and a key, e.g. for reading records and columns.

Template Parameters
TReturnThe desired return type
TKeyThe key type, typically std::string or long

TypedKeys should not be instantiated directly. Instead maker as() should be used for clarity, e.g.:

// Ugly
header.parseSeq(TypedKey<float, std::string>("A"), TypedKey<int, std::string>("B"));
// Clean
header.parseSeq(as<float>("A"), as<int>("B"));

Public Types

using Return = TReturn
 The return type.
 
using Key = TKey
 The key type.
 

Public Member Functions

 TypedKey (TKey k)
 Constructor. More...
 

Public Attributes

TKey key
 The key.
 

Related Functions

(Note that these are not member functions.)

template<typename TReturn >
TypedKey< TReturn, long > as (long key)
 Create a TypedKey where the key type is deduced from the parameter. More...
 
template<typename TReturn >
TypedKey< TReturn, long > as (int key)
 Create a TypedKey where the key type is deduced from the parameter. More...
 
template<typename TReturn >
TypedKey< TReturn, std::stringas (const std::string &key)
 Create a TypedKey where the key type is deduced from the parameter. More...
 
template<typename TReturn >
TypedKey< TReturn, std::stringas (const char *key)
 Create a TypedKey where the key type is deduced from the parameter. More...
 

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