Realm C++ SDK 버전 v2.2.0

macros.hpp

1
2//
3//저작권 2024 Realm Inc.
4//
5// Apache 라이선스, 버전 2.0("라이선스")에 따라 라이선스가 부여됩니다.
6// 라이선스를 준수하는 경우를 제외하고는 이 파일을 사용할 수 없습니다.
7// 다음에서 라이선스 사본을 얻을 수 있습니다.
8//
9// http://www.apache.org/licences/LICENSE-2.0
10//
11// 관련 법률에서 요구하거나 문서로 동의하지 않는 한, 소프트웨어
12// 라이선스에 따라 배포되는 것은 '있는 그대로' 배포됩니다,
13// Express 묵시적이든 어떤 종류의 보증이나 조건도 제공하지 않습니다.
14// 권한을 관리하는 특정 언어에 대한 내용은 라이선스를 참조하세요.
15// 라이선스에 따른 제한 사항.
16//
18
19#ifndef CPPREALM_MACROS_HPP
20#define CPPREALM_MACROS_HPP
21
22#define FE_0(WHAT, cls)
23#define FE_1(WHAT, cls, X) WHAT(cls, X)
24#define FE_2(WHAT, cls, X, ...) WHAT(cls, X)FE_1(WHAT, cls, __VA_ARGS__)
25#define FE_3(WHAT, cls, X, ...) WHAT(cls, X)FE_2(WHAT, cls, __VA_ARGS__)
26#define FE_4(WHAT, cls, X, ...) WHAT(cls, X)FE_3(WHAT, cls, __VA_ARGS__)
27#define FE_5(WHAT, cls, X, ...) WHAT(cls, X)FE_4(WHAT, cls, __VA_ARGS__)
28#define FE_6(WHAT, cls, X, ...) WHAT(cls, X)FE_5(WHAT, cls, __VA_ARGS__)
29#define FE_7(WHAT, cls, X, ...) WHAT(cls, X)FE_6(WHAT, cls, __VA_ARGS__)
30#define FE_8(WHAT, cls, X, ...) WHAT(cls, X)FE_7(WHAT, cls, __VA_ARGS__)
31#define FE_9(WHAT, cls, X, ...) WHAT(cls, X)FE_8(WHAT, cls, __VA_ARGS__)
32#define FE_10(WHAT, cls, X, ...) WHAT(cls, X)FE_9(WHAT, cls, __VA_ARGS__)
33#define FE_11(WHAT, cls, X, ...) WHAT(cls, X)FE_10(WHAT, cls, __VA_ARGS__)
34#define FE_12(WHAT, cls, X, ...) WHAT(cls, X)FE_11(WHAT, cls, __VA_ARGS__)
35#define FE_13(WHAT, cls, X, ...) WHAT(cls, X)FE_12(WHAT, cls, __VA_ARGS__)
36#define FE_14(WHAT, cls, X, ...) WHAT(cls, X)FE_13(WHAT, cls, __VA_ARGS__)
37#define FE_15(WHAT, cls, X, ...) WHAT(cls, X)FE_14(WHAT, cls, __VA_ARGS__)
38#define FE_16(WHAT, cls, X, ...) WHAT(cls, X)FE_15(WHAT, cls, __VA_ARGS__)
39#define FE_17(WHAT, cls, X, ...) WHAT(cls, X)FE_16(WHAT, cls, __VA_ARGS__)
40#define FE_18(WHAT, cls, X, ...) WHAT(cls, X)FE_17(WHAT, cls, __VA_ARGS__)
41#define FE_19(WHAT, cls, X, ...) WHAT(cls, X)FE_18(WHAT, cls, __VA_ARGS__)
42#define FE_20(WHAT, cls, X, ...) WHAT(cls, X)FE_19(WHAT, cls, __VA_ARGS__)
43#define FE_21(WHAT, cls, X, ...) WHAT(cls, X)FE_20(WHAT, cls, __VA_ARGS__)
44#define FE_22(WHAT, cls, X, ...) WHAT(cls, X)FE_21(WHAT, cls, __VA_ARGS__)
45#define FE_23(WHAT, cls, X, ...) WHAT(cls, X)FE_22(WHAT, cls, __VA_ARGS__)
46#define FE_24(WHAT, cls, X, ...) WHAT(cls, X)FE_23(WHAT, cls, __VA_ARGS__)
47#define FE_25(WHAT, cls, X, ...) WHAT(cls, X)FE_24(WHAT, cls, __VA_ARGS__)
48#define FE_26(WHAT, cls, X, ...) WHAT(cls, X)FE_25(WHAT, cls, __VA_ARGS__)
49#define FE_27(WHAT, cls, X, ...) WHAT(cls, X)FE_26(WHAT, cls, __VA_ARGS__)
50#define FE_28(WHAT, cls, X, ...) WHAT(cls, X)FE_27(WHAT, cls, __VA_ARGS__)
51#define FE_29(WHAT, cls, X, ...) WHAT(cls, X)FE_28(WHAT, cls, __VA_ARGS__)
52#define FE_30(WHAT, cls, X, ...) WHAT(cls, X)FE_29(WHAT, cls, __VA_ARGS__)
53#define FE_31(WHAT, cls, X, ...) WHAT(cls, X)FE_30(WHAT, cls, __VA_ARGS__)
54#define FE_32(WHAT, cls, X, ...) WHAT(cls, X)FE_31(WHAT, cls, __VA_ARGS__)
55#define FE_33(WHAT, cls, X, ...) WHAT(cls, X)FE_32(WHAT, cls, __VA_ARGS__)
56#define FE_34(WHAT, cls, X, ...) WHAT(cls, X)FE_33(WHAT, cls, __VA_ARGS__)
57#define FE_35(WHAT, cls, X, ...) WHAT(cls, X)FE_34(WHAT, cls, __VA_ARGS__)
58#define FE_36(WHAT, cls, X, ...) WHAT(cls, X)FE_35(WHAT, cls, __VA_ARGS__)
59#define FE_37(WHAT, cls, X, ...) WHAT(cls, X)FE_36(WHAT, cls, __VA_ARGS__)
60#define FE_38(WHAT, cls, X, ...) WHAT(cls, X)FE_37(WHAT, cls, __VA_ARGS__)
61#define FE_39(WHAT, cls, X, ...) WHAT(cls, X)FE_38(WHAT, cls, __VA_ARGS__)
62#define FE_40(WHAT, cls, X, ...) WHAT(cls, X)FE_39(WHAT, cls, __VA_ARGS__)
63#define FE_41(WHAT, cls, X, ...) WHAT(cls, X)FE_40(WHAT, cls, __VA_ARGS__)
64#define FE_42(WHAT, cls, X, ...) WHAT(cls, X)FE_41(WHAT, cls, __VA_ARGS__)
65#define FE_43(WHAT, cls, X, ...) WHAT(cls, X)FE_42(WHAT, cls, __VA_ARGS__)
66#define FE_44(WHAT, cls, X, ...) WHAT(cls, X)FE_43(WHAT, cls, __VA_ARGS__)
67#define FE_45(WHAT, cls, X, ...) WHAT(cls, X)FE_44(WHAT, cls, __VA_ARGS__)
68#define FE_46(WHAT, cls, X, ...) WHAT(cls, X)FE_45(WHAT, cls, __VA_ARGS__)
69#define FE_47(WHAT, cls, X, ...) WHAT(cls, X)FE_46(WHAT, cls, __VA_ARGS__)
70#define FE_48(WHAT, cls, X, ...) WHAT(cls, X)FE_47(WHAT, cls, __VA_ARGS__)
71#define FE_49(WHAT, cls, X, ...) WHAT(cls, X)FE_48(WHAT, cls, __VA_ARGS__)
72#define FE_50(WHAT, cls, X, ...) WHAT(cls, X)FE_49(WHAT, cls, __VA_ARGS__)
73#define FE_51(WHAT, cls, X, ...) WHAT(cls, X)FE_50(WHAT, cls, __VA_ARGS__)
74#define FE_52(WHAT, cls, X, ...) WHAT(cls, X)FE_51(WHAT, cls, __VA_ARGS__)
75#define FE_53(WHAT, cls, X, ...) WHAT(cls, X)FE_52(WHAT, cls, __VA_ARGS__)
76#define FE_54(WHAT, cls, X, ...) WHAT(cls, X)FE_53(WHAT, cls, __VA_ARGS__)
77#define FE_55(WHAT, cls, X, ...) WHAT(cls, X)FE_54(WHAT, cls, __VA_ARGS__)
78#define FE_56(WHAT, cls, X, ...) WHAT(cls, X)FE_55(WHAT, cls, __VA_ARGS__)
79#define FE_57(WHAT, cls, X, ...) WHAT(cls, X)FE_56(WHAT, cls, __VA_ARGS__)
80#define FE_58(WHAT, cls, X, ...) WHAT(cls, X)FE_57(WHAT, cls, __VA_ARGS__)
81#define FE_59(WHAT, cls, X, ...) WHAT(cls, X)FE_58(WHAT, cls, __VA_ARGS__)
82#define FE_60(WHAT, cls, X, ...) WHAT(cls, X)FE_59(WHAT, cls, __VA_ARGS__)
83#define FE_61(WHAT, cls, X, ...) WHAT(cls, X)FE_60(WHAT, cls, __VA_ARGS__)
84#define FE_62(WHAT, cls, X, ...) WHAT(cls, X)FE_61(WHAT, cls, __VA_ARGS__)
85#define FE_63(WHAT, cls, X, ...) WHAT(cls, X)FE_62(WHAT, cls, __VA_ARGS__)
86#define FE_64(WHAT, cls, X, ...) WHAT(cls, X)FE_63(WHAT, cls, __VA_ARGS__)
87#define FE_65(WHAT, cls, X, ...) WHAT(cls, X)FE_64(WHAT, cls, __VA_ARGS__)
88#define FE_66(WHAT, cls, X, ...) WHAT(cls, X)FE_65(WHAT, cls, __VA_ARGS__)
89#define FE_67(WHAT, cls, X, ...) WHAT(cls, X)FE_66(WHAT, cls, __VA_ARGS__)
90#define FE_68(WHAT, cls, X, ...) WHAT(cls, X)FE_67(WHAT, cls, __VA_ARGS__)
91#define FE_69(WHAT, cls, X, ...) WHAT(cls, X)FE_68(WHAT, cls, __VA_ARGS__)
92#define FE_70(WHAT, cls, X, ...) WHAT(cls, X)FE_69(WHAT, cls, __VA_ARGS__)
93#define FE_71(WHAT, cls, X, ...) WHAT(cls, X)FE_70(WHAT, cls, __VA_ARGS__)
94#define FE_72(WHAT, cls, X, ...) WHAT(cls, X)FE_71(WHAT, cls, __VA_ARGS__)
95#define FE_73(WHAT, cls, X, ...) WHAT(cls, X)FE_72(WHAT, cls, __VA_ARGS__)
96#define FE_74(WHAT, cls, X, ...) WHAT(cls, X)FE_73(WHAT, cls, __VA_ARGS__)
97#define FE_75(WHAT, cls, X, ...) WHAT(cls, X)FE_74(WHAT, cls, __VA_ARGS__)
98#define FE_76(WHAT, cls, X, ...) WHAT(cls, X)FE_75(WHAT, cls, __VA_ARGS__)
99#define FE_77(WHAT, cls, X, ...) WHAT(cls, X)FE_76(WHAT, cls, __VA_ARGS__)
100#define FE_78(WHAT, cls, X, ...) WHAT(cls, X)FE_77(WHAT, cls, __VA_ARGS__)
101#define FE_79(WHAT, cls, X, ...) WHAT(cls, X)FE_78(WHAT, cls, __VA_ARGS__)
102#define FE_80(WHAT, cls, X, ...) WHAT(cls, X)FE_79(WHAT, cls, __VA_ARGS__)
103#define FE_81(WHAT, cls, X, ...) WHAT(cls, X)FE_80(WHAT, cls, __VA_ARGS__)
104#define FE_82(WHAT, cls, X, ...) WHAT(cls, X)FE_81(WHAT, cls, __VA_ARGS__)
105#define FE_83(WHAT, cls, X, ...) WHAT(cls, X)FE_82(WHAT, cls, __VA_ARGS__)
106#define FE_84(WHAT, cls, X, ...) WHAT(cls, X)FE_83(WHAT, cls, __VA_ARGS__)
107#define FE_85(WHAT, cls, X, ...) WHAT(cls, X)FE_84(WHAT, cls, __VA_ARGS__)
108#define FE_86(WHAT, cls, X, ...) WHAT(cls, X)FE_85(WHAT, cls, __VA_ARGS__)
109#define FE_87(WHAT, cls, X, ...) WHAT(cls, X)FE_86(WHAT, cls, __VA_ARGS__)
110#define FE_88(WHAT, cls, X, ...) WHAT(cls, X)FE_87(WHAT, cls, __VA_ARGS__)
111#define FE_89(WHAT, cls, X, ...) WHAT(cls, X)FE_88(WHAT, cls, __VA_ARGS__)
112#define FE_90(WHAT, cls, X, ...) WHAT(cls, X)FE_89(WHAT, cls, __VA_ARGS__)
113#define FE_91(WHAT, cls, X, ...) WHAT(cls, X)FE_90(WHAT, cls, __VA_ARGS__)
114#define FE_92(WHAT, cls, X, ...) WHAT(cls, X)FE_91(WHAT, cls, __VA_ARGS__)
115#define FE_93(WHAT, cls, X, ...) WHAT(cls, X)FE_92(WHAT, cls, __VA_ARGS__)
116#define FE_94(WHAT, cls, X, ...) WHAT(cls, X)FE_93(WHAT, cls, __VA_ARGS__)
117#define FE_95(WHAT, cls, X, ...) WHAT(cls, X)FE_94(WHAT, cls, __VA_ARGS__)
118#define FE_96(WHAT, cls, X, ...) WHAT(cls, X)FE_95(WHAT, cls, __VA_ARGS__)
119#define FE_97(WHAT, cls, X, ...) WHAT(cls, X)FE_96(WHAT, cls, __VA_ARGS__)
120#define FE_98(WHAT, cls, X, ...) WHAT(cls, X)FE_97(WHAT, cls, __VA_ARGS__)
121#define FE_99(WHAT, cls, X, ...) WHAT(cls, X)FE_98(WHAT, cls, __VA_ARGS__)
122#define FE_100(WHAT, cls, X, ...) WHAT(cls, X) FE_99(WHAT, cls, __VA_ARGS__)
123#define FE_101(WHAT, cls, X, ...) WHAT(cls, X) FE_100(WHAT, cls, __VA_ARGS__)
124#define FE_102(WHAT, cls, X, ...) WHAT(cls, X) FE_101(WHAT, cls, __VA_ARGS__)
125#define FE_103(WHAT, cls, X, ...) WHAT(cls, X) FE_102(WHAT, cls, __VA_ARGS__)
126#define FE_104(WHAT, cls, X, ...) WHAT(cls, X) FE_103(WHAT, cls, __VA_ARGS__)
127#define FE_105(WHAT, cls, X, ...) WHAT(cls, X) FE_104(WHAT, cls, __VA_ARGS__)
128#define FE_106(WHAT, cls, X, ...) WHAT(cls, X) FE_105(WHAT, cls, __VA_ARGS__)
129#define FE_107(WHAT, cls, X, ...) WHAT(cls, X) FE_106(WHAT, cls, __VA_ARGS__)
130#define FE_108(WHAT, cls, X, ...) WHAT(cls, X) FE_107(WHAT, cls, __VA_ARGS__)
131#define FE_109(WHAT, cls, X, ...) WHAT(cls, X) FE_108(WHAT, cls, __VA_ARGS__)
132#define FE_110(WHAT, cls, X, ...) WHAT(cls, X) FE_109(WHAT, cls, __VA_ARGS__)
133#define FE_111(WHAT, cls, X, ...) WHAT(cls, X) FE_110(WHAT, cls, __VA_ARGS__)
134#define FE_112(WHAT, cls, X, ...) WHAT(cls, X) FE_111(WHAT, cls, __VA_ARGS__)
135#define FE_113(WHAT, cls, X, ...) WHAT(cls, X) FE_112(WHAT, cls, __VA_ARGS__)
136#define FE_114(WHAT, cls, X, ...) WHAT(cls, X) FE_113(WHAT, cls, __VA_ARGS__)
137#define FE_115(WHAT, cls, X, ...) WHAT(cls, X) FE_114(WHAT, cls, __VA_ARGS__)
138#define FE_116(WHAT, cls, X, ...) WHAT(cls, X) FE_115(WHAT, cls, __VA_ARGS__)
139#define FE_117(WHAT, cls, X, ...) WHAT(cls, X) FE_116(WHAT, cls, __VA_ARGS__)
140#define FE_118(WHAT, cls, X, ...) WHAT(cls, X) FE_117(WHAT, cls, __VA_ARGS__)
141#define FE_119(WHAT, cls, X, ...) WHAT(cls, X) FE_118(WHAT, cls, __VA_ARGS__)
142#define FE_120(WHAT, cls, X, ...) WHAT(cls, X) FE_119(WHAT, cls, __VA_ARGS__)
143#define FE_121(WHAT, cls, X, ...) WHAT(cls, X) FE_120(WHAT, cls, __VA_ARGS__)
144#define FE_122(WHAT, cls, X, ...) WHAT(cls, X) FE_121(WHAT, cls, __VA_ARGS__)
145#define FE_123(WHAT, cls, X, ...) WHAT(cls, X) FE_122(WHAT, cls, __VA_ARGS__)
146#define FE_124(WHAT, cls, X, ...) WHAT(cls, X) FE_123(WHAT, cls, __VA_ARGS__)
147#define FE_125(WHAT, cls, X, ...) WHAT(cls, X) FE_124(WHAT, cls, __VA_ARGS__)
148#define FE_126(WHAT, cls, X, ...) WHAT(cls, X) FE_125(WHAT, cls, __VA_ARGS__)
149#define FE_127(WHAT, cls, X, ...) WHAT(cls, X) FE_126(WHAT, cls, __VA_ARGS__)
150#define FE_128(WHAT, cls, X, ...) WHAT(cls, X) FE_127(WHAT, cls, __VA_ARGS__)
151#define FE_129(WHAT, cls, X, ...) WHAT(cls, X) FE_128(WHAT, cls, __VA_ARGS__)
152#define FE_130(WHAT, cls, X, ...) WHAT(cls, X) FE_129(WHAT, cls, __VA_ARGS__)
153#define FE_131(WHAT, cls, X, ...) WHAT(cls, X) FE_130(WHAT, cls, __VA_ARGS__)
154#define FE_132(WHAT, cls, X, ...) WHAT(cls, X) FE_131(WHAT, cls, __VA_ARGS__)
155#define FE_133(WHAT, cls, X, ...) WHAT(cls, X) FE_132(WHAT, cls, __VA_ARGS__)
156#define FE_134(WHAT, cls, X, ...) WHAT(cls, X) FE_133(WHAT, cls, __VA_ARGS__)
157#define FE_135(WHAT, cls, X, ...) WHAT(cls, X) FE_134(WHAT, cls, __VA_ARGS__)
158#define FE_136(WHAT, cls, X, ...) WHAT(cls, X) FE_135(WHAT, cls, __VA_ARGS__)
159#define FE_137(WHAT, cls, X, ...) WHAT(cls, X) FE_136(WHAT, cls, __VA_ARGS__)
160#define FE_138(WHAT, cls, X, ...) WHAT(cls, X) FE_137(WHAT, cls, __VA_ARGS__)
161#define FE_139(WHAT, cls, X, ...) WHAT(cls, X) FE_138(WHAT, cls, __VA_ARGS__)
162#define FE_140(WHAT, cls, X, ...) WHAT(cls, X) FE_139(WHAT, cls, __VA_ARGS__)
163#define FE_141(WHAT, cls, X, ...) WHAT(cls, X) FE_140(WHAT, cls, __VA_ARGS__)
164#define FE_142(WHAT, cls, X, ...) WHAT(cls, X) FE_141(WHAT, cls, __VA_ARGS__)
165#define FE_143(WHAT, cls, X, ...) WHAT(cls, X) FE_142(WHAT, cls, __VA_ARGS__)
166#define FE_144(WHAT, cls, X, ...) WHAT(cls, X) FE_143(WHAT, cls, __VA_ARGS__)
167#define FE_145(WHAT, cls, X, ...) WHAT(cls, X) FE_144(WHAT, cls, __VA_ARGS__)
168#define FE_146(WHAT, cls, X, ...) WHAT(cls, X) FE_145(WHAT, cls, __VA_ARGS__)
169#define FE_147(WHAT, cls, X, ...) WHAT(cls, X) FE_146(WHAT, cls, __VA_ARGS__)
170#define FE_148(WHAT, cls, X, ...) WHAT(cls, X) FE_147(WHAT, cls, __VA_ARGS__)
171#define FE_149(WHAT, cls, X, ...) WHAT(cls, X) FE_148(WHAT, cls, __VA_ARGS__)
172#define FE_150(WHAT, cls, X, ...) WHAT(cls, X) FE_149(WHAT, cls, __VA_ARGS__)
173#define FE_151(WHAT, cls, X, ...) WHAT(cls, X) FE_150(WHAT, cls, __VA_ARGS__)
174#define FE_152(WHAT, cls, X, ...) WHAT(cls, X) FE_151(WHAT, cls, __VA_ARGS__)
175#define FE_153(WHAT, cls, X, ...) WHAT(cls, X) FE_152(WHAT, cls, __VA_ARGS__)
176#define FE_154(WHAT, cls, X, ...) WHAT(cls, X) FE_153(WHAT, cls, __VA_ARGS__)
177#define FE_155(WHAT, cls, X, ...) WHAT(cls, X) FE_154(WHAT, cls, __VA_ARGS__)
178#define FE_156(WHAT, cls, X, ...) WHAT(cls, X) FE_155(WHAT, cls, __VA_ARGS__)
179#define FE_157(WHAT, cls, X, ...) WHAT(cls, X) FE_156(WHAT, cls, __VA_ARGS__)
180#define FE_158(WHAT, cls, X, ...) WHAT(cls, X) FE_157(WHAT, cls, __VA_ARGS__)
181#define FE_159(WHAT, cls, X, ...) WHAT(cls, X) FE_158(WHAT, cls, __VA_ARGS__)
182#define FE_160(WHAT, cls, X, ...) WHAT(cls, X) FE_159(WHAT, cls, __VA_ARGS__)
183#define FE_161(WHAT, cls, X, ...) WHAT(cls, X) FE_160(WHAT, cls, __VA_ARGS__)
184#define FE_162(WHAT, cls, X, ...) WHAT(cls, X) FE_161(WHAT, cls, __VA_ARGS__)
185#define FE_163(WHAT, cls, X, ...) WHAT(cls, X) FE_162(WHAT, cls, __VA_ARGS__)
186#define FE_164(WHAT, cls, X, ...) WHAT(cls, X) FE_163(WHAT, cls, __VA_ARGS__)
187#define FE_165(WHAT, cls, X, ...) WHAT(cls, X) FE_164(WHAT, cls, __VA_ARGS__)
188#define FE_166(WHAT, cls, X, ...) WHAT(cls, X) FE_165(WHAT, cls, __VA_ARGS__)
189#define FE_167(WHAT, cls, X, ...) WHAT(cls, X) FE_166(WHAT, cls, __VA_ARGS__)
190#define FE_168(WHAT, cls, X, ...) WHAT(cls, X) FE_167(WHAT, cls, __VA_ARGS__)
191#define FE_169(WHAT, cls, X, ...) WHAT(cls, X) FE_168(WHAT, cls, __VA_ARGS__)
192#define FE_170(WHAT, cls, X, ...) WHAT(cls, X) FE_169(WHAT, cls, __VA_ARGS__)
193#define FE_171(WHAT, cls, X, ...) WHAT(cls, X) FE_170(WHAT, cls, __VA_ARGS__)
194#define FE_172(WHAT, cls, X, ...) WHAT(cls, X) FE_171(WHAT, cls, __VA_ARGS__)
195#define FE_173(WHAT, cls, X, ...) WHAT(cls, X) FE_172(WHAT, cls, __VA_ARGS__)
196#define FE_174(WHAT, cls, X, ...) WHAT(cls, X) FE_173(WHAT, cls, __VA_ARGS__)
197#define FE_175(WHAT, cls, X, ...) WHAT(cls, X) FE_174(WHAT, cls, __VA_ARGS__)
198#define FE_176(WHAT, cls, X, ...) WHAT(cls, X) FE_175(WHAT, cls, __VA_ARGS__)
199#define FE_177(WHAT, cls, X, ...) WHAT(cls, X) FE_176(WHAT, cls, __VA_ARGS__)
200#define FE_178(WHAT, cls, X, ...) WHAT(cls, X) FE_177(WHAT, cls, __VA_ARGS__)
201#define FE_179(WHAT, cls, X, ...) WHAT(cls, X) FE_178(WHAT, cls, __VA_ARGS__)
202#define FE_180(WHAT, cls, X, ...) WHAT(cls, X) FE_179(WHAT, cls, __VA_ARGS__)
203#define FE_181(WHAT, cls, X, ...) WHAT(cls, X) FE_180(WHAT, cls, __VA_ARGS__)
204#define FE_182(WHAT, cls, X, ...) WHAT(cls, X) FE_181(WHAT, cls, __VA_ARGS__)
205#define FE_183(WHAT, cls, X, ...) WHAT(cls, X) FE_182(WHAT, cls, __VA_ARGS__)
206#define FE_184(WHAT, cls, X, ...) WHAT(cls, X) FE_183(WHAT, cls, __VA_ARGS__)
207#define FE_185(WHAT, cls, X, ...) WHAT(cls, X) FE_184(WHAT, cls, __VA_ARGS__)
208#define FE_186(WHAT, cls, X, ...) WHAT(cls, X) FE_185(WHAT, cls, __VA_ARGS__)
209#define FE_187(WHAT, cls, X, ...) WHAT(cls, X) FE_186(WHAT, cls, __VA_ARGS__)
210#define FE_188(WHAT, cls, X, ...) WHAT(cls, X) FE_187(WHAT, cls, __VA_ARGS__)
211#define FE_189(WHAT, cls, X, ...) WHAT(cls, X) FE_188(WHAT, cls, __VA_ARGS__)
212#define FE_190(WHAT, cls, X, ...) WHAT(cls, X) FE_189(WHAT, cls, __VA_ARGS__)
213#define FE_191(WHAT, cls, X, ...) WHAT(cls, X) FE_190(WHAT, cls, __VA_ARGS__)
214#define FE_192(WHAT, cls, X, ...) WHAT(cls, X) FE_191(WHAT, cls, __VA_ARGS__)
215#define FE_193(WHAT, cls, X, ...) WHAT(cls, X) FE_192(WHAT, cls, __VA_ARGS__)
216#define FE_194(WHAT, cls, X, ...) WHAT(cls, X) FE_193(WHAT, cls, __VA_ARGS__)
217#define FE_195(WHAT, cls, X, ...) WHAT(cls, X) FE_194(WHAT, cls, __VA_ARGS__)
218#define FE_196(WHAT, cls, X, ...) WHAT(cls, X) FE_195(WHAT, cls, __VA_ARGS__)
219#define FE_197(WHAT, cls, X, ...) WHAT(cls, X) FE_196(WHAT, cls, __VA_ARGS__)
220#define FE_198(WHAT, cls, X, ...) WHAT(cls, X) FE_197(WHAT, cls, __VA_ARGS__)
221#define FE_199(WHAT, cls, X, ...) WHAT(cls, X) FE_198(WHAT, cls, __VA_ARGS__)
222
223#define GET_MACRO(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, \
224 _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26,\
225 _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40,\
226 _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54,\
227 _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68,\
228 _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82,\
229 _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, \
230 _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, \
231 _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, \
232 _122, _123, _124, _125, _126, _127, _128, _129, _130, _131, _132, _133, \
233 _134, _135, _136, _137, _138, _139, _140, _141, _142, _143, _144, _145, \
234 _146, _147, _148, _149, _150, _151, _152, _153, _154, _155, _156, _157, \
235 _158, _159, _160, _161, _162, _163, _164, _165, _166, _167, _168, _169, \
236 _170, _171, _172, _173, _174, _175, _176, _177, _178, _179, _180, _181, \
237 _182, _183, _184, _185, _186, _187, _188, _189, _190, _191, _192, _193, \
238 _194, _195, _196, _197, _198, _199, NAME, ...) NAME \
239
240#define FOR_EACH(조치, cls, ...) \
241 GET_MACRO(_0, __VA_ARGS__, \
242 FE_199, FE_198, FE_197, FE_196, FE_195, FE_194, FE_193, FE_192, FE_191, FE_190, \
243 FE_189, FE_188, FE_187, FE_186, FE_185, FE_184, FE_183, FE_182, FE_181, FE_180, \
244 FE_179, FE_178, FE_177, FE_176, FE_175, FE_174, FE_173, FE_172, FE_171, FE_170, \
245 FE_169, FE_168, FE_167, FE_166, FE_165, FE_164, FE_163, FE_162, FE_161, FE_160, \
246 FE_159, FE_158, FE_157, FE_156, FE_155, FE_154, FE_153, FE_152, FE_151, FE_150, \
247 FE_149, FE_148, FE_147, FE_146, FE_145, FE_144, FE_143, FE_142, FE_141, FE_140, \
248 FE_139, FE_138, FE_137, FE_136, FE_135, FE_134, FE_133, FE_132, FE_131, FE_130, \
249 FE_129, FE_128, FE_127, FE_126, FE_125, FE_124, FE_123, FE_122, FE_121, FE_120, \
250 FE_119, FE_118, FE_117, FE_116, FE_115, FE_114, FE_113, FE_112, FE_111, FE_110, \
251 FE_109, FE_108, FE_107, FE_106, FE_105, FE_104, FE_103, FE_102, FE_101, FE_100, \
252 FE_99, FE_98, FE_97, FE_96, FE_95, FE_94, FE_93, FE_92, FE_91, FE_90, \
253 FE_89, FE_88, FE_87, FE_86, FE_85, FE_84, FE_83, FE_82, FE_81, FE_80, \
254 FE_79, FE_78, FE_77, FE_76, FE_75, FE_74, FE_73, FE_72, FE_71, FE_70, \
255 FE_69, FE_68, FE_67, FE_66, FE_65, FE_64, FE_63, FE_62, FE_61, FE_60, \
256 FE_59, FE_58, FE_57, FE_56, FE_55, FE_54, FE_53, FE_52, FE_51, FE_50, \
257 FE_49, FE_48, FE_47, FE_46, FE_45, FE_44, FE_43, FE_42, FE_41, FE_40, \
258 FE_39, FE_38, FE_37, FE_36, FE_35, FE_34, FE_33, FE_32, FE_31, FE_30, \
259 FE_29, FE_28, FE_27, FE_26, FE_25, FE_24, FE_23, FE_22, FE_21, FE_20, \
260 FE_19, FE_18, FE_17, FE_16, FE_15, FE_14, FE_13, FE_12, FE_11, FE_10, \
261 FE_9, FE_8, FE_7, FE_6, FE_5, FE_4, FE_3, FE_2, FE_1, FE_0) (action, cls, __VA_ARGS__)
262
263네임스페이스 영역 {
264 템플릿<typename T, typename = oid>
265 구조체 managed;
266}
267
268#define DECLARE_PERSISTED(cls, 속성) managed<decltype(cls::property)> 속성;
269#define DECLARE_PROPERTY(cls, p) 영역:: 속성<&cls::p>(#p),
270#define DECLARE_MANAGED_PROPERTY(cls, p) &realm:: managed<cls>::p,
271#define DECLARE_MANAGED_PROPERTY_NAME(cls, p) #p,
272#define DECLARE_COND_UNMANAGED_TO_MANAGED(cls, p) if constexpr (std::is_same_v<decltype(ptr), decltype(&cls::p)>) { return &managed<cls>::p; }
273
274#include <utility>
275
276#include <cpprealm/internal/bridge/col_key.hpp>
277#include <cpprealm/internal/bridge/obj.hpp>
278#include <cpprealm/internal/bridge/ 객체.hpp>
279#include <cpprealm/internal/bridge/ 속성.hpp>
280#include <cpprealm/internal/bridge/ 쿼리.hpp>
281#include <cpprealm/internal/bridge/realm.hpp>
282
283네임스페이스 영역 {
284 클래스 rbool;
285
286 구조체 managed_base {
287 보호됨:
288 managed_base() = 기본값;
289 managed_base(const managed_base& other) {
290 m_obj = other.m_obj;
291 m_realm = other.m_realm;
292 m_key = other.m_key;
293 m_rbool_query = other.m_rbool_query;
294 }
295 managed_base& operator=(const managed_base& other) {
296 m_obj = other.m_obj;
297 m_realm = other.m_realm;
298 m_key = other.m_key;
299 m_rbool_query = other.m_rbool_query;
300 return *this;
301 }
302 managed_base(managed_base&& other) {
303 m_obj = std::move(other.m_obj);
304 m_realm = std::move(other.m_realm);
305 m_key = std::move(other.m_key);
306 m_rbool_query = std::move(other.m_rbool_query);
307 }
308 managed_base& operator=(managed_base&& other) {
309 m_obj = std::move(other.m_obj);
310 m_realm = std::move(other.m_realm);
311 m_key = std::move(other.m_key);
312 m_rbool_query = std::move(other.m_rbool_query);
313 return *this;
314 }
315 ~managed_base() {
316 m_obj = nullptr;
317 m_realm = nullptr;
318 m_rbool_query = nullptr;
319 m_key.~col_key();
320 }
321 public:
322 static constexpr bool is_object = false;
323 internal::bridge::obj *m_obj = nullptr;
324 internal::bridge::realm *m_realm = nullptr;
326 // 마크: 쿼리
327 rbool* m_rbool_query = nullptr;
328
329 oid Assign(internal::bridge::obj *obj,
332 this->m_obj = obj;
333 this->m_realm = 영역;
334 this->m_key = key;
335 }
336
337 oid Assign(internal::bridge::obj *obj,
339 const internal::bridge::col_key &key) {
340 this->m_obj = obj;
341 this->m_realm = 영역;
342 this->m_key = key;
343 }
344
345 템플릿<typename T>
346 managed_base& 연산자 =(const T& v) {
347 만약 constexpr (std::is_same_v<T, std::nullopt_t>) {
348 m_obj->set_null(m_key);
349 } 기타 {
350 m_obj->템플릿 설정하다<typename internal::type_info::type_info<T, oid>::internal_type>(m_key, v);
351 }
352 return *this;
353 }
354
355 oid prepare_for_query(internal::bridge:: 영역* 영역,
356 const internal::bridge::table& 테이블,
357 const std::string_view& col_name,
358 영역::rbool* query_builder) {
359 this->m_realm = 영역;
360 this->m_key = table.get_column_key(col_name);
361 this->m_rbool_query = query_builder;
362 }
363 };
364
365 템플릿<typename T, typename>
366 구조체 managed 됨 ;
367}
368
369#define __cpprealm_build_query(op, name, type) \
370rbool managed<type>:: 연산자 op(const type& rhs) const noException { \
371 if (This->m_rbool_query) { \
372 return this->m_rbool_query->name(m_key, rhs); \
373 } \
374 return 직렬화(분리()) 연산 직렬화(rhs); \
375} \
376
377#define __cpprealm_build_optional_query(op, name, type) \
378rbool managed<std::optional<type>>:: 연산자 op(const std::optional<type>& rhs) const noException { \
379 if (This->m_rbool_query) { \
380 return this->m_rbool_query->name(m_key, rhs); \
381 } \
382 return 직렬화(분리()) 연산 직렬화(rhs); \
383} \
384
385#define REALM_SCHEMA(cls, ...) \
386 DECLARE_REALM_SCHEMA(cls, false, false, ObjectType::TopLevel, __VA_ARGS__) \
387
388#define REALM_EMBEDDED_SCHEMA(cls, ...) \
389 DECLARE_REALM_SCHEMA(cls, true, false, ObjectType::Embedded, __VA_ARGS__)
390
391#define REALM_ASYMMETRIC_SCHEMA(cls, ...) \
392 DECLARE_REALM_SCHEMA(cls, false, true, ObjectType::Asymmetric, __VA_ARGS__)
393
394#define DECLARE_REALM_SCHEMA(cls, is_embedded_object, is_asymmetric_object, obj_type, ...) \
395 템플릿 <> 구조체 managed<cls> { \
396 managed() = 기본값; \
397 static constexpr ObjectType object_type = obj_type; \
398 FOR_EACH(DECLARE_PERSISTED, cls, __VA_ARGS__) \
399 static constexpr auto 스키마 = 영역:: 스키마(#cls, object_type, std::tuple{ FOR_EACH(DECLARE_PROPERTY, cls, __VA_ARGS__) } ); \
400 정적 constexpr 자동 managed_pointers() { \
401 return std::tuple{FOR_EACH(DECLARE_MANAGED_PROPERTY, cls, __VA_ARGS__)}; \
402 } \
403 템플릿 <typename PtrType> static constexpr auto unmanaged_to_managed_pointer(PtrType ptr) { \
404 FOR_EACH(DECLARE_COND_UNMANAGED_TO_MANAGED, cls, __VA_ARGS__); \
405 } \
406 static constexpr auto managed_pointers_names() { \
407 constexpr auto managed_pointers_names = std:: 배열<std::string_view, std::tuple_size<decltype(std::make_tuple(__VA_ARGS__))>::value>{FOR_EACH(DECLARE_MANAGED_PROPERTY_NAME, cls, __VA_ARGS__) \
408 return internal::array_to_tuple(managed_pointers_names); \
409 } \
410 \
411 정적 constexpr bool is_object = true; \
412 명시적 managed(const internal::bridge::obj& obj, \
413 internal::bridge:: 영역 영역) \
414 : m_obj(std::move(obj)) \
415 , m_realm(std::move(영역)) \
416 { \
417 자동 압축 = internal::zip_tuples(managed_pointers(), managed_pointers_names()); \
418 std:: 적용([&](auto& ...pair) { \
419 ((* this.*pair.first).assign(&m_obj, &m_realm, m_obj.get_table().get_column_key(pair.second)), ...)); \
420 }, 압축); \
421 } \
422 managed(const managed& other) { \
423 m_obj = other.m_obj; \
424 m_realm = other.m_realm; \
425 m_rbool_query = other.m_rbool_query; \
426 자동 압축 = internal::zip_tuples(managed_pointers(), managed_pointers_names()); \
427 if (m_rbool_query) { \
428 자동 스키마 = m_realm. 스키마().find(other. 스키마.name); \
429 자동 그룹 = m_realm.read_group(); \
430 auto table_ref = 그룹.get_table(스키마.table_key()); \
431 std:: 적용([&](auto& ...pair) { \
432 ((* this.*pair.first).prepare_for_query(&m_realm, Table_ref, 쌍.초, m_rbool_query), ...); \
433 }, 압축); \
434 } 기타 { \
435 std:: 적용([&](auto& ...pair) { \
436 ((* this.*pair.first).assign(&m_obj, &m_realm, m_obj.get_table().get_column_key(pair.second)), ...)); \
437 }, 압축); \
438 } \
439 } \
440 managed& operator=(const managed& other) { \
441 m_obj = other.m_obj; \
442 m_realm = other.m_realm; \
443 m_rbool_query = other.m_rbool_query; \
444 자동 압축 = internal::zip_tuples(managed_pointers(), managed_pointers_names()); \
445 if (m_rbool_query) { \
446 자동 스키마 = m_realm. 스키마().find(other. 스키마.name); \
447 자동 그룹 = m_realm.read_group(); \
448 auto table_ref = 그룹.get_table(스키마.table_key()); \
449 std:: 적용([&](auto& ...pair) { \
450 ((* this.*pair.first).prepare_for_query(&m_realm, Table_ref, 쌍.초, m_rbool_query), ...); \
451 }, 압축); \
452 } 기타 { \
453 std:: 적용([&](auto& ...pair) { \
454 ((* this.*pair.first).assign(&m_obj, &m_realm, m_obj.get_table().get_column_key(pair.second)), ...)); \
455 }, 압축); \
456 } \
457 return * this; \
458 } \
459 managed(managed&& other) { \
460 m_obj = std::move(other.m_obj); \
461 m_realm = std::move(other.m_realm); \
462 m_rbool_query = std::move(other.m_rbool_query); \
463 자동 압축 = internal::zip_tuples(managed_pointers(), managed_pointers_names()); \
464 if (m_rbool_query) { \
465 자동 스키마 = m_realm. 스키마().find(other. 스키마.name); \
466 자동 그룹 = m_realm.read_group(); \
467 auto table_ref = 그룹.get_table(스키마.table_key()); \
468 std:: 적용([&](auto& ...pair) { \
469 ((* this.*pair.first).prepare_for_query(&m_realm, Table_ref, 쌍.초, m_rbool_query), ...); \
470 }, 압축); \
471 } 기타 { \
472 std:: 적용([&](auto& ...pair) { \
473 ((* this.*pair.first).assign(&m_obj, &m_realm, m_obj.get_table().get_column_key(pair.second)), ...)); \
474 }, 압축); \
475 } \
476 } \
477 managed& operator=(managed&& other) { \
478 m_obj = std::move(other.m_obj); \
479 m_realm = std::move(other.m_realm); \
480 m_rbool_query = std::move(other.m_rbool_query); \
481 자동 압축 = internal::zip_tuples(managed_pointers(), managed_pointers_names()); \
482 if (m_rbool_query) { \
483 자동 스키마 = m_realm. 스키마().find(other. 스키마.name); \
484 자동 그룹 = m_realm.read_group(); \
485 auto table_ref = 그룹.get_table(스키마.table_key()); \
486 std:: 적용([&](auto& ...pair) { \
487 ((* this.*pair.first).prepare_for_query(&m_realm, Table_ref, 쌍.초, m_rbool_query), ...); \
488 }, 압축); \
489 } 기타 { \
490 std:: 적용([&](auto& ...pair) { \
491 ((* this.*pair.first).assign(&m_obj, &m_realm, m_obj.get_table().get_column_key(pair.second)), ...)); \
492 }, 압축); \
493 } \
494 return * this; \
495 } \
496 static managed prepare_for_query(const internal::bridge::realm& r, 영역::rbool* q) { \
497 managed<cls> m; \
498 m.m_realm = r; \
499 m.m_rbool_query = q; \
500 자동 스키마 = m.m_realm.schema().find(m.schema.name); \
501 자동 그룹 = m.m_realm.read_group(); \
502 auto table_ref = 그룹.get_table(스키마.table_key()); \
503 자동 압축 = internal::zip_tuples(managed_pointers(), managed_pointers_names()); \
504 std:: 적용([&m, &table_ref](auto& ...pair) { \
505 ((m.*pair.first).prepare_for_query(&m.m_realm, table_ref, 쌍.초, m.m_rbool_query), ...); \
506 }, 압축); \
507 return m; \
508 } \
509 cls detach() const { \
510 cls v; \
511 자동 할당 = [&v, this](auto& 쌍) { \
512 v.*(std::decay_t<decltype(pair.first)>::ptr) = ((* this).*(pair.second)). Attach(); \
513 }; \
514 자동 압축 = internal::zip_tuples(managed<cls>:: 스키마.ps, managed<cls>::managed_pointers()); \
515 std:: 적용([&assign](auto& ...pair) { \
516 (assign(pair), ...); \
517 }, 압축); \
518 return v; \
519 } \
520 자동 관찰(std::function< 무효(영역::object_change<managed>&&)>&& fn) { \
521 auto m_object = std::make_shared(m_realm,<internal::bridge::object> m_obj); \
522 자동 래퍼 = 영역::object_change_callback_wrapper<managed>{ \
523 std::move(fn), this, m_object}; \
524 return m_object->add_notification_callback( \
525 std::make_shared< 영역::object_change_callback_wrapper<managed>>(wrapper)); \
526 } \
527 bool is_invalidated() { \
528 return !m_obj.is_valid(); \
529 } \
530 bool is_frozen() { \
531 return m_realm.is_frozen(); \
532 } \
533 managed<cls> 동결() { \
534 자동 영역 = m_realm.freeze(); \
535 반환 managed<cls>(영역.import_copy_of(m_obj), 영역); \
536 } \
537 managed<cls> thaw() { \
538 if (is_invalidated()) { \
539 throw std::runtime_error("유효하지 않은 객체는 동결 해제할 수 없습니다."); \
540 } \
541 if (!is_frozen()) { \
542 return * this; \
543 } \
544 auto thawed_realm = m_realm.thaw(); \
545 반환 managed<cls>(thawed_realm.import_copy_of(m_obj), thawed_realm); \
546 } \
547 db get_realm() { \
548 return db(m_realm); \
549 } \
550 bool 연산자 ==(const managed<cls>& other) const { \
551 if (m_rbool_query != nullptr) \
552 throw std::runtime_error("이 비교 연산자 는 `where` 내부에서 유효하지 않습니다."); \
553 auto& a = m_obj; \
554 auto& b = other.m_obj; \
555 if (m_realm != other.m_realm) { \
556 은 false를 반환합니다. \
557 } \
558 return a.get_table() == b.get_table() \
559 && a.get_key() == b.get_key(); \
560 } \
561 bool 연산자 ==(const managed<cls*>& other) const { \
562 if (m_rbool_query != nullptr) \
563 throw std::runtime_error("이 비교 연산자 는 `where` 내부에서 유효하지 않습니다."); \
564 auto& a = m_obj; \
565 auto& b = other.m_obj; \
566 if (m_realm != other->m_realm) { \
567 은 false를 반환합니다. \
568 } \
569 return a.get_table() == b->get_table() \
570 && a.get_key() == b->get_key(); \
571 } \
572 bool 연산자 !=(const managed<cls>& other) const { \
573 return ! this-> 연산자 ==(기타); \
574 } \
575 bool 연산자 !=(const managed<cls*>& other) const { \
576 return ! this-> 연산자 ==(기타); \
577 } \
578 bool 연산자 < (const managed<cls>& rhs) const { \
579 return m_obj.get_key() < rhs.m_obj.get_key(); \
580 } \
581 oid to_json(std::ostream& out) const noException { \
582 m_obj.to_json(out); \
583 } \
584 비공개: \
585 internal::bridge::obj m_obj; \
586 internal::bridge::realm m_realm; \
587 rbool* m_rbool_query = nullptr; \
588 친구 구조체 db; \
589 템플릿 <typename, typename> 친구 구조체가 관리됩니다. \
590 템플릿 <typename, typename> 친구 구조체 상자; \
591 템플릿 <typename> 친구 구조체 :: 영역::thread_safe_reference; \
592 템플릿 <typename T> 친구 rbool* :: 영역::internal::get_rbool(const T&); \
593 \
594 }; \
595 struct meta_schema_##cls { \
596 meta_schema_##cls() { \
597 자동 s = managed<cls>:: 스키마.to_core_schema(); \
598 auto it = std::find(std::begin(realm::db::schemas), std::end(realm::db::schemas), s); \
599 if (it == std::end(realm::db::schemas)) \
600 realm::db::schemas.push_back(s); \
601 } \
602 }; \
603 정적 인라인 meta_schema_##cls _meta_schema_##cls{};
604
605namespace realm::internal {
606 /*
607 * 비공개 `m_rbool_query`를 추출하는 헬퍼 메서드
608 * managed<T> 객체 의 속성 입니다.
609 */
610 템플릿<typename T>
611 rbool* get_rbool(const T& o) {
612 return o.m_rbool_query;
613 }
614}
615
616#endif //CPPREALM_MACROS_HPP
정의: rbool.hpp:36
정의: col_key.hpp:28
정의: realm.hpp:67
정의: 매크로.hpp:286
정의: obj.hpp:62