EleFits  5.3.0
A modern C++ API on top of CFITSIO
Loading...
Searching...
No Matches
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
// Clean
header.parse_n(as<float>("A"), as<int>("B"));
A light structure to bind a return type and a key, e.g. for reading records and columns.
Definition: DataUtils.h:136

Public Types

using Key = TKey
 The key type.
 
using Return = TReturn
 The return 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, std::stringas (const char *key)
 
template<typename TReturn >
TypedKey< TReturn, std::stringas (const std::string &key)
 
template<typename TReturn >
TypedKey< TReturn, long > as (int key)
 
template<typename TReturn >
TypedKey< TReturn, long > as (long 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: