1 // automatically generated by the FlatBuffers compiler, do not modify
2
3
4 #ifndef FLATBUFFERS_GENERATED_OPTIONALSCALARS_OPTIONAL_SCALARS_H_
5 #define FLATBUFFERS_GENERATED_OPTIONALSCALARS_OPTIONAL_SCALARS_H_
6
7 #include "flatbuffers/flatbuffers.h"
8
9 namespace optional_scalars {
10
11 struct ScalarStuff;
12 struct ScalarStuffBuilder;
13 struct ScalarStuffT;
14
15 inline const flatbuffers::TypeTable *ScalarStuffTypeTable();
16
17 enum class OptionalByte : int8_t {
18 None = 0,
19 One = 1,
20 Two = 2,
21 MIN = None,
22 MAX = Two
23 };
24
EnumValuesOptionalByte()25 inline const OptionalByte (&EnumValuesOptionalByte())[3] {
26 static const OptionalByte values[] = {
27 OptionalByte::None,
28 OptionalByte::One,
29 OptionalByte::Two
30 };
31 return values;
32 }
33
EnumNamesOptionalByte()34 inline const char * const *EnumNamesOptionalByte() {
35 static const char * const names[4] = {
36 "None",
37 "One",
38 "Two",
39 nullptr
40 };
41 return names;
42 }
43
EnumNameOptionalByte(OptionalByte e)44 inline const char *EnumNameOptionalByte(OptionalByte e) {
45 if (flatbuffers::IsOutRange(e, OptionalByte::None, OptionalByte::Two)) return "";
46 const size_t index = static_cast<size_t>(e);
47 return EnumNamesOptionalByte()[index];
48 }
49
50 struct ScalarStuffT : public flatbuffers::NativeTable {
51 typedef ScalarStuff TableType;
52 int8_t just_i8 = 0;
53 flatbuffers::Optional<int8_t> maybe_i8 = flatbuffers::nullopt;
54 int8_t default_i8 = 42;
55 uint8_t just_u8 = 0;
56 flatbuffers::Optional<uint8_t> maybe_u8 = flatbuffers::nullopt;
57 uint8_t default_u8 = 42;
58 int16_t just_i16 = 0;
59 flatbuffers::Optional<int16_t> maybe_i16 = flatbuffers::nullopt;
60 int16_t default_i16 = 42;
61 uint16_t just_u16 = 0;
62 flatbuffers::Optional<uint16_t> maybe_u16 = flatbuffers::nullopt;
63 uint16_t default_u16 = 42;
64 int32_t just_i32 = 0;
65 flatbuffers::Optional<int32_t> maybe_i32 = flatbuffers::nullopt;
66 int32_t default_i32 = 42;
67 uint32_t just_u32 = 0;
68 flatbuffers::Optional<uint32_t> maybe_u32 = flatbuffers::nullopt;
69 uint32_t default_u32 = 42;
70 int64_t just_i64 = 0;
71 flatbuffers::Optional<int64_t> maybe_i64 = flatbuffers::nullopt;
72 int64_t default_i64 = 42LL;
73 uint64_t just_u64 = 0;
74 flatbuffers::Optional<uint64_t> maybe_u64 = flatbuffers::nullopt;
75 uint64_t default_u64 = 42ULL;
76 float just_f32 = 0.0f;
77 flatbuffers::Optional<float> maybe_f32 = flatbuffers::nullopt;
78 float default_f32 = 42.0f;
79 double just_f64 = 0.0;
80 flatbuffers::Optional<double> maybe_f64 = flatbuffers::nullopt;
81 double default_f64 = 42.0;
82 bool just_bool = false;
83 flatbuffers::Optional<bool> maybe_bool = flatbuffers::nullopt;
84 bool default_bool = true;
85 optional_scalars::OptionalByte just_enum = optional_scalars::OptionalByte::None;
86 flatbuffers::Optional<optional_scalars::OptionalByte> maybe_enum = flatbuffers::nullopt;
87 optional_scalars::OptionalByte default_enum = optional_scalars::OptionalByte::One;
88 };
89
90 struct ScalarStuff FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
91 typedef ScalarStuffT NativeTableType;
92 typedef ScalarStuffBuilder Builder;
93 struct Traits;
MiniReflectTypeTableFLATBUFFERS_FINAL_CLASS94 static const flatbuffers::TypeTable *MiniReflectTypeTable() {
95 return ScalarStuffTypeTable();
96 }
97 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
98 VT_JUST_I8 = 4,
99 VT_MAYBE_I8 = 6,
100 VT_DEFAULT_I8 = 8,
101 VT_JUST_U8 = 10,
102 VT_MAYBE_U8 = 12,
103 VT_DEFAULT_U8 = 14,
104 VT_JUST_I16 = 16,
105 VT_MAYBE_I16 = 18,
106 VT_DEFAULT_I16 = 20,
107 VT_JUST_U16 = 22,
108 VT_MAYBE_U16 = 24,
109 VT_DEFAULT_U16 = 26,
110 VT_JUST_I32 = 28,
111 VT_MAYBE_I32 = 30,
112 VT_DEFAULT_I32 = 32,
113 VT_JUST_U32 = 34,
114 VT_MAYBE_U32 = 36,
115 VT_DEFAULT_U32 = 38,
116 VT_JUST_I64 = 40,
117 VT_MAYBE_I64 = 42,
118 VT_DEFAULT_I64 = 44,
119 VT_JUST_U64 = 46,
120 VT_MAYBE_U64 = 48,
121 VT_DEFAULT_U64 = 50,
122 VT_JUST_F32 = 52,
123 VT_MAYBE_F32 = 54,
124 VT_DEFAULT_F32 = 56,
125 VT_JUST_F64 = 58,
126 VT_MAYBE_F64 = 60,
127 VT_DEFAULT_F64 = 62,
128 VT_JUST_BOOL = 64,
129 VT_MAYBE_BOOL = 66,
130 VT_DEFAULT_BOOL = 68,
131 VT_JUST_ENUM = 70,
132 VT_MAYBE_ENUM = 72,
133 VT_DEFAULT_ENUM = 74
134 };
just_i8FLATBUFFERS_FINAL_CLASS135 int8_t just_i8() const {
136 return GetField<int8_t>(VT_JUST_I8, 0);
137 }
mutate_just_i8FLATBUFFERS_FINAL_CLASS138 bool mutate_just_i8(int8_t _just_i8) {
139 return SetField<int8_t>(VT_JUST_I8, _just_i8, 0);
140 }
maybe_i8FLATBUFFERS_FINAL_CLASS141 flatbuffers::Optional<int8_t> maybe_i8() const {
142 return GetOptional<int8_t, int8_t>(VT_MAYBE_I8);
143 }
mutate_maybe_i8FLATBUFFERS_FINAL_CLASS144 bool mutate_maybe_i8(int8_t _maybe_i8) {
145 return SetField<int8_t>(VT_MAYBE_I8, _maybe_i8);
146 }
default_i8FLATBUFFERS_FINAL_CLASS147 int8_t default_i8() const {
148 return GetField<int8_t>(VT_DEFAULT_I8, 42);
149 }
mutate_default_i8FLATBUFFERS_FINAL_CLASS150 bool mutate_default_i8(int8_t _default_i8) {
151 return SetField<int8_t>(VT_DEFAULT_I8, _default_i8, 42);
152 }
just_u8FLATBUFFERS_FINAL_CLASS153 uint8_t just_u8() const {
154 return GetField<uint8_t>(VT_JUST_U8, 0);
155 }
mutate_just_u8FLATBUFFERS_FINAL_CLASS156 bool mutate_just_u8(uint8_t _just_u8) {
157 return SetField<uint8_t>(VT_JUST_U8, _just_u8, 0);
158 }
maybe_u8FLATBUFFERS_FINAL_CLASS159 flatbuffers::Optional<uint8_t> maybe_u8() const {
160 return GetOptional<uint8_t, uint8_t>(VT_MAYBE_U8);
161 }
mutate_maybe_u8FLATBUFFERS_FINAL_CLASS162 bool mutate_maybe_u8(uint8_t _maybe_u8) {
163 return SetField<uint8_t>(VT_MAYBE_U8, _maybe_u8);
164 }
default_u8FLATBUFFERS_FINAL_CLASS165 uint8_t default_u8() const {
166 return GetField<uint8_t>(VT_DEFAULT_U8, 42);
167 }
mutate_default_u8FLATBUFFERS_FINAL_CLASS168 bool mutate_default_u8(uint8_t _default_u8) {
169 return SetField<uint8_t>(VT_DEFAULT_U8, _default_u8, 42);
170 }
just_i16FLATBUFFERS_FINAL_CLASS171 int16_t just_i16() const {
172 return GetField<int16_t>(VT_JUST_I16, 0);
173 }
mutate_just_i16FLATBUFFERS_FINAL_CLASS174 bool mutate_just_i16(int16_t _just_i16) {
175 return SetField<int16_t>(VT_JUST_I16, _just_i16, 0);
176 }
maybe_i16FLATBUFFERS_FINAL_CLASS177 flatbuffers::Optional<int16_t> maybe_i16() const {
178 return GetOptional<int16_t, int16_t>(VT_MAYBE_I16);
179 }
mutate_maybe_i16FLATBUFFERS_FINAL_CLASS180 bool mutate_maybe_i16(int16_t _maybe_i16) {
181 return SetField<int16_t>(VT_MAYBE_I16, _maybe_i16);
182 }
default_i16FLATBUFFERS_FINAL_CLASS183 int16_t default_i16() const {
184 return GetField<int16_t>(VT_DEFAULT_I16, 42);
185 }
mutate_default_i16FLATBUFFERS_FINAL_CLASS186 bool mutate_default_i16(int16_t _default_i16) {
187 return SetField<int16_t>(VT_DEFAULT_I16, _default_i16, 42);
188 }
just_u16FLATBUFFERS_FINAL_CLASS189 uint16_t just_u16() const {
190 return GetField<uint16_t>(VT_JUST_U16, 0);
191 }
mutate_just_u16FLATBUFFERS_FINAL_CLASS192 bool mutate_just_u16(uint16_t _just_u16) {
193 return SetField<uint16_t>(VT_JUST_U16, _just_u16, 0);
194 }
maybe_u16FLATBUFFERS_FINAL_CLASS195 flatbuffers::Optional<uint16_t> maybe_u16() const {
196 return GetOptional<uint16_t, uint16_t>(VT_MAYBE_U16);
197 }
mutate_maybe_u16FLATBUFFERS_FINAL_CLASS198 bool mutate_maybe_u16(uint16_t _maybe_u16) {
199 return SetField<uint16_t>(VT_MAYBE_U16, _maybe_u16);
200 }
default_u16FLATBUFFERS_FINAL_CLASS201 uint16_t default_u16() const {
202 return GetField<uint16_t>(VT_DEFAULT_U16, 42);
203 }
mutate_default_u16FLATBUFFERS_FINAL_CLASS204 bool mutate_default_u16(uint16_t _default_u16) {
205 return SetField<uint16_t>(VT_DEFAULT_U16, _default_u16, 42);
206 }
just_i32FLATBUFFERS_FINAL_CLASS207 int32_t just_i32() const {
208 return GetField<int32_t>(VT_JUST_I32, 0);
209 }
mutate_just_i32FLATBUFFERS_FINAL_CLASS210 bool mutate_just_i32(int32_t _just_i32) {
211 return SetField<int32_t>(VT_JUST_I32, _just_i32, 0);
212 }
maybe_i32FLATBUFFERS_FINAL_CLASS213 flatbuffers::Optional<int32_t> maybe_i32() const {
214 return GetOptional<int32_t, int32_t>(VT_MAYBE_I32);
215 }
mutate_maybe_i32FLATBUFFERS_FINAL_CLASS216 bool mutate_maybe_i32(int32_t _maybe_i32) {
217 return SetField<int32_t>(VT_MAYBE_I32, _maybe_i32);
218 }
default_i32FLATBUFFERS_FINAL_CLASS219 int32_t default_i32() const {
220 return GetField<int32_t>(VT_DEFAULT_I32, 42);
221 }
mutate_default_i32FLATBUFFERS_FINAL_CLASS222 bool mutate_default_i32(int32_t _default_i32) {
223 return SetField<int32_t>(VT_DEFAULT_I32, _default_i32, 42);
224 }
just_u32FLATBUFFERS_FINAL_CLASS225 uint32_t just_u32() const {
226 return GetField<uint32_t>(VT_JUST_U32, 0);
227 }
mutate_just_u32FLATBUFFERS_FINAL_CLASS228 bool mutate_just_u32(uint32_t _just_u32) {
229 return SetField<uint32_t>(VT_JUST_U32, _just_u32, 0);
230 }
maybe_u32FLATBUFFERS_FINAL_CLASS231 flatbuffers::Optional<uint32_t> maybe_u32() const {
232 return GetOptional<uint32_t, uint32_t>(VT_MAYBE_U32);
233 }
mutate_maybe_u32FLATBUFFERS_FINAL_CLASS234 bool mutate_maybe_u32(uint32_t _maybe_u32) {
235 return SetField<uint32_t>(VT_MAYBE_U32, _maybe_u32);
236 }
default_u32FLATBUFFERS_FINAL_CLASS237 uint32_t default_u32() const {
238 return GetField<uint32_t>(VT_DEFAULT_U32, 42);
239 }
mutate_default_u32FLATBUFFERS_FINAL_CLASS240 bool mutate_default_u32(uint32_t _default_u32) {
241 return SetField<uint32_t>(VT_DEFAULT_U32, _default_u32, 42);
242 }
just_i64FLATBUFFERS_FINAL_CLASS243 int64_t just_i64() const {
244 return GetField<int64_t>(VT_JUST_I64, 0);
245 }
mutate_just_i64FLATBUFFERS_FINAL_CLASS246 bool mutate_just_i64(int64_t _just_i64) {
247 return SetField<int64_t>(VT_JUST_I64, _just_i64, 0);
248 }
maybe_i64FLATBUFFERS_FINAL_CLASS249 flatbuffers::Optional<int64_t> maybe_i64() const {
250 return GetOptional<int64_t, int64_t>(VT_MAYBE_I64);
251 }
mutate_maybe_i64FLATBUFFERS_FINAL_CLASS252 bool mutate_maybe_i64(int64_t _maybe_i64) {
253 return SetField<int64_t>(VT_MAYBE_I64, _maybe_i64);
254 }
default_i64FLATBUFFERS_FINAL_CLASS255 int64_t default_i64() const {
256 return GetField<int64_t>(VT_DEFAULT_I64, 42LL);
257 }
mutate_default_i64FLATBUFFERS_FINAL_CLASS258 bool mutate_default_i64(int64_t _default_i64) {
259 return SetField<int64_t>(VT_DEFAULT_I64, _default_i64, 42LL);
260 }
just_u64FLATBUFFERS_FINAL_CLASS261 uint64_t just_u64() const {
262 return GetField<uint64_t>(VT_JUST_U64, 0);
263 }
mutate_just_u64FLATBUFFERS_FINAL_CLASS264 bool mutate_just_u64(uint64_t _just_u64) {
265 return SetField<uint64_t>(VT_JUST_U64, _just_u64, 0);
266 }
maybe_u64FLATBUFFERS_FINAL_CLASS267 flatbuffers::Optional<uint64_t> maybe_u64() const {
268 return GetOptional<uint64_t, uint64_t>(VT_MAYBE_U64);
269 }
mutate_maybe_u64FLATBUFFERS_FINAL_CLASS270 bool mutate_maybe_u64(uint64_t _maybe_u64) {
271 return SetField<uint64_t>(VT_MAYBE_U64, _maybe_u64);
272 }
default_u64FLATBUFFERS_FINAL_CLASS273 uint64_t default_u64() const {
274 return GetField<uint64_t>(VT_DEFAULT_U64, 42ULL);
275 }
mutate_default_u64FLATBUFFERS_FINAL_CLASS276 bool mutate_default_u64(uint64_t _default_u64) {
277 return SetField<uint64_t>(VT_DEFAULT_U64, _default_u64, 42ULL);
278 }
just_f32FLATBUFFERS_FINAL_CLASS279 float just_f32() const {
280 return GetField<float>(VT_JUST_F32, 0.0f);
281 }
mutate_just_f32FLATBUFFERS_FINAL_CLASS282 bool mutate_just_f32(float _just_f32) {
283 return SetField<float>(VT_JUST_F32, _just_f32, 0.0f);
284 }
maybe_f32FLATBUFFERS_FINAL_CLASS285 flatbuffers::Optional<float> maybe_f32() const {
286 return GetOptional<float, float>(VT_MAYBE_F32);
287 }
mutate_maybe_f32FLATBUFFERS_FINAL_CLASS288 bool mutate_maybe_f32(float _maybe_f32) {
289 return SetField<float>(VT_MAYBE_F32, _maybe_f32);
290 }
default_f32FLATBUFFERS_FINAL_CLASS291 float default_f32() const {
292 return GetField<float>(VT_DEFAULT_F32, 42.0f);
293 }
mutate_default_f32FLATBUFFERS_FINAL_CLASS294 bool mutate_default_f32(float _default_f32) {
295 return SetField<float>(VT_DEFAULT_F32, _default_f32, 42.0f);
296 }
just_f64FLATBUFFERS_FINAL_CLASS297 double just_f64() const {
298 return GetField<double>(VT_JUST_F64, 0.0);
299 }
mutate_just_f64FLATBUFFERS_FINAL_CLASS300 bool mutate_just_f64(double _just_f64) {
301 return SetField<double>(VT_JUST_F64, _just_f64, 0.0);
302 }
maybe_f64FLATBUFFERS_FINAL_CLASS303 flatbuffers::Optional<double> maybe_f64() const {
304 return GetOptional<double, double>(VT_MAYBE_F64);
305 }
mutate_maybe_f64FLATBUFFERS_FINAL_CLASS306 bool mutate_maybe_f64(double _maybe_f64) {
307 return SetField<double>(VT_MAYBE_F64, _maybe_f64);
308 }
default_f64FLATBUFFERS_FINAL_CLASS309 double default_f64() const {
310 return GetField<double>(VT_DEFAULT_F64, 42.0);
311 }
mutate_default_f64FLATBUFFERS_FINAL_CLASS312 bool mutate_default_f64(double _default_f64) {
313 return SetField<double>(VT_DEFAULT_F64, _default_f64, 42.0);
314 }
just_boolFLATBUFFERS_FINAL_CLASS315 bool just_bool() const {
316 return GetField<uint8_t>(VT_JUST_BOOL, 0) != 0;
317 }
mutate_just_boolFLATBUFFERS_FINAL_CLASS318 bool mutate_just_bool(bool _just_bool) {
319 return SetField<uint8_t>(VT_JUST_BOOL, static_cast<uint8_t>(_just_bool), 0);
320 }
maybe_boolFLATBUFFERS_FINAL_CLASS321 flatbuffers::Optional<bool> maybe_bool() const {
322 return GetOptional<uint8_t, bool>(VT_MAYBE_BOOL);
323 }
mutate_maybe_boolFLATBUFFERS_FINAL_CLASS324 bool mutate_maybe_bool(bool _maybe_bool) {
325 return SetField<uint8_t>(VT_MAYBE_BOOL, static_cast<uint8_t>(_maybe_bool));
326 }
default_boolFLATBUFFERS_FINAL_CLASS327 bool default_bool() const {
328 return GetField<uint8_t>(VT_DEFAULT_BOOL, 1) != 0;
329 }
mutate_default_boolFLATBUFFERS_FINAL_CLASS330 bool mutate_default_bool(bool _default_bool) {
331 return SetField<uint8_t>(VT_DEFAULT_BOOL, static_cast<uint8_t>(_default_bool), 1);
332 }
just_enumFLATBUFFERS_FINAL_CLASS333 optional_scalars::OptionalByte just_enum() const {
334 return static_cast<optional_scalars::OptionalByte>(GetField<int8_t>(VT_JUST_ENUM, 0));
335 }
mutate_just_enumFLATBUFFERS_FINAL_CLASS336 bool mutate_just_enum(optional_scalars::OptionalByte _just_enum) {
337 return SetField<int8_t>(VT_JUST_ENUM, static_cast<int8_t>(_just_enum), 0);
338 }
maybe_enumFLATBUFFERS_FINAL_CLASS339 flatbuffers::Optional<optional_scalars::OptionalByte> maybe_enum() const {
340 return GetOptional<int8_t, optional_scalars::OptionalByte>(VT_MAYBE_ENUM);
341 }
mutate_maybe_enumFLATBUFFERS_FINAL_CLASS342 bool mutate_maybe_enum(optional_scalars::OptionalByte _maybe_enum) {
343 return SetField<int8_t>(VT_MAYBE_ENUM, static_cast<int8_t>(_maybe_enum));
344 }
default_enumFLATBUFFERS_FINAL_CLASS345 optional_scalars::OptionalByte default_enum() const {
346 return static_cast<optional_scalars::OptionalByte>(GetField<int8_t>(VT_DEFAULT_ENUM, 1));
347 }
mutate_default_enumFLATBUFFERS_FINAL_CLASS348 bool mutate_default_enum(optional_scalars::OptionalByte _default_enum) {
349 return SetField<int8_t>(VT_DEFAULT_ENUM, static_cast<int8_t>(_default_enum), 1);
350 }
351 template<size_t Index>
get_fieldFLATBUFFERS_FINAL_CLASS352 auto get_field() const {
353 if constexpr (Index == 0) return just_i8();
354 else if constexpr (Index == 1) return maybe_i8();
355 else if constexpr (Index == 2) return default_i8();
356 else if constexpr (Index == 3) return just_u8();
357 else if constexpr (Index == 4) return maybe_u8();
358 else if constexpr (Index == 5) return default_u8();
359 else if constexpr (Index == 6) return just_i16();
360 else if constexpr (Index == 7) return maybe_i16();
361 else if constexpr (Index == 8) return default_i16();
362 else if constexpr (Index == 9) return just_u16();
363 else if constexpr (Index == 10) return maybe_u16();
364 else if constexpr (Index == 11) return default_u16();
365 else if constexpr (Index == 12) return just_i32();
366 else if constexpr (Index == 13) return maybe_i32();
367 else if constexpr (Index == 14) return default_i32();
368 else if constexpr (Index == 15) return just_u32();
369 else if constexpr (Index == 16) return maybe_u32();
370 else if constexpr (Index == 17) return default_u32();
371 else if constexpr (Index == 18) return just_i64();
372 else if constexpr (Index == 19) return maybe_i64();
373 else if constexpr (Index == 20) return default_i64();
374 else if constexpr (Index == 21) return just_u64();
375 else if constexpr (Index == 22) return maybe_u64();
376 else if constexpr (Index == 23) return default_u64();
377 else if constexpr (Index == 24) return just_f32();
378 else if constexpr (Index == 25) return maybe_f32();
379 else if constexpr (Index == 26) return default_f32();
380 else if constexpr (Index == 27) return just_f64();
381 else if constexpr (Index == 28) return maybe_f64();
382 else if constexpr (Index == 29) return default_f64();
383 else if constexpr (Index == 30) return just_bool();
384 else if constexpr (Index == 31) return maybe_bool();
385 else if constexpr (Index == 32) return default_bool();
386 else if constexpr (Index == 33) return just_enum();
387 else if constexpr (Index == 34) return maybe_enum();
388 else if constexpr (Index == 35) return default_enum();
389 else static_assert(Index != Index, "Invalid Field Index");
390 }
VerifyFLATBUFFERS_FINAL_CLASS391 bool Verify(flatbuffers::Verifier &verifier) const {
392 return VerifyTableStart(verifier) &&
393 VerifyField<int8_t>(verifier, VT_JUST_I8) &&
394 VerifyField<int8_t>(verifier, VT_MAYBE_I8) &&
395 VerifyField<int8_t>(verifier, VT_DEFAULT_I8) &&
396 VerifyField<uint8_t>(verifier, VT_JUST_U8) &&
397 VerifyField<uint8_t>(verifier, VT_MAYBE_U8) &&
398 VerifyField<uint8_t>(verifier, VT_DEFAULT_U8) &&
399 VerifyField<int16_t>(verifier, VT_JUST_I16) &&
400 VerifyField<int16_t>(verifier, VT_MAYBE_I16) &&
401 VerifyField<int16_t>(verifier, VT_DEFAULT_I16) &&
402 VerifyField<uint16_t>(verifier, VT_JUST_U16) &&
403 VerifyField<uint16_t>(verifier, VT_MAYBE_U16) &&
404 VerifyField<uint16_t>(verifier, VT_DEFAULT_U16) &&
405 VerifyField<int32_t>(verifier, VT_JUST_I32) &&
406 VerifyField<int32_t>(verifier, VT_MAYBE_I32) &&
407 VerifyField<int32_t>(verifier, VT_DEFAULT_I32) &&
408 VerifyField<uint32_t>(verifier, VT_JUST_U32) &&
409 VerifyField<uint32_t>(verifier, VT_MAYBE_U32) &&
410 VerifyField<uint32_t>(verifier, VT_DEFAULT_U32) &&
411 VerifyField<int64_t>(verifier, VT_JUST_I64) &&
412 VerifyField<int64_t>(verifier, VT_MAYBE_I64) &&
413 VerifyField<int64_t>(verifier, VT_DEFAULT_I64) &&
414 VerifyField<uint64_t>(verifier, VT_JUST_U64) &&
415 VerifyField<uint64_t>(verifier, VT_MAYBE_U64) &&
416 VerifyField<uint64_t>(verifier, VT_DEFAULT_U64) &&
417 VerifyField<float>(verifier, VT_JUST_F32) &&
418 VerifyField<float>(verifier, VT_MAYBE_F32) &&
419 VerifyField<float>(verifier, VT_DEFAULT_F32) &&
420 VerifyField<double>(verifier, VT_JUST_F64) &&
421 VerifyField<double>(verifier, VT_MAYBE_F64) &&
422 VerifyField<double>(verifier, VT_DEFAULT_F64) &&
423 VerifyField<uint8_t>(verifier, VT_JUST_BOOL) &&
424 VerifyField<uint8_t>(verifier, VT_MAYBE_BOOL) &&
425 VerifyField<uint8_t>(verifier, VT_DEFAULT_BOOL) &&
426 VerifyField<int8_t>(verifier, VT_JUST_ENUM) &&
427 VerifyField<int8_t>(verifier, VT_MAYBE_ENUM) &&
428 VerifyField<int8_t>(verifier, VT_DEFAULT_ENUM) &&
429 verifier.EndTable();
430 }
431 ScalarStuffT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const;
432 void UnPackTo(ScalarStuffT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const;
433 static flatbuffers::Offset<ScalarStuff> Pack(flatbuffers::FlatBufferBuilder &_fbb, const ScalarStuffT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr);
434 };
435
436 struct ScalarStuffBuilder {
437 typedef ScalarStuff Table;
438 flatbuffers::FlatBufferBuilder &fbb_;
439 flatbuffers::uoffset_t start_;
add_just_i8ScalarStuffBuilder440 void add_just_i8(int8_t just_i8) {
441 fbb_.AddElement<int8_t>(ScalarStuff::VT_JUST_I8, just_i8, 0);
442 }
add_maybe_i8ScalarStuffBuilder443 void add_maybe_i8(int8_t maybe_i8) {
444 fbb_.AddElement<int8_t>(ScalarStuff::VT_MAYBE_I8, maybe_i8);
445 }
add_default_i8ScalarStuffBuilder446 void add_default_i8(int8_t default_i8) {
447 fbb_.AddElement<int8_t>(ScalarStuff::VT_DEFAULT_I8, default_i8, 42);
448 }
add_just_u8ScalarStuffBuilder449 void add_just_u8(uint8_t just_u8) {
450 fbb_.AddElement<uint8_t>(ScalarStuff::VT_JUST_U8, just_u8, 0);
451 }
add_maybe_u8ScalarStuffBuilder452 void add_maybe_u8(uint8_t maybe_u8) {
453 fbb_.AddElement<uint8_t>(ScalarStuff::VT_MAYBE_U8, maybe_u8);
454 }
add_default_u8ScalarStuffBuilder455 void add_default_u8(uint8_t default_u8) {
456 fbb_.AddElement<uint8_t>(ScalarStuff::VT_DEFAULT_U8, default_u8, 42);
457 }
add_just_i16ScalarStuffBuilder458 void add_just_i16(int16_t just_i16) {
459 fbb_.AddElement<int16_t>(ScalarStuff::VT_JUST_I16, just_i16, 0);
460 }
add_maybe_i16ScalarStuffBuilder461 void add_maybe_i16(int16_t maybe_i16) {
462 fbb_.AddElement<int16_t>(ScalarStuff::VT_MAYBE_I16, maybe_i16);
463 }
add_default_i16ScalarStuffBuilder464 void add_default_i16(int16_t default_i16) {
465 fbb_.AddElement<int16_t>(ScalarStuff::VT_DEFAULT_I16, default_i16, 42);
466 }
add_just_u16ScalarStuffBuilder467 void add_just_u16(uint16_t just_u16) {
468 fbb_.AddElement<uint16_t>(ScalarStuff::VT_JUST_U16, just_u16, 0);
469 }
add_maybe_u16ScalarStuffBuilder470 void add_maybe_u16(uint16_t maybe_u16) {
471 fbb_.AddElement<uint16_t>(ScalarStuff::VT_MAYBE_U16, maybe_u16);
472 }
add_default_u16ScalarStuffBuilder473 void add_default_u16(uint16_t default_u16) {
474 fbb_.AddElement<uint16_t>(ScalarStuff::VT_DEFAULT_U16, default_u16, 42);
475 }
add_just_i32ScalarStuffBuilder476 void add_just_i32(int32_t just_i32) {
477 fbb_.AddElement<int32_t>(ScalarStuff::VT_JUST_I32, just_i32, 0);
478 }
add_maybe_i32ScalarStuffBuilder479 void add_maybe_i32(int32_t maybe_i32) {
480 fbb_.AddElement<int32_t>(ScalarStuff::VT_MAYBE_I32, maybe_i32);
481 }
add_default_i32ScalarStuffBuilder482 void add_default_i32(int32_t default_i32) {
483 fbb_.AddElement<int32_t>(ScalarStuff::VT_DEFAULT_I32, default_i32, 42);
484 }
add_just_u32ScalarStuffBuilder485 void add_just_u32(uint32_t just_u32) {
486 fbb_.AddElement<uint32_t>(ScalarStuff::VT_JUST_U32, just_u32, 0);
487 }
add_maybe_u32ScalarStuffBuilder488 void add_maybe_u32(uint32_t maybe_u32) {
489 fbb_.AddElement<uint32_t>(ScalarStuff::VT_MAYBE_U32, maybe_u32);
490 }
add_default_u32ScalarStuffBuilder491 void add_default_u32(uint32_t default_u32) {
492 fbb_.AddElement<uint32_t>(ScalarStuff::VT_DEFAULT_U32, default_u32, 42);
493 }
add_just_i64ScalarStuffBuilder494 void add_just_i64(int64_t just_i64) {
495 fbb_.AddElement<int64_t>(ScalarStuff::VT_JUST_I64, just_i64, 0);
496 }
add_maybe_i64ScalarStuffBuilder497 void add_maybe_i64(int64_t maybe_i64) {
498 fbb_.AddElement<int64_t>(ScalarStuff::VT_MAYBE_I64, maybe_i64);
499 }
add_default_i64ScalarStuffBuilder500 void add_default_i64(int64_t default_i64) {
501 fbb_.AddElement<int64_t>(ScalarStuff::VT_DEFAULT_I64, default_i64, 42LL);
502 }
add_just_u64ScalarStuffBuilder503 void add_just_u64(uint64_t just_u64) {
504 fbb_.AddElement<uint64_t>(ScalarStuff::VT_JUST_U64, just_u64, 0);
505 }
add_maybe_u64ScalarStuffBuilder506 void add_maybe_u64(uint64_t maybe_u64) {
507 fbb_.AddElement<uint64_t>(ScalarStuff::VT_MAYBE_U64, maybe_u64);
508 }
add_default_u64ScalarStuffBuilder509 void add_default_u64(uint64_t default_u64) {
510 fbb_.AddElement<uint64_t>(ScalarStuff::VT_DEFAULT_U64, default_u64, 42ULL);
511 }
add_just_f32ScalarStuffBuilder512 void add_just_f32(float just_f32) {
513 fbb_.AddElement<float>(ScalarStuff::VT_JUST_F32, just_f32, 0.0f);
514 }
add_maybe_f32ScalarStuffBuilder515 void add_maybe_f32(float maybe_f32) {
516 fbb_.AddElement<float>(ScalarStuff::VT_MAYBE_F32, maybe_f32);
517 }
add_default_f32ScalarStuffBuilder518 void add_default_f32(float default_f32) {
519 fbb_.AddElement<float>(ScalarStuff::VT_DEFAULT_F32, default_f32, 42.0f);
520 }
add_just_f64ScalarStuffBuilder521 void add_just_f64(double just_f64) {
522 fbb_.AddElement<double>(ScalarStuff::VT_JUST_F64, just_f64, 0.0);
523 }
add_maybe_f64ScalarStuffBuilder524 void add_maybe_f64(double maybe_f64) {
525 fbb_.AddElement<double>(ScalarStuff::VT_MAYBE_F64, maybe_f64);
526 }
add_default_f64ScalarStuffBuilder527 void add_default_f64(double default_f64) {
528 fbb_.AddElement<double>(ScalarStuff::VT_DEFAULT_F64, default_f64, 42.0);
529 }
add_just_boolScalarStuffBuilder530 void add_just_bool(bool just_bool) {
531 fbb_.AddElement<uint8_t>(ScalarStuff::VT_JUST_BOOL, static_cast<uint8_t>(just_bool), 0);
532 }
add_maybe_boolScalarStuffBuilder533 void add_maybe_bool(bool maybe_bool) {
534 fbb_.AddElement<uint8_t>(ScalarStuff::VT_MAYBE_BOOL, static_cast<uint8_t>(maybe_bool));
535 }
add_default_boolScalarStuffBuilder536 void add_default_bool(bool default_bool) {
537 fbb_.AddElement<uint8_t>(ScalarStuff::VT_DEFAULT_BOOL, static_cast<uint8_t>(default_bool), 1);
538 }
add_just_enumScalarStuffBuilder539 void add_just_enum(optional_scalars::OptionalByte just_enum) {
540 fbb_.AddElement<int8_t>(ScalarStuff::VT_JUST_ENUM, static_cast<int8_t>(just_enum), 0);
541 }
add_maybe_enumScalarStuffBuilder542 void add_maybe_enum(optional_scalars::OptionalByte maybe_enum) {
543 fbb_.AddElement<int8_t>(ScalarStuff::VT_MAYBE_ENUM, static_cast<int8_t>(maybe_enum));
544 }
add_default_enumScalarStuffBuilder545 void add_default_enum(optional_scalars::OptionalByte default_enum) {
546 fbb_.AddElement<int8_t>(ScalarStuff::VT_DEFAULT_ENUM, static_cast<int8_t>(default_enum), 1);
547 }
ScalarStuffBuilderScalarStuffBuilder548 explicit ScalarStuffBuilder(flatbuffers::FlatBufferBuilder &_fbb)
549 : fbb_(_fbb) {
550 start_ = fbb_.StartTable();
551 }
FinishScalarStuffBuilder552 flatbuffers::Offset<ScalarStuff> Finish() {
553 const auto end = fbb_.EndTable(start_);
554 auto o = flatbuffers::Offset<ScalarStuff>(end);
555 return o;
556 }
557 };
558
559 inline flatbuffers::Offset<ScalarStuff> CreateScalarStuff(
560 flatbuffers::FlatBufferBuilder &_fbb,
561 int8_t just_i8 = 0,
562 flatbuffers::Optional<int8_t> maybe_i8 = flatbuffers::nullopt,
563 int8_t default_i8 = 42,
564 uint8_t just_u8 = 0,
565 flatbuffers::Optional<uint8_t> maybe_u8 = flatbuffers::nullopt,
566 uint8_t default_u8 = 42,
567 int16_t just_i16 = 0,
568 flatbuffers::Optional<int16_t> maybe_i16 = flatbuffers::nullopt,
569 int16_t default_i16 = 42,
570 uint16_t just_u16 = 0,
571 flatbuffers::Optional<uint16_t> maybe_u16 = flatbuffers::nullopt,
572 uint16_t default_u16 = 42,
573 int32_t just_i32 = 0,
574 flatbuffers::Optional<int32_t> maybe_i32 = flatbuffers::nullopt,
575 int32_t default_i32 = 42,
576 uint32_t just_u32 = 0,
577 flatbuffers::Optional<uint32_t> maybe_u32 = flatbuffers::nullopt,
578 uint32_t default_u32 = 42,
579 int64_t just_i64 = 0,
580 flatbuffers::Optional<int64_t> maybe_i64 = flatbuffers::nullopt,
581 int64_t default_i64 = 42LL,
582 uint64_t just_u64 = 0,
583 flatbuffers::Optional<uint64_t> maybe_u64 = flatbuffers::nullopt,
584 uint64_t default_u64 = 42ULL,
585 float just_f32 = 0.0f,
586 flatbuffers::Optional<float> maybe_f32 = flatbuffers::nullopt,
587 float default_f32 = 42.0f,
588 double just_f64 = 0.0,
589 flatbuffers::Optional<double> maybe_f64 = flatbuffers::nullopt,
590 double default_f64 = 42.0,
591 bool just_bool = false,
592 flatbuffers::Optional<bool> maybe_bool = flatbuffers::nullopt,
593 bool default_bool = true,
594 optional_scalars::OptionalByte just_enum = optional_scalars::OptionalByte::None,
595 flatbuffers::Optional<optional_scalars::OptionalByte> maybe_enum = flatbuffers::nullopt,
596 optional_scalars::OptionalByte default_enum = optional_scalars::OptionalByte::One) {
597 ScalarStuffBuilder builder_(_fbb);
598 builder_.add_default_f64(default_f64);
599 if(maybe_f64) { builder_.add_maybe_f64(*maybe_f64); }
600 builder_.add_just_f64(just_f64);
601 builder_.add_default_u64(default_u64);
602 if(maybe_u64) { builder_.add_maybe_u64(*maybe_u64); }
603 builder_.add_just_u64(just_u64);
604 builder_.add_default_i64(default_i64);
605 if(maybe_i64) { builder_.add_maybe_i64(*maybe_i64); }
606 builder_.add_just_i64(just_i64);
607 builder_.add_default_f32(default_f32);
608 if(maybe_f32) { builder_.add_maybe_f32(*maybe_f32); }
609 builder_.add_just_f32(just_f32);
610 builder_.add_default_u32(default_u32);
611 if(maybe_u32) { builder_.add_maybe_u32(*maybe_u32); }
612 builder_.add_just_u32(just_u32);
613 builder_.add_default_i32(default_i32);
614 if(maybe_i32) { builder_.add_maybe_i32(*maybe_i32); }
615 builder_.add_just_i32(just_i32);
616 builder_.add_default_u16(default_u16);
617 if(maybe_u16) { builder_.add_maybe_u16(*maybe_u16); }
618 builder_.add_just_u16(just_u16);
619 builder_.add_default_i16(default_i16);
620 if(maybe_i16) { builder_.add_maybe_i16(*maybe_i16); }
621 builder_.add_just_i16(just_i16);
622 builder_.add_default_enum(default_enum);
623 if(maybe_enum) { builder_.add_maybe_enum(*maybe_enum); }
624 builder_.add_just_enum(just_enum);
625 builder_.add_default_bool(default_bool);
626 if(maybe_bool) { builder_.add_maybe_bool(*maybe_bool); }
627 builder_.add_just_bool(just_bool);
628 builder_.add_default_u8(default_u8);
629 if(maybe_u8) { builder_.add_maybe_u8(*maybe_u8); }
630 builder_.add_just_u8(just_u8);
631 builder_.add_default_i8(default_i8);
632 if(maybe_i8) { builder_.add_maybe_i8(*maybe_i8); }
633 builder_.add_just_i8(just_i8);
634 return builder_.Finish();
635 }
636
637 struct ScalarStuff::Traits {
638 using type = ScalarStuff;
639 static auto constexpr Create = CreateScalarStuff;
640 static constexpr auto name = "ScalarStuff";
641 static constexpr auto fully_qualified_name = "optional_scalars.ScalarStuff";
642 static constexpr std::array<const char *, 36> field_names = {
643 "just_i8",
644 "maybe_i8",
645 "default_i8",
646 "just_u8",
647 "maybe_u8",
648 "default_u8",
649 "just_i16",
650 "maybe_i16",
651 "default_i16",
652 "just_u16",
653 "maybe_u16",
654 "default_u16",
655 "just_i32",
656 "maybe_i32",
657 "default_i32",
658 "just_u32",
659 "maybe_u32",
660 "default_u32",
661 "just_i64",
662 "maybe_i64",
663 "default_i64",
664 "just_u64",
665 "maybe_u64",
666 "default_u64",
667 "just_f32",
668 "maybe_f32",
669 "default_f32",
670 "just_f64",
671 "maybe_f64",
672 "default_f64",
673 "just_bool",
674 "maybe_bool",
675 "default_bool",
676 "just_enum",
677 "maybe_enum",
678 "default_enum"
679 };
680 template<size_t Index>
681 using FieldType = decltype(std::declval<type>().get_field<Index>());
682 static constexpr size_t fields_number = 36;
683 };
684
685 flatbuffers::Offset<ScalarStuff> CreateScalarStuff(flatbuffers::FlatBufferBuilder &_fbb, const ScalarStuffT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr);
686
UnPack(const flatbuffers::resolver_function_t * _resolver)687 inline ScalarStuffT *ScalarStuff::UnPack(const flatbuffers::resolver_function_t *_resolver) const {
688 auto _o = std::make_unique<ScalarStuffT>();
689 UnPackTo(_o.get(), _resolver);
690 return _o.release();
691 }
692
UnPackTo(ScalarStuffT * _o,const flatbuffers::resolver_function_t * _resolver)693 inline void ScalarStuff::UnPackTo(ScalarStuffT *_o, const flatbuffers::resolver_function_t *_resolver) const {
694 (void)_o;
695 (void)_resolver;
696 { auto _e = just_i8(); _o->just_i8 = _e; }
697 { auto _e = maybe_i8(); _o->maybe_i8 = _e; }
698 { auto _e = default_i8(); _o->default_i8 = _e; }
699 { auto _e = just_u8(); _o->just_u8 = _e; }
700 { auto _e = maybe_u8(); _o->maybe_u8 = _e; }
701 { auto _e = default_u8(); _o->default_u8 = _e; }
702 { auto _e = just_i16(); _o->just_i16 = _e; }
703 { auto _e = maybe_i16(); _o->maybe_i16 = _e; }
704 { auto _e = default_i16(); _o->default_i16 = _e; }
705 { auto _e = just_u16(); _o->just_u16 = _e; }
706 { auto _e = maybe_u16(); _o->maybe_u16 = _e; }
707 { auto _e = default_u16(); _o->default_u16 = _e; }
708 { auto _e = just_i32(); _o->just_i32 = _e; }
709 { auto _e = maybe_i32(); _o->maybe_i32 = _e; }
710 { auto _e = default_i32(); _o->default_i32 = _e; }
711 { auto _e = just_u32(); _o->just_u32 = _e; }
712 { auto _e = maybe_u32(); _o->maybe_u32 = _e; }
713 { auto _e = default_u32(); _o->default_u32 = _e; }
714 { auto _e = just_i64(); _o->just_i64 = _e; }
715 { auto _e = maybe_i64(); _o->maybe_i64 = _e; }
716 { auto _e = default_i64(); _o->default_i64 = _e; }
717 { auto _e = just_u64(); _o->just_u64 = _e; }
718 { auto _e = maybe_u64(); _o->maybe_u64 = _e; }
719 { auto _e = default_u64(); _o->default_u64 = _e; }
720 { auto _e = just_f32(); _o->just_f32 = _e; }
721 { auto _e = maybe_f32(); _o->maybe_f32 = _e; }
722 { auto _e = default_f32(); _o->default_f32 = _e; }
723 { auto _e = just_f64(); _o->just_f64 = _e; }
724 { auto _e = maybe_f64(); _o->maybe_f64 = _e; }
725 { auto _e = default_f64(); _o->default_f64 = _e; }
726 { auto _e = just_bool(); _o->just_bool = _e; }
727 { auto _e = maybe_bool(); _o->maybe_bool = _e; }
728 { auto _e = default_bool(); _o->default_bool = _e; }
729 { auto _e = just_enum(); _o->just_enum = _e; }
730 { auto _e = maybe_enum(); _o->maybe_enum = _e; }
731 { auto _e = default_enum(); _o->default_enum = _e; }
732 }
733
Pack(flatbuffers::FlatBufferBuilder & _fbb,const ScalarStuffT * _o,const flatbuffers::rehasher_function_t * _rehasher)734 inline flatbuffers::Offset<ScalarStuff> ScalarStuff::Pack(flatbuffers::FlatBufferBuilder &_fbb, const ScalarStuffT* _o, const flatbuffers::rehasher_function_t *_rehasher) {
735 return CreateScalarStuff(_fbb, _o, _rehasher);
736 }
737
CreateScalarStuff(flatbuffers::FlatBufferBuilder & _fbb,const ScalarStuffT * _o,const flatbuffers::rehasher_function_t * _rehasher)738 inline flatbuffers::Offset<ScalarStuff> CreateScalarStuff(flatbuffers::FlatBufferBuilder &_fbb, const ScalarStuffT *_o, const flatbuffers::rehasher_function_t *_rehasher) {
739 (void)_rehasher;
740 (void)_o;
741 struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const ScalarStuffT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va;
742 auto _just_i8 = _o->just_i8;
743 auto _maybe_i8 = _o->maybe_i8;
744 auto _default_i8 = _o->default_i8;
745 auto _just_u8 = _o->just_u8;
746 auto _maybe_u8 = _o->maybe_u8;
747 auto _default_u8 = _o->default_u8;
748 auto _just_i16 = _o->just_i16;
749 auto _maybe_i16 = _o->maybe_i16;
750 auto _default_i16 = _o->default_i16;
751 auto _just_u16 = _o->just_u16;
752 auto _maybe_u16 = _o->maybe_u16;
753 auto _default_u16 = _o->default_u16;
754 auto _just_i32 = _o->just_i32;
755 auto _maybe_i32 = _o->maybe_i32;
756 auto _default_i32 = _o->default_i32;
757 auto _just_u32 = _o->just_u32;
758 auto _maybe_u32 = _o->maybe_u32;
759 auto _default_u32 = _o->default_u32;
760 auto _just_i64 = _o->just_i64;
761 auto _maybe_i64 = _o->maybe_i64;
762 auto _default_i64 = _o->default_i64;
763 auto _just_u64 = _o->just_u64;
764 auto _maybe_u64 = _o->maybe_u64;
765 auto _default_u64 = _o->default_u64;
766 auto _just_f32 = _o->just_f32;
767 auto _maybe_f32 = _o->maybe_f32;
768 auto _default_f32 = _o->default_f32;
769 auto _just_f64 = _o->just_f64;
770 auto _maybe_f64 = _o->maybe_f64;
771 auto _default_f64 = _o->default_f64;
772 auto _just_bool = _o->just_bool;
773 auto _maybe_bool = _o->maybe_bool;
774 auto _default_bool = _o->default_bool;
775 auto _just_enum = _o->just_enum;
776 auto _maybe_enum = _o->maybe_enum;
777 auto _default_enum = _o->default_enum;
778 return optional_scalars::CreateScalarStuff(
779 _fbb,
780 _just_i8,
781 _maybe_i8,
782 _default_i8,
783 _just_u8,
784 _maybe_u8,
785 _default_u8,
786 _just_i16,
787 _maybe_i16,
788 _default_i16,
789 _just_u16,
790 _maybe_u16,
791 _default_u16,
792 _just_i32,
793 _maybe_i32,
794 _default_i32,
795 _just_u32,
796 _maybe_u32,
797 _default_u32,
798 _just_i64,
799 _maybe_i64,
800 _default_i64,
801 _just_u64,
802 _maybe_u64,
803 _default_u64,
804 _just_f32,
805 _maybe_f32,
806 _default_f32,
807 _just_f64,
808 _maybe_f64,
809 _default_f64,
810 _just_bool,
811 _maybe_bool,
812 _default_bool,
813 _just_enum,
814 _maybe_enum,
815 _default_enum);
816 }
817
OptionalByteTypeTable()818 inline const flatbuffers::TypeTable *OptionalByteTypeTable() {
819 static const flatbuffers::TypeCode type_codes[] = {
820 { flatbuffers::ET_CHAR, 0, 0 },
821 { flatbuffers::ET_CHAR, 0, 0 },
822 { flatbuffers::ET_CHAR, 0, 0 }
823 };
824 static const flatbuffers::TypeFunction type_refs[] = {
825 optional_scalars::OptionalByteTypeTable
826 };
827 static const char * const names[] = {
828 "None",
829 "One",
830 "Two"
831 };
832 static const flatbuffers::TypeTable tt = {
833 flatbuffers::ST_ENUM, 3, type_codes, type_refs, nullptr, nullptr, names
834 };
835 return &tt;
836 }
837
ScalarStuffTypeTable()838 inline const flatbuffers::TypeTable *ScalarStuffTypeTable() {
839 static const flatbuffers::TypeCode type_codes[] = {
840 { flatbuffers::ET_CHAR, 0, -1 },
841 { flatbuffers::ET_CHAR, 0, -1 },
842 { flatbuffers::ET_CHAR, 0, -1 },
843 { flatbuffers::ET_UCHAR, 0, -1 },
844 { flatbuffers::ET_UCHAR, 0, -1 },
845 { flatbuffers::ET_UCHAR, 0, -1 },
846 { flatbuffers::ET_SHORT, 0, -1 },
847 { flatbuffers::ET_SHORT, 0, -1 },
848 { flatbuffers::ET_SHORT, 0, -1 },
849 { flatbuffers::ET_USHORT, 0, -1 },
850 { flatbuffers::ET_USHORT, 0, -1 },
851 { flatbuffers::ET_USHORT, 0, -1 },
852 { flatbuffers::ET_INT, 0, -1 },
853 { flatbuffers::ET_INT, 0, -1 },
854 { flatbuffers::ET_INT, 0, -1 },
855 { flatbuffers::ET_UINT, 0, -1 },
856 { flatbuffers::ET_UINT, 0, -1 },
857 { flatbuffers::ET_UINT, 0, -1 },
858 { flatbuffers::ET_LONG, 0, -1 },
859 { flatbuffers::ET_LONG, 0, -1 },
860 { flatbuffers::ET_LONG, 0, -1 },
861 { flatbuffers::ET_ULONG, 0, -1 },
862 { flatbuffers::ET_ULONG, 0, -1 },
863 { flatbuffers::ET_ULONG, 0, -1 },
864 { flatbuffers::ET_FLOAT, 0, -1 },
865 { flatbuffers::ET_FLOAT, 0, -1 },
866 { flatbuffers::ET_FLOAT, 0, -1 },
867 { flatbuffers::ET_DOUBLE, 0, -1 },
868 { flatbuffers::ET_DOUBLE, 0, -1 },
869 { flatbuffers::ET_DOUBLE, 0, -1 },
870 { flatbuffers::ET_BOOL, 0, -1 },
871 { flatbuffers::ET_BOOL, 0, -1 },
872 { flatbuffers::ET_BOOL, 0, -1 },
873 { flatbuffers::ET_CHAR, 0, 0 },
874 { flatbuffers::ET_CHAR, 0, 0 },
875 { flatbuffers::ET_CHAR, 0, 0 }
876 };
877 static const flatbuffers::TypeFunction type_refs[] = {
878 optional_scalars::OptionalByteTypeTable
879 };
880 static const char * const names[] = {
881 "just_i8",
882 "maybe_i8",
883 "default_i8",
884 "just_u8",
885 "maybe_u8",
886 "default_u8",
887 "just_i16",
888 "maybe_i16",
889 "default_i16",
890 "just_u16",
891 "maybe_u16",
892 "default_u16",
893 "just_i32",
894 "maybe_i32",
895 "default_i32",
896 "just_u32",
897 "maybe_u32",
898 "default_u32",
899 "just_i64",
900 "maybe_i64",
901 "default_i64",
902 "just_u64",
903 "maybe_u64",
904 "default_u64",
905 "just_f32",
906 "maybe_f32",
907 "default_f32",
908 "just_f64",
909 "maybe_f64",
910 "default_f64",
911 "just_bool",
912 "maybe_bool",
913 "default_bool",
914 "just_enum",
915 "maybe_enum",
916 "default_enum"
917 };
918 static const flatbuffers::TypeTable tt = {
919 flatbuffers::ST_TABLE, 36, type_codes, type_refs, nullptr, nullptr, names
920 };
921 return &tt;
922 }
923
GetScalarStuff(const void * buf)924 inline const optional_scalars::ScalarStuff *GetScalarStuff(const void *buf) {
925 return flatbuffers::GetRoot<optional_scalars::ScalarStuff>(buf);
926 }
927
GetSizePrefixedScalarStuff(const void * buf)928 inline const optional_scalars::ScalarStuff *GetSizePrefixedScalarStuff(const void *buf) {
929 return flatbuffers::GetSizePrefixedRoot<optional_scalars::ScalarStuff>(buf);
930 }
931
GetMutableScalarStuff(void * buf)932 inline ScalarStuff *GetMutableScalarStuff(void *buf) {
933 return flatbuffers::GetMutableRoot<ScalarStuff>(buf);
934 }
935
ScalarStuffIdentifier()936 inline const char *ScalarStuffIdentifier() {
937 return "NULL";
938 }
939
ScalarStuffBufferHasIdentifier(const void * buf)940 inline bool ScalarStuffBufferHasIdentifier(const void *buf) {
941 return flatbuffers::BufferHasIdentifier(
942 buf, ScalarStuffIdentifier());
943 }
944
VerifyScalarStuffBuffer(flatbuffers::Verifier & verifier)945 inline bool VerifyScalarStuffBuffer(
946 flatbuffers::Verifier &verifier) {
947 return verifier.VerifyBuffer<optional_scalars::ScalarStuff>(ScalarStuffIdentifier());
948 }
949
VerifySizePrefixedScalarStuffBuffer(flatbuffers::Verifier & verifier)950 inline bool VerifySizePrefixedScalarStuffBuffer(
951 flatbuffers::Verifier &verifier) {
952 return verifier.VerifySizePrefixedBuffer<optional_scalars::ScalarStuff>(ScalarStuffIdentifier());
953 }
954
ScalarStuffExtension()955 inline const char *ScalarStuffExtension() {
956 return "mon";
957 }
958
FinishScalarStuffBuffer(flatbuffers::FlatBufferBuilder & fbb,flatbuffers::Offset<optional_scalars::ScalarStuff> root)959 inline void FinishScalarStuffBuffer(
960 flatbuffers::FlatBufferBuilder &fbb,
961 flatbuffers::Offset<optional_scalars::ScalarStuff> root) {
962 fbb.Finish(root, ScalarStuffIdentifier());
963 }
964
FinishSizePrefixedScalarStuffBuffer(flatbuffers::FlatBufferBuilder & fbb,flatbuffers::Offset<optional_scalars::ScalarStuff> root)965 inline void FinishSizePrefixedScalarStuffBuffer(
966 flatbuffers::FlatBufferBuilder &fbb,
967 flatbuffers::Offset<optional_scalars::ScalarStuff> root) {
968 fbb.FinishSizePrefixed(root, ScalarStuffIdentifier());
969 }
970
971 inline std::unique_ptr<optional_scalars::ScalarStuffT> UnPackScalarStuff(
972 const void *buf,
973 const flatbuffers::resolver_function_t *res = nullptr) {
974 return std::unique_ptr<optional_scalars::ScalarStuffT>(GetScalarStuff(buf)->UnPack(res));
975 }
976
977 inline std::unique_ptr<optional_scalars::ScalarStuffT> UnPackSizePrefixedScalarStuff(
978 const void *buf,
979 const flatbuffers::resolver_function_t *res = nullptr) {
980 return std::unique_ptr<optional_scalars::ScalarStuffT>(GetSizePrefixedScalarStuff(buf)->UnPack(res));
981 }
982
983 } // namespace optional_scalars
984
985 #endif // FLATBUFFERS_GENERATED_OPTIONALSCALARS_OPTIONAL_SCALARS_H_
986