Instrument Neutral Distributed Interface INDI 2.2.5
fitskeyword.h
Go to the documentation of this file.
1
20#pragma once
21
22#include <string>
23#include <fitsio.h>
24#include <cstdint>
25
26namespace INDI
27{
28
30{
31public:
32 enum Type
33 {
36 STRING = TSTRING,
37 LONGLONG = TLONGLONG,
38 //ULONGLONG = TULONGLONG,
39 DOUBLE = TDOUBLE
40 };
41 FITSRecord();
42 FITSRecord(const char *key, const char *value, const char *comment = nullptr);
43 FITSRecord(const char *key, int64_t value, const char *comment = nullptr);
44 //FITSRecord(const char *key, uint64_t value, const char *comment = nullptr);
45 FITSRecord(const char *key, double value, int decimal = 6, const char *comment = nullptr);
46 explicit FITSRecord(const char *comment);
47 Type type() const;
48 const std::string& key() const;
49 const std::string& valueString() const;
50 int64_t valueInt() const;
51 //uint64_t valueUInt() const;
52 double valueDouble() const;
53 const std::string& comment() const;
54 int decimal() const;
55private:
56 union
57 {
58 int64_t val_int64;
59 uint64_t val_uint64;
60 double val_double;
61 };
62 std::string val_str;
63 std::string m_key;
64 Type m_type = VOID;
65 std::string m_comment;
66 int m_decimal = 6;
67};
68
69}
int decimal() const
const std::string & key() const
double valueDouble() const
const std::string & valueString() const
int64_t valueInt() const
Type type() const
uint64_t val_uint64
Definition fitskeyword.h:59
const std::string & comment() const
Namespace to encapsulate INDI client, drivers, and mediator classes.
Holds the connection type.