-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtostring.hpp
36 lines (31 loc) · 2.05 KB
/
tostring.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#pragma once
extern "C" {
#include "nexoid-ed/include/types.h"
}
#include <sys/types.h> // Fixes missing include in the library header
#include "asn_codecs.h"
#include <iostream>
#include <type_traits>
const char* tostring(enum ProcedureResult);
const char* tostring(enum CardholderMessage);
const char* tostring(enum NokReason);
const char* tostring(enum TerminalErrorReason);
const char* tostring(enum LanguageAlpha2);
const char* tostring(enum ServiceId);
const char* tostring(enum CvdPresence);
const char* tostring(enum TransactionResult);
const char* tostring(enum asn_dec_rval_code_e);
const char* tostring(enum IdleEvent);
const char* tostring(enum Technology);
// TODO: Check if there is a way to avoid repetitios 'operator <<' overloading
static inline ::std::ostream& operator << (::std::ostream& os, const enum ProcedureResult& x) { return os << tostring(x); }
static inline ::std::ostream& operator << (::std::ostream& os, const enum CardholderMessage& x) { return os << tostring(x); }
static inline ::std::ostream& operator << (::std::ostream& os, const enum NokReason& x) { return os << tostring(x); }
static inline ::std::ostream& operator << (::std::ostream& os, const enum TerminalErrorReason& x) { return os << tostring(x); }
static inline ::std::ostream& operator << (::std::ostream& os, const enum LanguageAlpha2& x) { return os << tostring(x); }
static inline ::std::ostream& operator << (::std::ostream& os, const enum ServiceId& x) { return os << tostring(x); }
static inline ::std::ostream& operator << (::std::ostream& os, const enum CvdPresence& x) { return os << tostring(x); }
static inline ::std::ostream& operator << (::std::ostream& os, const enum TransactionResult& x) { return os << tostring(x); }
static inline ::std::ostream& operator << (::std::ostream& os, const enum asn_dec_rval_code_e x) { return os << tostring(x); }
static inline ::std::ostream& operator << (::std::ostream& os, const enum IdleEvent x) { return os << tostring(x); }
static inline ::std::ostream& operator << (::std::ostream& os, const enum Technology x) { return os << tostring(x); }