Refureku v2.2.0
C++17 runtime reflection library.
Config.h
1
8#pragma once
9
10//Version
11#define REFUREKU_VERSION_MAJOR 2
12#define REFUREKU_VERSION_MINOR 2
13#define REFUREKU_VERSION_PATCH 0
14#define REFUREKU_VERSION (REFUREKU_VERSION_MAJOR * 10000 + REFUREKU_VERSION_MINOR * 100 + REFUREKU_VERSION_PATCH)
15
16//Features
22#if !defined(_MSC_VER) || defined(__clang__)
23 #define RFK_TEMPLATE_TEMPLATE_SUPPORT 1
24 #define RFK_NON_PUBLIC_NESTED_CLASS_TEMPLATE_SUPPORT 1
25#else
26 #define RFK_TEMPLATE_TEMPLATE_SUPPORT 0
27 #define RFK_NON_PUBLIC_NESTED_CLASS_TEMPLATE_SUPPORT 0
28#endif
29
30//Debug / Release flags
31#ifndef NDEBUG
32
33 #define RFK_DEBUG 1
34 #define RFK_RELEASE 0
35
36#else //RELEASE
37
38 #define RFK_DEBUG 0
39 #define RFK_RELEASE 1
40
41#endif
42
43//Attributes
44#define RFK_NODISCARD [[nodiscard]]
45#define RFK_NORETURN [[noreturn]]
46
47//Dynamic library import/export
48#if defined(KODGEN_PARSING)
49
50 #define REFUREKU_API __attribute__((dllexport))
51 #define REFUREKU_INTERNAL
52 #define REFUREKU_TEMPLATE_API(...)
53
54#elif defined(_WIN32) || defined(__CYGWIN__)
55
56 #if defined(REFUREKU_EXPORT)
57
58 #if defined(__GNUC__)
59 #define REFUREKU_API __attribute__((dllexport))
60 #else
61 #define REFUREKU_API __declspec(dllexport)
62 #endif
63
64 #define REFUREKU_TEMPLATE_API_DEF REFUREKU_API
65 #define REFUREKU_TEMPLATE_API(...) extern template class __VA_ARGS__
66
67 #else
68
69 #if defined(__GNUC__)
70 #define REFUREKU_API __attribute__((dllimport))
71 #else
72 #define REFUREKU_API __declspec(dllimport)
73 #endif
74
75 #define REFUREKU_TEMPLATE_API(...) template class REFUREKU_API __VA_ARGS__
76
77 #endif
78
79 #define REFUREKU_INTERNAL
80
81#else
82
83 #if __GNUC__ >= 4
84
85 #if defined(REFUREKU_EXPORT)
86
87 #define REFUREKU_API __attribute__((visibility("default")))
88 #define REFUREKU_INTERNAL __attribute__((visibility("hidden")))
89 #define REFUREKU_TEMPLATE_API_DEF
90 #define REFUREKU_TEMPLATE_API(...) extern template class REFUREKU_API __VA_ARGS__
91
92 #else
93
94 #define REFUREKU_API
95 #define REFUREKU_INTERNAL
96 #define REFUREKU_TEMPLATE_API(...)
97
98 #endif
99
100 #else
101
102 #define REFUREKU_API
103 #define REFUREKU_INTERNAL
104 #define REFUREKU_TEMPLATE_API(...)
105
106 #endif
107
108#endif