19#ifndef CPPREALM_MACROS_HPP
20#define CPPREALM_MACROS_HPP
22#define fe_0(o que, cls)
23#define fe_1(O que, cls, X) O QUE(cls, X)
24#define fe_2(quet, cls, X, ...) what(cls, X)FE_1(quem, cls, __VA_ARGS__)
25#define fe_3(quet, cls, X, ...) what(cls, X)FE_2(quem, cls, __VA_ARGS__)
26#define fe_4(quet, cls, X, ...) what(cls, X)FE_3(quem, cls, __VA_ARGS__)
27#define fe_5(quet, cls, X, ...) what(cls, X)FE_4(quem, cls, __VA_ARGS__)
28#define fe_6(quet, cls, X, ...) what(cls, X)FE_5(quem, cls, __VA_ARGS__)
29#define fe_7(quet, cls, X, ...) what(cls, X)FE_6(quem, cls, __VA_ARGS__)
30#define fe_8(quet, cls, X, ...) what(cls, X)FE_7(quem, cls, __VA_ARGS__)
31#define fe_9(quet, cls, X, ...) what(cls, X)FE_8(quem, cls, __VA_ARGS__)
32#define fe_10(quet, cls, X, ...) what(cls, X)FE_9(quem, cls, __VA_ARGS__)
33#define fe_11(quet, cls, X, ...) what(cls, X)FE_10(quem, cls, __VA_ARGS__)
34#define fe_12(quet, cls, X, ...) what(cls, X)FE_11(quem, cls, __VA_ARGS__)
35#define fe_13(quet, cls, X, ...) what(cls, X)FE_12(quem, cls, __VA_ARGS__)
36#define fe_14(quet, cls, X, ...) what(cls, X)FE_13(quem, cls, __VA_ARGS__)
37#define fe_15(quet, cls, X, ...) what(cls, X)FE_14(quem, cls, __VA_ARGS__)
38#define fe_16(quet, cls, X, ...) what(cls, X)FE_15(quem, cls, __VA_ARGS__)
39#define fe_17(quet, cls, X, ...) what(cls, X)FE_16(quem, cls, __VA_ARGS__)
40#define fe_18(quet, cls, X, ...) what(cls, X)FE_17(quem, cls, __VA_ARGS__)
41#define fe_19(quet, cls, X, ...) what(cls, X)FE_18(quem, cls, __VA_ARGS__)
42#define fe_20(quet, cls, X, ...) what(cls, X)FE_19(quem, cls, __VA_ARGS__)
43#define fe_21(quet, cls, X, ...) what(cls, X)FE_20(quem, cls, __VA_ARGS__)
44#define fe_22(quet, cls, X, ...) what(cls, X)FE_21(quem, cls, __VA_ARGS__)
45#define fe_23(quet, cls, X, ...) what(cls, X)FE_22(quem, cls, __VA_ARGS__)
46#define fe_24(quet, cls, X, ...) what(cls, X)FE_23(quem, cls, __VA_ARGS__)
47#define fe_25(quet, cls, X, ...) what(cls, X)FE_24(quem, cls, __VA_ARGS__)
48#define fe_26(quet, cls, X, ...) what(cls, X)FE_25(quem, cls, __VA_ARGS__)
49#define fe_27(quet, cls, X, ...) what(cls, X)FE_26(quem, cls, __VA_ARGS__)
50#define fe_28(quet, cls, X, ...) what(cls, X)FE_27(quem, cls, __VA_ARGS__)
51#define fe_29(quet, cls, X, ...) what(cls, X)FE_28(quem, cls, __VA_ARGS__)
52#define fe_30(quet, cls, X, ...) what(cls, X)FE_29(quem, cls, __VA_ARGS__)
53#define fe_31(quet, cls, X, ...) what(cls, X)FE_30(quem, cls, __VA_ARGS__)
54#define fe_32(quet, cls, X, ...) what(cls, X)FE_31(quem, cls, __VA_ARGS__)
55#define fe_33(quet, cls, X, ...) what(cls, X)FE_32(quem, cls, __VA_ARGS__)
56#define fe_34(quet, cls, X, ...) what(cls, X)FE_33(quem, cls, __VA_ARGS__)
57#define fe_35(quet, cls, X, ...) what(cls, X)FE_34(quem, cls, __VA_ARGS__)
58#define fe_36(quet, cls, X, ...) what(cls, X)FE_35(quem, cls, __VA_ARGS__)
59#define fe_37(quet, cls, X, ...) what(cls, X)FE_36(quem, cls, __VA_ARGS__)
60#define fe_38(quet, cls, X, ...) what(cls, X)FE_37(quem, cls, __VA_ARGS__)
61#define fe_39(quet, cls, X, ...) what(cls, X)FE_38(quem, cls, __VA_ARGS__)
62#define fe_40(quet, cls, X, ...) what(cls, X)FE_39(quem, cls, __VA_ARGS__)
63#define fe_41(quet, cls, X, ...) what(cls, X)FE_40(quem, cls, __VA_ARGS__)
64#define fe_42(quet, cls, X, ...) what(cls, X)FE_41(quem, cls, __VA_ARGS__)
65#define fe_43(quet, cls, X, ...) what(cls, X)FE_42(quem, cls, __VA_ARGS__)
66#define fe_44(quet, cls, X, ...) what(cls, X)FE_43(quem, cls, __VA_ARGS__)
67#define fe_45(quet, cls, X, ...) what(cls, X)FE_44(quem, cls, __VA_ARGS__)
68#define fe_46(quet, cls, X, ...) what(cls, X)FE_45(quem, cls, __VA_ARGS__)
69#define fe_47(quet, cls, X, ...) what(cls, X)FE_46(quem, cls, __VA_ARGS__)
70#define fe_48(quet, cls, X, ...) what(cls, X)FE_47(quem, cls, __VA_ARGS__)
71#define fe_49(quet, cls, X, ...) what(cls, X)FE_48(quem, cls, __VA_ARGS__)
72#define fe_50(quet, cls, X, ...) what(cls, X)FE_49(quem, cls, __VA_ARGS__)
73#define fe_51(quet, cls, X, ...) what(cls, X)FE_50(quem, cls, __VA_ARGS__)
74#define fe_52(quet, cls, X, ...) what(cls, X)FE_51(quem, cls, __VA_ARGS__)
75#define fe_53(quet, cls, X, ...) what(cls, X)FE_52(quem, cls, __VA_ARGS__)
76#define fe_54(quet, cls, X, ...) what(cls, X)FE_53(quem, cls, __VA_ARGS__)
77#define fe_55(quet, cls, X, ...) what(cls, X)FE_54(quem, cls, __VA_ARGS__)
78#define fe_56(quet, cls, X, ...) what(cls, X)FE_55(quem, cls, __VA_ARGS__)
79#define fe_57(quet, cls, X, ...) what(cls, X)FE_56(quem, cls, __VA_ARGS__)
80#define fe_58(quet, cls, X, ...) what(cls, X)FE_57(quem, cls, __VA_ARGS__)
81#define fe_59(quet, cls, X, ...) what(cls, X)FE_58(quem, cls, __VA_ARGS__)
82#define fe_60(quet, cls, X, ...) what(cls, X)FE_59(quem, cls, __VA_ARGS__)
83#define fe_61(quet, cls, X, ...) what(cls, X)FE_60(quem, cls, __VA_ARGS__)
84#define fe_62(quet, cls, X, ...) what(cls, X)FE_61(quem, cls, __VA_ARGS__)
85#define fe_63(quet, cls, X, ...) what(cls, X)FE_62(quem, cls, __VA_ARGS__)
86#define fe_64(quet, cls, X, ...) what(cls, X)FE_63(quem, cls, __VA_ARGS__)
87#define fe_65(quet, cls, X, ...) what(cls, X)FE_64(quem, cls, __VA_ARGS__)
88#define fe_66(quet, cls, X, ...) what(cls, X)FE_65(quem, cls, __VA_ARGS__)
89#define fe_67(quet, cls, X, ...) what(cls, X)FE_66(quem, cls, __VA_ARGS__)
90#define fe_68(quet, cls, X, ...) what(cls, X)FE_67(quem, cls, __VA_ARGS__)
91#define fe_69(quet, cls, X, ...) what(cls, X)FE_68(quem, cls, __VA_ARGS__)
92#define fe_70(quet, cls, X, ...) what(cls, X)FE_69(quem, cls, __VA_ARGS__)
93#define fe_71(quet, cls, X, ...) what(cls, X)FE_70(quem, cls, __VA_ARGS__)
94#define fe_72(quet, cls, X, ...) what(cls, X)FE_71(quem, cls, __VA_ARGS__)
95#define fe_73(quet, cls, X, ...) what(cls, X)FE_72(quem, cls, __VA_ARGS__)
96#define fe_74(quet, cls, X, ...) what(cls, X)FE_73(quem, cls, __VA_ARGS__)
97#define fe_75(quet, cls, X, ...) what(cls, X)FE_74(quem, cls, __VA_ARGS__)
98#define fe_76(quet, cls, X, ...) what(cls, X)FE_75(quem, cls, __VA_ARGS__)
99#define fe_77(quet, cls, X, ...) what(cls, X)FE_76(quem, cls, __VA_ARGS__)
100#define fe_78(quet, cls, X, ...) what(cls, X)FE_77(quem, cls, __VA_ARGS__)
101#define fe_79(quet, cls, X, ...) what(cls, X)FE_78(quem, cls, __VA_ARGS__)
102#define fe_80(quet, cls, X, ...) what(cls, X)FE_79(quem, cls, __VA_ARGS__)
103#define fe_81(quet, cls, X, ...) what(cls, X)FE_80(quem, cls, __VA_ARGS__)
104#define fe_82(quet, cls, X, ...) what(cls, X)FE_81(quem, cls, __VA_ARGS__)
105#define fe_83(quet, cls, X, ...) what(cls, X)FE_82(quem, cls, __VA_ARGS__)
106#define fe_84(quet, cls, X, ...) what(cls, X)FE_83(quem, cls, __VA_ARGS__)
107#define fe_85(quet, cls, X, ...) what(cls, X)FE_84(quem, cls, __VA_ARGS__)
108#define fe_86(quet, cls, X, ...) what(cls, X)FE_85(quem, cls, __VA_ARGS__)
109#define fe_87(quet, cls, X, ...) what(cls, X)FE_86(quem, cls, __VA_ARGS__)
110#define fe_88(quet, cls, X, ...) what(cls, X)FE_87(quem, cls, __VA_ARGS__)
111#define fe_89(quet, cls, X, ...) what(cls, X)FE_88(quem, cls, __VA_ARGS__)
112#define fe_90(quet, cls, X, ...) what(cls, X)FE_89(quem, cls, __VA_ARGS__)
113#define fe_91(quet, cls, X, ...) what(cls, X)FE_90(quem, cls, __VA_ARGS__)
114#define fe_92(quet, cls, X, ...) what(cls, X)FE_91(quem, cls, __VA_ARGS__)
115#define fe_93(quet, cls, X, ...) what(cls, X)FE_92(quem, cls, __VA_ARGS__)
116#define fe_94(quet, cls, X, ...) what(cls, X)FE_93(quem, cls, __VA_ARGS__)
117#define fe_95(quet, cls, X, ...) what(cls, X)FE_94(quem, cls, __VA_ARGS__)
118#define fe_96(quet, cls, X, ...) what(cls, X)FE_95(quem, cls, __VA_ARGS__)
119#define fe_97(quet, cls, X, ...) what(cls, X)FE_96(quem, cls, __VA_ARGS__)
120#define fe_98(quet, cls, X, ...) what(cls, X)FE_97(quem, cls, __VA_ARGS__)
121#define fe_99(quet, cls, X, ...) what(cls, X)FE_98(quem, cls, __VA_ARGS__)
122#define fe_100(quente, cls, X, ...) QUE(cls, X) fe_99(quente, cls, __VA_ARGS__)
123#define fe_101(quente, cls, X, ...) QUE(cls, X) fe_100(quente, cls, __VA_ARGS__)
124#define fe_102(quente, cls, X, ...) QUE(cls, X) fe_101(quente, cls, __VA_ARGS__)
125#define fe_103(quente, cls, X, ...) QUE(cls, X) fe_102(quente, cls, __VA_ARGS__)
126#define fe_104(quente, cls, X, ...) QUE(cls, X) fe_103(quente, cls, __VA_ARGS__)
127#define fe_105(quente, cls, X, ...) QUE(cls, X) fe_104(quente, cls, __VA_ARGS__)
128#define fe_106(quente, cls, X, ...) QUE(cls, X) fe_105(quente, cls, __VA_ARGS__)
129#define fe_107(quente, cls, X, ...) QUE(cls, X) fe_106(quente, cls, __VA_ARGS__)
130#define fe_108(quente, cls, X, ...) QUE(cls, X) fe_107(quente, cls, __VA_ARGS__)
131#define fe_109(quente, cls, X, ...) QUE(cls, X) fe_108(quente, cls, __VA_ARGS__)
132#define fe_110(quente, cls, X, ...) QUE(cls, X) fe_109(quente, cls, __VA_ARGS__)
133#define fe_111(quente, cls, X, ...) QUE(cls, X) fe_110(quente, cls, __VA_ARGS__)
134#define fe_112(quente, cls, X, ...) QUE(cls, X) fe_111(quente, cls, __VA_ARGS__)
135#define fe_113(quente, cls, X, ...) QUE(cls, X) fe_112(quente, cls, __VA_ARGS__)
136#define fe_114(quente, cls, X, ...) QUE(cls, X) fe_113(quente, cls, __VA_ARGS__)
137#define fe_115(quente, cls, X, ...) QUE(cls, X) fe_114(quente, cls, __VA_ARGS__)
138#define fe_116(quente, cls, X, ...) QUE(cls, X) fe_115(quente, cls, __VA_ARGS__)
139#define fe_117(quente, cls, X, ...) QUE(cls, X) fe_116(quente, cls, __VA_ARGS__)
140#define fe_118(quente, cls, X, ...) QUE(cls, X) fe_117(quente, cls, __VA_ARGS__)
141#define fe_119(quente, cls, X, ...) QUE(cls, X) fe_118(quente, cls, __VA_ARGS__)
142#define fe_120(quente, cls, X, ...) QUE(cls, X) fe_119(quente, cls, __VA_ARGS__)
143#define fe_121(quente, cls, X, ...) QUE(cls, X) fe_120(quente, cls, __VA_ARGS__)
144#define fe_122(quente, cls, X, ...) QUE(cls, X) fe_121(quente, cls, __VA_ARGS__)
145#define fe_123(quente, cls, X, ...) QUE(cls, X) fe_122(quente, cls, __VA_ARGS__)
146#define fe_124(quente, cls, X, ...) QUE(cls, X) fe_123(quente, cls, __VA_ARGS__)
147#define fe_125(quente, cls, X, ...) QUE(cls, X) fe_124(quente, cls, __VA_ARGS__)
148#define fe_126(quente, cls, X, ...) QUE(cls, X) fe_125(quente, cls, __VA_ARGS__)
149#define fe_127(quente, cls, X, ...) QUE(cls, X) fe_126(quente, cls, __VA_ARGS__)
150#define fe_128(quente, cls, X, ...) QUE(cls, X) fe_127(quente, cls, __VA_ARGS__)
151#define fe_129(quente, cls, X, ...) QUE(cls, X) fe_128(quente, cls, __VA_ARGS__)
152#define fe_130(quente, cls, X, ...) QUE(cls, X) fe_129(quente, cls, __VA_ARGS__)
153#define fe_131(quente, cls, X, ...) QUE(cls, X) fe_130(quente, cls, __VA_ARGS__)
154#define fe_132(quente, cls, X, ...) QUE(cls, X) fe_131(quente, cls, __VA_ARGS__)
155#define fe_133(quente, cls, X, ...) QUE(cls, X) fe_132(quente, cls, __VA_ARGS__)
156#define fe_134(quente, cls, X, ...) QUE(cls, X) fe_133(quente, cls, __VA_ARGS__)
157#define fe_135(quente, cls, X, ...) QUE(cls, X) fe_134(quente, cls, __VA_ARGS__)
158#define fe_136(quente, cls, X, ...) QUE(cls, X) fe_135(quente, cls, __VA_ARGS__)
159#define fe_137(quente, cls, X, ...) QUE(cls, X) fe_136(quente, cls, __VA_ARGS__)
160#define fe_138(quente, cls, X, ...) QUE(cls, X) fe_137(quente, cls, __VA_ARGS__)
161#define fe_139(quente, cls, X, ...) QUE(cls, X) fe_138(quente, cls, __VA_ARGS__)
162#define fe_140(quente, cls, X, ...) QUE(cls, X) fe_139(quente, cls, __VA_ARGS__)
163#define fe_141(quente, cls, X, ...) QUE(cls, X) fe_140(quente, cls, __VA_ARGS__)
164#define fe_142(quente, cls, X, ...) QUE(cls, X) fe_141(quente, cls, __VA_ARGS__)
165#define fe_143(quente, cls, X, ...) QUE(cls, X) fe_142(quente, cls, __VA_ARGS__)
166#define fe_144(quente, cls, X, ...) QUE(cls, X) fe_143(quente, cls, __VA_ARGS__)
167#define fe_145(quente, cls, X, ...) QUE(cls, X) fe_144(quente, cls, __VA_ARGS__)
168#define fe_146(quente, cls, X, ...) QUE(cls, X) fe_145(quente, cls, __VA_ARGS__)
169#define fe_147(quente, cls, X, ...) QUE(cls, X) fe_146(quente, cls, __VA_ARGS__)
170#define fe_148(quente, cls, X, ...) QUE(cls, X) fe_147(quente, cls, __VA_ARGS__)
171#define fe_149(quente, cls, X, ...) QUE(cls, X) fe_148(quente, cls, __VA_ARGS__)
172#define fe_150(quente, cls, X, ...) QUE(cls, X) fe_149(quente, cls, __VA_ARGS__)
173#define fe_151(quente, cls, X, ...) QUE(cls, X) fe_150(quente, cls, __VA_ARGS__)
174#define fe_152(quente, cls, X, ...) QUE(cls, X) fe_151(quente, cls, __VA_ARGS__)
175#define fe_153(quente, cls, X, ...) QUE(cls, X) fe_152(quente, cls, __VA_ARGS__)
176#define fe_154(quente, cls, X, ...) QUE(cls, X) fe_153(quente, cls, __VA_ARGS__)
177#define fe_155(quente, cls, X, ...) QUE(cls, X) fe_154(quente, cls, __VA_ARGS__)
178#define fe_156(quente, cls, X, ...) QUE(cls, X) fe_155(quente, cls, __VA_ARGS__)
179#define fe_157(quente, cls, X, ...) QUE(cls, X) fe_156(quente, cls, __VA_ARGS__)
180#define fe_158(quente, cls, X, ...) QUE(cls, X) fe_157(quente, cls, __VA_ARGS__)
181#define fe_159(quente, cls, X, ...) QUE(cls, X) fe_158(quente, cls, __VA_ARGS__)
182#define fe_160(quente, cls, X, ...) QUE(cls, X) fe_159(quente, cls, __VA_ARGS__)
183#define fe_161(quente, cls, X, ...) QUE(cls, X) fe_160(quente, cls, __VA_ARGS__)
184#define fe_162(quente, cls, X, ...) QUE(cls, X) fe_161(quente, cls, __VA_ARGS__)
185#define fe_163(quente, cls, X, ...) QUE(cls, X) fe_162(quente, cls, __VA_ARGS__)
186#define fe_164(quente, cls, X, ...) QUE(cls, X) fe_163(quente, cls, __VA_ARGS__)
187#define fe_165(quente, cls, X, ...) QUE(cls, X) fe_164(quente, cls, __VA_ARGS__)
188#define fe_166(quente, cls, X, ...) QUE(cls, X) fe_165(quente, cls, __VA_ARGS__)
189#define fe_167(quente, cls, X, ...) QUE(cls, X) fe_166(quente, cls, __VA_ARGS__)
190#define fe_168(quente, cls, X, ...) QUE(cls, X) fe_167(quente, cls, __VA_ARGS__)
191#define fe_169(quente, cls, X, ...) QUE(cls, X) fe_168(quente, cls, __VA_ARGS__)
192#define fe_170(quente, cls, X, ...) QUE(cls, X) fe_169(quente, cls, __VA_ARGS__)
193#define fe_171(quente, cls, X, ...) QUE(cls, X) fe_170(quente, cls, __VA_ARGS__)
194#define fe_172(quente, cls, X, ...) QUE(cls, X) fe_171(quente, cls, __VA_ARGS__)
195#define fe_173(quente, cls, X, ...) QUE(cls, X) fe_172(quente, cls, __VA_ARGS__)
196#define fe_174(quente, cls, X, ...) QUE(cls, X) fe_173(quente, cls, __VA_ARGS__)
197#define fe_175(quente, cls, X, ...) QUE(cls, X) fe_174(quente, cls, __VA_ARGS__)
198#define fe_176(quente, cls, X, ...) QUE(cls, X) fe_175(quente, cls, __VA_ARGS__)
199#define fe_177(quente, cls, X, ...) QUE(cls, X) fe_176(quente, cls, __VA_ARGS__)
200#define fe_178(quente, cls, X, ...) QUE(cls, X) fe_177(quente, cls, __VA_ARGS__)
201#define fe_179(quente, cls, X, ...) QUE(cls, X) fe_178(quente, cls, __VA_ARGS__)
202#define fe_180(quente, cls, X, ...) QUE(cls, X) fe_179(quente, cls, __VA_ARGS__)
203#define fe_181(quente, cls, X, ...) QUE(cls, X) fe_180(quente, cls, __VA_ARGS__)
204#define fe_182(quente, cls, X, ...) QUE(cls, X) fe_181(quente, cls, __VA_ARGS__)
205#define fe_183(quente, cls, X, ...) QUE(cls, X) fe_182(quente, cls, __VA_ARGS__)
206#define fe_184(quente, cls, X, ...) QUE(cls, X) fe_183(quente, cls, __VA_ARGS__)
207#define fe_185(quente, cls, X, ...) QUE(cls, X) fe_184(quente, cls, __VA_ARGS__)
208#define fe_186(quente, cls, X, ...) QUE(cls, X) fe_185(quente, cls, __VA_ARGS__)
209#define fe_187(quente, cls, X, ...) QUE(cls, X) fe_186(quente, cls, __VA_ARGS__)
210#define fe_188(quente, cls, X, ...) QUE(cls, X) fe_187(quente, cls, __VA_ARGS__)
211#define fe_189(quente, cls, X, ...) QUE(cls, X) fe_188(quente, cls, __VA_ARGS__)
212#define fe_190(quente, cls, X, ...) QUE(cls, X) fe_189(quente, cls, __VA_ARGS__)
213#define fe_191(quente, cls, X, ...) QUE(cls, X) fe_190(quente, cls, __VA_ARGS__)
214#define fe_192(quente, cls, X, ...) QUE(cls, X) fe_191(quente, cls, __VA_ARGS__)
215#define fe_193(quente, cls, X, ...) QUE(cls, X) fe_192(quente, cls, __VA_ARGS__)
216#define fe_194(quente, cls, X, ...) QUE(cls, X) fe_193(quente, cls, __VA_ARGS__)
217#define fe_195(quente, cls, X, ...) QUE(cls, X) fe_194(quente, cls, __VA_ARGS__)
218#define fe_196(quente, cls, X, ...) QUE(cls, X) fe_195(quente, cls, __VA_ARGS__)
219#define fe_197(quente, cls, X, ...) QUE(cls, X) fe_196(quente, cls, __VA_ARGS__)
220#define fe_198(quente, cls, X, ...) QUE(cls, X) fe_197(quente, cls, __VA_ARGS__)
221#define fe_199(quente, cls, X, ...) QUE(cls, X) fe_198(quente, cls, __VA_ARGS__)
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, NOME, ...) NOME \
240#define FOR_EACH(ação, 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) (ação, cls, __VA_ARGS__)
264 template<
typename T,
typename =
null>
268#define DECLORE_PERSISTED(cls, propriedade) managed<decltype(cls::property)> propriedade;
269#define DECLORE_PROPERTY(cls, p) Realm:: propriedade<&cls::p>(#p),
270#define DECLORE_MANAGED_PROPERTY(cls, p) &realm::managed<cls>::p,
271#define DECLORE_MANAGED_PROPERTY_NAME(cls, p) #p,
276#include <cpprealm/internal/bridge/col_key.hpp>
277#include <cpprealm/internal/bridge/obj.hpp>
278#include <cpprealm/internal/bridge/ objeto.hpp>
279#include <cpprealm/internal/bridge/ Property propriedade>
280#include <cpprealm/internal/bridge/query.hpp>
281#include <cprealm/internal/bridge/realm.hpp>
291 m_realm = outro.m_realm;
293 m_rbool_query = outro.m_rbool_query;
297 m_realm = outro.m_realm;
299 m_rbool_query = outro.m_rbool_query;
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);
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);
318 m_rbool_query =
nullptr;
322 estático constexpr bool is_object =
false;
327 rbool* m_rbool_query =
nullptr;
333 isto->m_realm = Realm;
341 isto->m_realm = Realm;
347 se constexpr (std::is_same_v<T, std::nullopt_t>) {
348 m_obj->set_null(m_key);
350 m_obj->template set<typename internal::type_info::type_info<T, null>::internal_type>(m_key, v);
357 const std::string_view& col_name,
359 isto->m_realm = Realm;
360 esta->m_key = table.get_column_key(col_name);
361 esta->m_rbool_query = query_builder;
365 template<
typename T,
typename>
369#define __cpprealm_build_query(op, name, type) \
370rbool managed<type>::operator op(const type& rhs) const noexceto { \
371 if (This->m_rbool_query) { \
372 return this->m_rbool_query->name(m_key, rhs); \
374 return serialize(detach()) op serialize(rhs); \
377#define __cpprealm_build_optional_query(op, name, type) \
379 if (This->m_rbool_query) { \
380 return this->m_rbool_query->name(m_key, rhs); \
382 return serialize(detach()) op serialize(rhs); \
385#define Realm_SCHEMA(cls, ...) \
386 DECLORE_REALM_SCHEMA(cls, false, false, ObjectType::TopLevel, __VA_ARGS__) \
388#define Realm_EMBEDDED_SCHEMA(cls, ...) \
389 DECLORE_REALM_SCHEMA(cls, true, false, ObjectType::Embedded, __VA_ARGS__)
391#define Realm_ASYMMETRIC_SCHEMA(cls, ...) \
392 DECLORE_REALM_SCHEMA(cls, false, true, ObjectType::Asymmetric, __VA_ARGS__)
394#define DECLORE_REALM_SCHEMA(cls, is_embedded_object, is_asymmetric_object, obj_type, ...) \
395 modelo <> estrutura gerenciada<cls> { \
396 managed() = padrão; \
397 estático constexpr ObjectType object_type = obj_type; \
398 FOR_EACH(DECLARE_PERSISTED, cls, __VA_ARGS__) \
399 estático constexpr auto schema = Realm::schema(#cls, object_type, std::tuple{ FOR_EACH(DECLARE_PROPERTY, cls, __VA_ARGS__) }); \
400 estática constexpr auto managed_pointers() { \
401 return std::tuple{FOR_EACH(DECLARE_MANAGED_PROPERTY, cls, __VA_ARGS__)}; \
403 modelo <typename PtrType> estático constexpr auto unmanaged_to_managed_pointer(PtrType ptr) { \
404 FOR_EACH(DECLARE_COND_UNMANAGED_TO_MANAGED, cls, __VA_ARGS__); \
406 estática constexpr auto managed_pointers_names() { \
407 constexpr auto managed_pointers_names = std::array<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); \
411 estático constexpr bool is_object = true; \
412 gerenciado explicitamente(const internal::bridge::obj& obj, \
413 internal::bridge:: Realm Realm)\
414 : m_obj(std::move(obj)) \
415 , m_realm(std::move(Realm)) \
417 auto zipped = internal::zip_tuples(managed_pointers(), managed_pointers_names()); \
418 std::apply([&](auto& ...pair) { \
419 ((*This.*pair.first).assign(&m_obj, &m_realm, m_obj.get_table().get_column_key(pair.second)), ...); \
422 managed(const managed& other) { \
423 m_obj = outro.m_obj; \
424 m_realm = outro.m_realm; \
425 m_rbool_query = outro.m_rbool_query; \
426 auto zipped = internal::zip_tuples(managed_pointers(), managed_pointers_names()); \
427 if (m_rbool_query) { \
428 auto schema = m_realm.schema().find(OTHER.schema.name); \
429 auto group = m_realm.read_group(); \
430 auto table_ref = group.get_table(schema.table_key()); \
431 std::apply([&](auto& ...pair) { \
432 ((*This.*pair.first).prepare_for_query(&m_realm, table_ref, par.segundo, m_rbool_query), ...); \
435 std::apply([&](auto& ...pair) { \
436 ((*This.*pair.first).assign(&m_obj, &m_realm, m_obj.get_table().get_column_key(pair.second)), ...); \
440 managed& operator=(const managed& other) { \
441 m_obj = outro.m_obj; \
442 m_realm = outro.m_realm; \
443 m_rbool_query = outro.m_rbool_query; \
444 auto zipped = internal::zip_tuples(managed_pointers(), managed_pointers_names()); \
445 if (m_rbool_query) { \
446 auto schema = m_realm.schema().find(OTHER.schema.name); \
447 auto group = m_realm.read_group(); \
448 auto table_ref = group.get_table(schema.table_key()); \
449 std::apply([&](auto& ...pair) { \
450 ((*This.*pair.first).prepare_for_query(&m_realm, table_ref, par.segundo, m_rbool_query), ...); \
453 std::apply([&](auto& ...pair) { \
454 ((*This.*pair.first).assign(&m_obj, &m_realm, m_obj.get_table().get_column_key(pair.second)), ...); \
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 auto zipped = internal::zip_tuples(managed_pointers(), managed_pointers_names()); \
464 if (m_rbool_query) { \
465 auto schema = m_realm.schema().find(OTHER.schema.name); \
466 auto group = m_realm.read_group(); \
467 auto table_ref = group.get_table(schema.table_key()); \
468 std::apply([&](auto& ...pair) { \
469 ((*This.*pair.first).prepare_for_query(&m_realm, table_ref, par.segundo, m_rbool_query), ...); \
472 std::apply([&](auto& ...pair) { \
473 ((*This.*pair.first).assign(&m_obj, &m_realm, m_obj.get_table().get_column_key(pair.second)), ...); \
477 operador& gerenciado=(gerenciado& outro) { \
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 auto zipped = internal::zip_tuples(managed_pointers(), managed_pointers_names()); \
482 if (m_rbool_query) { \
483 auto schema = m_realm.schema().find(OTHER.schema.name); \
484 auto group = m_realm.read_group(); \
485 auto table_ref = group.get_table(schema.table_key()); \
486 std::apply([&](auto& ...pair) { \
487 ((*This.*pair.first).prepare_for_query(&m_realm, table_ref, par.segundo, m_rbool_query), ...); \
490 std::apply([&](auto& ...pair) { \
491 ((*This.*pair.first).assign(&m_obj, &m_realm, m_obj.get_table().get_column_key(pair.second)), ...); \
496 estática gerenciada prepare_for_query(const internal::bridge::realm& r, Realm::rbool* q) { \
499 m.m_rbool_query = q; \
500 auto schema = m.m_realm.schema().find(m.schema.name); \
501 auto group = m.m_realm.read_group(); \
502 auto table_ref = group.get_table(schema.table_key()); \
503 auto zipped = internal::zip_tuples(managed_pointers(), managed_pointers_names()); \
504 std::apply([&m, &table_ref](auto& ...pair) { \
505 ((m.*pair.first).prepare_for_query(&m.m_realm, table_ref, par.second, m.m_rbool_query), ...); \
509 cls detach() const { \
511 auto assign = [&v, this](auto& emparelh) { \
512 v.*(std::decay_t<decltype(pair.first)>::ptr) = ((*isto).*(pair.second)).detach(); \
514 auto zipped = internal::zip_tuples(managed<cls>::schema.ps, managed<cls>::managed_pointers()); \
515 std::apply([&assign](auto& ...pair) { \
516 (atribuir(par), ...); \
520 auto observe(std::function<void(Realm::object_change<managed>&&)>&& fn) { \
521 auto m_object = std::make_shared(m_realm,<internal::bridge::object> m_obj); \
522 auto wrapper = Realm::object_change_callback_wrapper<managed>{ \
523 std::move(fn), esta, m_object}; \
524 return m_object->add_notification_callback( \
525 std::make_shared < Realm::object_change_callback_wrapper<managed>>(wrapper)); \
527 bool is_invalidated() { \
528 return !m_obj.is_valid(); \
531 return m_realm.is_frozen(); \
533 managed<cls> congelar() { \
534 auto Realm = m_realm.freeze(); \
535 return managed<cls>(Realm.import_copy_of(m_obj, Realm); \
537 managed<cls> descongelamento() { \
538 se (is_invalidated()) { \
539 lance std::runtime_error("Objetos inválidos não podem ser descongelados."); \
541 if (!is_frozen()) { \
544 auto thawed_realm = m_realm.thaw(); \
545 retorno gerenciado<cls>(thawed_realm.import_copy_of(m_obj), desconfigurado_realm); \
548 return db(m_realm); \
550 bool operator ==(const managed<cls>& other) const { \
551 if (m_rbool_query != nullptr) \
552 lance std::runtime_error("Este operador de comparação não é válido dentro de `onde'"); \
554 auto& b = outro.m_obj; \
555 se (m_realm != other.m_realm) { \
558 return a.get_table() == b.get_table() \
559 && a.get_key() == b.get_key(); \
561 bool operator ==(const managed<cls*>& other) const { \
562 if (m_rbool_query != nullptr) \
563 lance std::runtime_error("Este operador de comparação não é válido dentro de `onde'"); \
565 auto& b = outro.m_obj; \
566 se (m_realm != outro->m_realm) { \
569 return a.get_table() == b->get_table() \
570 && a.get_key() == b->get_key(); \
572 operador de bool !=(const managed<cls>& other) const { \
573 return !This->operator ==(outro); \
575 bool operator !=(const managed<cls*>& other) const { \
576 return !This->operator ==(outro); \
578 operador de bool < (const managed<cls>& rhs) const { \
579 return m_obj.get_key() < rhs.m_obj.get_key(); \
581 to_json(std::ostream& out) const noexceto { \
582 m_obj.to_json(out); \
585 internal::bridge::obj m_obj; \
586 internal::bridge::realm m_realm; \
587 rbool* m_rbool_query = nullptr; \
588 estrutura de amigo db; \
589 modelo <typename, typename> estrutura de amigo gerenciada; \
590 caixa de estrutura amigável do modelo <typename, typename}; \
591 modelo <typename> user struct :: Realm::thread_safe_reference; \
592 modelo <typename T> amigo rbool* :: Realm::internal::get_rbool(const T&); \
595 struct meta_schema_##cls { \
596 meta_schema_##cls() { \
597 auto s = managed<cls>::schema.to_core_schema(); \
598 auto it = std::find(std::begin(realm::db::schemas), std::end(realm::db::schemas), s); \
599 se (it == std::end(realm::db::schemas)) \
600 realm::db::schemas.push_back(s); \
603 estático inline meta_schema_##cls _meta_schema_##cls{};
605namespace realm::internal {
611 rbool* get_rbool(
const T& o) {
612 return o.m_rbool_query;
Definição: col_key.hpp:28
Definição: macros.hpp:286