blob: c295ebac178b9a6c7de85b539d6877b5a07ac980 [file] [log] [blame]
Austin Schuh272c6132020-11-14 16:37:52 -08001// 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
9namespace optional_scalars {
10
11struct ScalarStuff;
12struct ScalarStuffBuilder;
13struct ScalarStuffT;
14
15bool operator==(const ScalarStuffT &lhs, const ScalarStuffT &rhs);
16bool operator!=(const ScalarStuffT &lhs, const ScalarStuffT &rhs);
17
18inline const flatbuffers::TypeTable *ScalarStuffTypeTable();
19
James Kuszmaul8e62b022022-03-22 09:33:25 -070020enum OptionalByte : int8_t {
Austin Schuh272c6132020-11-14 16:37:52 -080021 OptionalByte_None = 0,
22 OptionalByte_One = 1,
23 OptionalByte_Two = 2,
24 OptionalByte_MIN = OptionalByte_None,
25 OptionalByte_MAX = OptionalByte_Two
26};
27
28inline const OptionalByte (&EnumValuesOptionalByte())[3] {
29 static const OptionalByte values[] = {
30 OptionalByte_None,
31 OptionalByte_One,
32 OptionalByte_Two
33 };
34 return values;
35}
36
37inline const char * const *EnumNamesOptionalByte() {
38 static const char * const names[4] = {
39 "None",
40 "One",
41 "Two",
42 nullptr
43 };
44 return names;
45}
46
47inline const char *EnumNameOptionalByte(OptionalByte e) {
48 if (flatbuffers::IsOutRange(e, OptionalByte_None, OptionalByte_Two)) return "";
49 const size_t index = static_cast<size_t>(e);
50 return EnumNamesOptionalByte()[index];
51}
52
53struct ScalarStuffT : public flatbuffers::NativeTable {
54 typedef ScalarStuff TableType;
James Kuszmaul8e62b022022-03-22 09:33:25 -070055 int8_t just_i8 = 0;
56 flatbuffers::Optional<int8_t> maybe_i8 = flatbuffers::nullopt;
57 int8_t default_i8 = 42;
58 uint8_t just_u8 = 0;
59 flatbuffers::Optional<uint8_t> maybe_u8 = flatbuffers::nullopt;
60 uint8_t default_u8 = 42;
61 int16_t just_i16 = 0;
62 flatbuffers::Optional<int16_t> maybe_i16 = flatbuffers::nullopt;
63 int16_t default_i16 = 42;
64 uint16_t just_u16 = 0;
65 flatbuffers::Optional<uint16_t> maybe_u16 = flatbuffers::nullopt;
66 uint16_t default_u16 = 42;
67 int32_t just_i32 = 0;
68 flatbuffers::Optional<int32_t> maybe_i32 = flatbuffers::nullopt;
69 int32_t default_i32 = 42;
70 uint32_t just_u32 = 0;
71 flatbuffers::Optional<uint32_t> maybe_u32 = flatbuffers::nullopt;
72 uint32_t default_u32 = 42;
73 int64_t just_i64 = 0;
74 flatbuffers::Optional<int64_t> maybe_i64 = flatbuffers::nullopt;
75 int64_t default_i64 = 42LL;
76 uint64_t just_u64 = 0;
77 flatbuffers::Optional<uint64_t> maybe_u64 = flatbuffers::nullopt;
78 uint64_t default_u64 = 42ULL;
79 float just_f32 = 0.0f;
80 flatbuffers::Optional<float> maybe_f32 = flatbuffers::nullopt;
81 float default_f32 = 42.0f;
82 double just_f64 = 0.0;
83 flatbuffers::Optional<double> maybe_f64 = flatbuffers::nullopt;
84 double default_f64 = 42.0;
85 bool just_bool = false;
86 flatbuffers::Optional<bool> maybe_bool = flatbuffers::nullopt;
87 bool default_bool = true;
88 optional_scalars::OptionalByte just_enum = optional_scalars::OptionalByte_None;
89 flatbuffers::Optional<optional_scalars::OptionalByte> maybe_enum = flatbuffers::nullopt;
90 optional_scalars::OptionalByte default_enum = optional_scalars::OptionalByte_One;
Austin Schuh272c6132020-11-14 16:37:52 -080091};
92
Austin Schuh272c6132020-11-14 16:37:52 -080093struct ScalarStuff FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
94 typedef ScalarStuffT NativeTableType;
95 typedef ScalarStuffBuilder Builder;
96 static const flatbuffers::TypeTable *MiniReflectTypeTable() {
97 return ScalarStuffTypeTable();
98 }
99 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
100 VT_JUST_I8 = 4,
101 VT_MAYBE_I8 = 6,
102 VT_DEFAULT_I8 = 8,
103 VT_JUST_U8 = 10,
104 VT_MAYBE_U8 = 12,
105 VT_DEFAULT_U8 = 14,
106 VT_JUST_I16 = 16,
107 VT_MAYBE_I16 = 18,
108 VT_DEFAULT_I16 = 20,
109 VT_JUST_U16 = 22,
110 VT_MAYBE_U16 = 24,
111 VT_DEFAULT_U16 = 26,
112 VT_JUST_I32 = 28,
113 VT_MAYBE_I32 = 30,
114 VT_DEFAULT_I32 = 32,
115 VT_JUST_U32 = 34,
116 VT_MAYBE_U32 = 36,
117 VT_DEFAULT_U32 = 38,
118 VT_JUST_I64 = 40,
119 VT_MAYBE_I64 = 42,
120 VT_DEFAULT_I64 = 44,
121 VT_JUST_U64 = 46,
122 VT_MAYBE_U64 = 48,
123 VT_DEFAULT_U64 = 50,
124 VT_JUST_F32 = 52,
125 VT_MAYBE_F32 = 54,
126 VT_DEFAULT_F32 = 56,
127 VT_JUST_F64 = 58,
128 VT_MAYBE_F64 = 60,
129 VT_DEFAULT_F64 = 62,
130 VT_JUST_BOOL = 64,
131 VT_MAYBE_BOOL = 66,
132 VT_DEFAULT_BOOL = 68,
133 VT_JUST_ENUM = 70,
134 VT_MAYBE_ENUM = 72,
135 VT_DEFAULT_ENUM = 74
136 };
137 int8_t just_i8() const {
138 return GetField<int8_t>(VT_JUST_I8, 0);
139 }
James Kuszmaul8e62b022022-03-22 09:33:25 -0700140 bool mutate_just_i8(int8_t _just_i8 = 0) {
Austin Schuh272c6132020-11-14 16:37:52 -0800141 return SetField<int8_t>(VT_JUST_I8, _just_i8, 0);
142 }
143 flatbuffers::Optional<int8_t> maybe_i8() const {
144 return GetOptional<int8_t, int8_t>(VT_MAYBE_I8);
145 }
146 bool mutate_maybe_i8(int8_t _maybe_i8) {
147 return SetField<int8_t>(VT_MAYBE_I8, _maybe_i8);
148 }
149 int8_t default_i8() const {
150 return GetField<int8_t>(VT_DEFAULT_I8, 42);
151 }
James Kuszmaul8e62b022022-03-22 09:33:25 -0700152 bool mutate_default_i8(int8_t _default_i8 = 42) {
Austin Schuh272c6132020-11-14 16:37:52 -0800153 return SetField<int8_t>(VT_DEFAULT_I8, _default_i8, 42);
154 }
155 uint8_t just_u8() const {
156 return GetField<uint8_t>(VT_JUST_U8, 0);
157 }
James Kuszmaul8e62b022022-03-22 09:33:25 -0700158 bool mutate_just_u8(uint8_t _just_u8 = 0) {
Austin Schuh272c6132020-11-14 16:37:52 -0800159 return SetField<uint8_t>(VT_JUST_U8, _just_u8, 0);
160 }
161 flatbuffers::Optional<uint8_t> maybe_u8() const {
162 return GetOptional<uint8_t, uint8_t>(VT_MAYBE_U8);
163 }
164 bool mutate_maybe_u8(uint8_t _maybe_u8) {
165 return SetField<uint8_t>(VT_MAYBE_U8, _maybe_u8);
166 }
167 uint8_t default_u8() const {
168 return GetField<uint8_t>(VT_DEFAULT_U8, 42);
169 }
James Kuszmaul8e62b022022-03-22 09:33:25 -0700170 bool mutate_default_u8(uint8_t _default_u8 = 42) {
Austin Schuh272c6132020-11-14 16:37:52 -0800171 return SetField<uint8_t>(VT_DEFAULT_U8, _default_u8, 42);
172 }
173 int16_t just_i16() const {
174 return GetField<int16_t>(VT_JUST_I16, 0);
175 }
James Kuszmaul8e62b022022-03-22 09:33:25 -0700176 bool mutate_just_i16(int16_t _just_i16 = 0) {
Austin Schuh272c6132020-11-14 16:37:52 -0800177 return SetField<int16_t>(VT_JUST_I16, _just_i16, 0);
178 }
179 flatbuffers::Optional<int16_t> maybe_i16() const {
180 return GetOptional<int16_t, int16_t>(VT_MAYBE_I16);
181 }
182 bool mutate_maybe_i16(int16_t _maybe_i16) {
183 return SetField<int16_t>(VT_MAYBE_I16, _maybe_i16);
184 }
185 int16_t default_i16() const {
186 return GetField<int16_t>(VT_DEFAULT_I16, 42);
187 }
James Kuszmaul8e62b022022-03-22 09:33:25 -0700188 bool mutate_default_i16(int16_t _default_i16 = 42) {
Austin Schuh272c6132020-11-14 16:37:52 -0800189 return SetField<int16_t>(VT_DEFAULT_I16, _default_i16, 42);
190 }
191 uint16_t just_u16() const {
192 return GetField<uint16_t>(VT_JUST_U16, 0);
193 }
James Kuszmaul8e62b022022-03-22 09:33:25 -0700194 bool mutate_just_u16(uint16_t _just_u16 = 0) {
Austin Schuh272c6132020-11-14 16:37:52 -0800195 return SetField<uint16_t>(VT_JUST_U16, _just_u16, 0);
196 }
197 flatbuffers::Optional<uint16_t> maybe_u16() const {
198 return GetOptional<uint16_t, uint16_t>(VT_MAYBE_U16);
199 }
200 bool mutate_maybe_u16(uint16_t _maybe_u16) {
201 return SetField<uint16_t>(VT_MAYBE_U16, _maybe_u16);
202 }
203 uint16_t default_u16() const {
204 return GetField<uint16_t>(VT_DEFAULT_U16, 42);
205 }
James Kuszmaul8e62b022022-03-22 09:33:25 -0700206 bool mutate_default_u16(uint16_t _default_u16 = 42) {
Austin Schuh272c6132020-11-14 16:37:52 -0800207 return SetField<uint16_t>(VT_DEFAULT_U16, _default_u16, 42);
208 }
209 int32_t just_i32() const {
210 return GetField<int32_t>(VT_JUST_I32, 0);
211 }
James Kuszmaul8e62b022022-03-22 09:33:25 -0700212 bool mutate_just_i32(int32_t _just_i32 = 0) {
Austin Schuh272c6132020-11-14 16:37:52 -0800213 return SetField<int32_t>(VT_JUST_I32, _just_i32, 0);
214 }
215 flatbuffers::Optional<int32_t> maybe_i32() const {
216 return GetOptional<int32_t, int32_t>(VT_MAYBE_I32);
217 }
218 bool mutate_maybe_i32(int32_t _maybe_i32) {
219 return SetField<int32_t>(VT_MAYBE_I32, _maybe_i32);
220 }
221 int32_t default_i32() const {
222 return GetField<int32_t>(VT_DEFAULT_I32, 42);
223 }
James Kuszmaul8e62b022022-03-22 09:33:25 -0700224 bool mutate_default_i32(int32_t _default_i32 = 42) {
Austin Schuh272c6132020-11-14 16:37:52 -0800225 return SetField<int32_t>(VT_DEFAULT_I32, _default_i32, 42);
226 }
227 uint32_t just_u32() const {
228 return GetField<uint32_t>(VT_JUST_U32, 0);
229 }
James Kuszmaul8e62b022022-03-22 09:33:25 -0700230 bool mutate_just_u32(uint32_t _just_u32 = 0) {
Austin Schuh272c6132020-11-14 16:37:52 -0800231 return SetField<uint32_t>(VT_JUST_U32, _just_u32, 0);
232 }
233 flatbuffers::Optional<uint32_t> maybe_u32() const {
234 return GetOptional<uint32_t, uint32_t>(VT_MAYBE_U32);
235 }
236 bool mutate_maybe_u32(uint32_t _maybe_u32) {
237 return SetField<uint32_t>(VT_MAYBE_U32, _maybe_u32);
238 }
239 uint32_t default_u32() const {
240 return GetField<uint32_t>(VT_DEFAULT_U32, 42);
241 }
James Kuszmaul8e62b022022-03-22 09:33:25 -0700242 bool mutate_default_u32(uint32_t _default_u32 = 42) {
Austin Schuh272c6132020-11-14 16:37:52 -0800243 return SetField<uint32_t>(VT_DEFAULT_U32, _default_u32, 42);
244 }
245 int64_t just_i64() const {
246 return GetField<int64_t>(VT_JUST_I64, 0);
247 }
James Kuszmaul8e62b022022-03-22 09:33:25 -0700248 bool mutate_just_i64(int64_t _just_i64 = 0) {
Austin Schuh272c6132020-11-14 16:37:52 -0800249 return SetField<int64_t>(VT_JUST_I64, _just_i64, 0);
250 }
251 flatbuffers::Optional<int64_t> maybe_i64() const {
252 return GetOptional<int64_t, int64_t>(VT_MAYBE_I64);
253 }
254 bool mutate_maybe_i64(int64_t _maybe_i64) {
255 return SetField<int64_t>(VT_MAYBE_I64, _maybe_i64);
256 }
257 int64_t default_i64() const {
258 return GetField<int64_t>(VT_DEFAULT_I64, 42LL);
259 }
James Kuszmaul8e62b022022-03-22 09:33:25 -0700260 bool mutate_default_i64(int64_t _default_i64 = 42LL) {
Austin Schuh272c6132020-11-14 16:37:52 -0800261 return SetField<int64_t>(VT_DEFAULT_I64, _default_i64, 42LL);
262 }
263 uint64_t just_u64() const {
264 return GetField<uint64_t>(VT_JUST_U64, 0);
265 }
James Kuszmaul8e62b022022-03-22 09:33:25 -0700266 bool mutate_just_u64(uint64_t _just_u64 = 0) {
Austin Schuh272c6132020-11-14 16:37:52 -0800267 return SetField<uint64_t>(VT_JUST_U64, _just_u64, 0);
268 }
269 flatbuffers::Optional<uint64_t> maybe_u64() const {
270 return GetOptional<uint64_t, uint64_t>(VT_MAYBE_U64);
271 }
272 bool mutate_maybe_u64(uint64_t _maybe_u64) {
273 return SetField<uint64_t>(VT_MAYBE_U64, _maybe_u64);
274 }
275 uint64_t default_u64() const {
276 return GetField<uint64_t>(VT_DEFAULT_U64, 42ULL);
277 }
James Kuszmaul8e62b022022-03-22 09:33:25 -0700278 bool mutate_default_u64(uint64_t _default_u64 = 42ULL) {
Austin Schuh272c6132020-11-14 16:37:52 -0800279 return SetField<uint64_t>(VT_DEFAULT_U64, _default_u64, 42ULL);
280 }
281 float just_f32() const {
282 return GetField<float>(VT_JUST_F32, 0.0f);
283 }
James Kuszmaul8e62b022022-03-22 09:33:25 -0700284 bool mutate_just_f32(float _just_f32 = 0.0f) {
Austin Schuh272c6132020-11-14 16:37:52 -0800285 return SetField<float>(VT_JUST_F32, _just_f32, 0.0f);
286 }
287 flatbuffers::Optional<float> maybe_f32() const {
288 return GetOptional<float, float>(VT_MAYBE_F32);
289 }
290 bool mutate_maybe_f32(float _maybe_f32) {
291 return SetField<float>(VT_MAYBE_F32, _maybe_f32);
292 }
293 float default_f32() const {
294 return GetField<float>(VT_DEFAULT_F32, 42.0f);
295 }
James Kuszmaul8e62b022022-03-22 09:33:25 -0700296 bool mutate_default_f32(float _default_f32 = 42.0f) {
Austin Schuh272c6132020-11-14 16:37:52 -0800297 return SetField<float>(VT_DEFAULT_F32, _default_f32, 42.0f);
298 }
299 double just_f64() const {
300 return GetField<double>(VT_JUST_F64, 0.0);
301 }
James Kuszmaul8e62b022022-03-22 09:33:25 -0700302 bool mutate_just_f64(double _just_f64 = 0.0) {
Austin Schuh272c6132020-11-14 16:37:52 -0800303 return SetField<double>(VT_JUST_F64, _just_f64, 0.0);
304 }
305 flatbuffers::Optional<double> maybe_f64() const {
306 return GetOptional<double, double>(VT_MAYBE_F64);
307 }
308 bool mutate_maybe_f64(double _maybe_f64) {
309 return SetField<double>(VT_MAYBE_F64, _maybe_f64);
310 }
311 double default_f64() const {
312 return GetField<double>(VT_DEFAULT_F64, 42.0);
313 }
James Kuszmaul8e62b022022-03-22 09:33:25 -0700314 bool mutate_default_f64(double _default_f64 = 42.0) {
Austin Schuh272c6132020-11-14 16:37:52 -0800315 return SetField<double>(VT_DEFAULT_F64, _default_f64, 42.0);
316 }
317 bool just_bool() const {
318 return GetField<uint8_t>(VT_JUST_BOOL, 0) != 0;
319 }
James Kuszmaul8e62b022022-03-22 09:33:25 -0700320 bool mutate_just_bool(bool _just_bool = 0) {
Austin Schuh272c6132020-11-14 16:37:52 -0800321 return SetField<uint8_t>(VT_JUST_BOOL, static_cast<uint8_t>(_just_bool), 0);
322 }
323 flatbuffers::Optional<bool> maybe_bool() const {
324 return GetOptional<uint8_t, bool>(VT_MAYBE_BOOL);
325 }
326 bool mutate_maybe_bool(bool _maybe_bool) {
327 return SetField<uint8_t>(VT_MAYBE_BOOL, static_cast<uint8_t>(_maybe_bool));
328 }
329 bool default_bool() const {
330 return GetField<uint8_t>(VT_DEFAULT_BOOL, 1) != 0;
331 }
James Kuszmaul8e62b022022-03-22 09:33:25 -0700332 bool mutate_default_bool(bool _default_bool = 1) {
Austin Schuh272c6132020-11-14 16:37:52 -0800333 return SetField<uint8_t>(VT_DEFAULT_BOOL, static_cast<uint8_t>(_default_bool), 1);
334 }
335 optional_scalars::OptionalByte just_enum() const {
336 return static_cast<optional_scalars::OptionalByte>(GetField<int8_t>(VT_JUST_ENUM, 0));
337 }
James Kuszmaul8e62b022022-03-22 09:33:25 -0700338 bool mutate_just_enum(optional_scalars::OptionalByte _just_enum = static_cast<optional_scalars::OptionalByte>(0)) {
Austin Schuh272c6132020-11-14 16:37:52 -0800339 return SetField<int8_t>(VT_JUST_ENUM, static_cast<int8_t>(_just_enum), 0);
340 }
341 flatbuffers::Optional<optional_scalars::OptionalByte> maybe_enum() const {
342 return GetOptional<int8_t, optional_scalars::OptionalByte>(VT_MAYBE_ENUM);
343 }
344 bool mutate_maybe_enum(optional_scalars::OptionalByte _maybe_enum) {
345 return SetField<int8_t>(VT_MAYBE_ENUM, static_cast<int8_t>(_maybe_enum));
346 }
347 optional_scalars::OptionalByte default_enum() const {
348 return static_cast<optional_scalars::OptionalByte>(GetField<int8_t>(VT_DEFAULT_ENUM, 1));
349 }
James Kuszmaul8e62b022022-03-22 09:33:25 -0700350 bool mutate_default_enum(optional_scalars::OptionalByte _default_enum = static_cast<optional_scalars::OptionalByte>(1)) {
Austin Schuh272c6132020-11-14 16:37:52 -0800351 return SetField<int8_t>(VT_DEFAULT_ENUM, static_cast<int8_t>(_default_enum), 1);
352 }
353 bool Verify(flatbuffers::Verifier &verifier) const {
354 return VerifyTableStart(verifier) &&
James Kuszmaul8e62b022022-03-22 09:33:25 -0700355 VerifyField<int8_t>(verifier, VT_JUST_I8, 1) &&
356 VerifyField<int8_t>(verifier, VT_MAYBE_I8, 1) &&
357 VerifyField<int8_t>(verifier, VT_DEFAULT_I8, 1) &&
358 VerifyField<uint8_t>(verifier, VT_JUST_U8, 1) &&
359 VerifyField<uint8_t>(verifier, VT_MAYBE_U8, 1) &&
360 VerifyField<uint8_t>(verifier, VT_DEFAULT_U8, 1) &&
361 VerifyField<int16_t>(verifier, VT_JUST_I16, 2) &&
362 VerifyField<int16_t>(verifier, VT_MAYBE_I16, 2) &&
363 VerifyField<int16_t>(verifier, VT_DEFAULT_I16, 2) &&
364 VerifyField<uint16_t>(verifier, VT_JUST_U16, 2) &&
365 VerifyField<uint16_t>(verifier, VT_MAYBE_U16, 2) &&
366 VerifyField<uint16_t>(verifier, VT_DEFAULT_U16, 2) &&
367 VerifyField<int32_t>(verifier, VT_JUST_I32, 4) &&
368 VerifyField<int32_t>(verifier, VT_MAYBE_I32, 4) &&
369 VerifyField<int32_t>(verifier, VT_DEFAULT_I32, 4) &&
370 VerifyField<uint32_t>(verifier, VT_JUST_U32, 4) &&
371 VerifyField<uint32_t>(verifier, VT_MAYBE_U32, 4) &&
372 VerifyField<uint32_t>(verifier, VT_DEFAULT_U32, 4) &&
373 VerifyField<int64_t>(verifier, VT_JUST_I64, 8) &&
374 VerifyField<int64_t>(verifier, VT_MAYBE_I64, 8) &&
375 VerifyField<int64_t>(verifier, VT_DEFAULT_I64, 8) &&
376 VerifyField<uint64_t>(verifier, VT_JUST_U64, 8) &&
377 VerifyField<uint64_t>(verifier, VT_MAYBE_U64, 8) &&
378 VerifyField<uint64_t>(verifier, VT_DEFAULT_U64, 8) &&
379 VerifyField<float>(verifier, VT_JUST_F32, 4) &&
380 VerifyField<float>(verifier, VT_MAYBE_F32, 4) &&
381 VerifyField<float>(verifier, VT_DEFAULT_F32, 4) &&
382 VerifyField<double>(verifier, VT_JUST_F64, 8) &&
383 VerifyField<double>(verifier, VT_MAYBE_F64, 8) &&
384 VerifyField<double>(verifier, VT_DEFAULT_F64, 8) &&
385 VerifyField<uint8_t>(verifier, VT_JUST_BOOL, 1) &&
386 VerifyField<uint8_t>(verifier, VT_MAYBE_BOOL, 1) &&
387 VerifyField<uint8_t>(verifier, VT_DEFAULT_BOOL, 1) &&
388 VerifyField<int8_t>(verifier, VT_JUST_ENUM, 1) &&
389 VerifyField<int8_t>(verifier, VT_MAYBE_ENUM, 1) &&
390 VerifyField<int8_t>(verifier, VT_DEFAULT_ENUM, 1) &&
Austin Schuh272c6132020-11-14 16:37:52 -0800391 verifier.EndTable();
392 }
393 ScalarStuffT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const;
394 void UnPackTo(ScalarStuffT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const;
395 static flatbuffers::Offset<ScalarStuff> Pack(flatbuffers::FlatBufferBuilder &_fbb, const ScalarStuffT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr);
396};
397
398struct ScalarStuffBuilder {
399 typedef ScalarStuff Table;
400 flatbuffers::FlatBufferBuilder &fbb_;
401 flatbuffers::uoffset_t start_;
402 void add_just_i8(int8_t just_i8) {
403 fbb_.AddElement<int8_t>(ScalarStuff::VT_JUST_I8, just_i8, 0);
404 }
405 void add_maybe_i8(int8_t maybe_i8) {
406 fbb_.AddElement<int8_t>(ScalarStuff::VT_MAYBE_I8, maybe_i8);
407 }
408 void add_default_i8(int8_t default_i8) {
409 fbb_.AddElement<int8_t>(ScalarStuff::VT_DEFAULT_I8, default_i8, 42);
410 }
411 void add_just_u8(uint8_t just_u8) {
412 fbb_.AddElement<uint8_t>(ScalarStuff::VT_JUST_U8, just_u8, 0);
413 }
414 void add_maybe_u8(uint8_t maybe_u8) {
415 fbb_.AddElement<uint8_t>(ScalarStuff::VT_MAYBE_U8, maybe_u8);
416 }
417 void add_default_u8(uint8_t default_u8) {
418 fbb_.AddElement<uint8_t>(ScalarStuff::VT_DEFAULT_U8, default_u8, 42);
419 }
420 void add_just_i16(int16_t just_i16) {
421 fbb_.AddElement<int16_t>(ScalarStuff::VT_JUST_I16, just_i16, 0);
422 }
423 void add_maybe_i16(int16_t maybe_i16) {
424 fbb_.AddElement<int16_t>(ScalarStuff::VT_MAYBE_I16, maybe_i16);
425 }
426 void add_default_i16(int16_t default_i16) {
427 fbb_.AddElement<int16_t>(ScalarStuff::VT_DEFAULT_I16, default_i16, 42);
428 }
429 void add_just_u16(uint16_t just_u16) {
430 fbb_.AddElement<uint16_t>(ScalarStuff::VT_JUST_U16, just_u16, 0);
431 }
432 void add_maybe_u16(uint16_t maybe_u16) {
433 fbb_.AddElement<uint16_t>(ScalarStuff::VT_MAYBE_U16, maybe_u16);
434 }
435 void add_default_u16(uint16_t default_u16) {
436 fbb_.AddElement<uint16_t>(ScalarStuff::VT_DEFAULT_U16, default_u16, 42);
437 }
438 void add_just_i32(int32_t just_i32) {
439 fbb_.AddElement<int32_t>(ScalarStuff::VT_JUST_I32, just_i32, 0);
440 }
441 void add_maybe_i32(int32_t maybe_i32) {
442 fbb_.AddElement<int32_t>(ScalarStuff::VT_MAYBE_I32, maybe_i32);
443 }
444 void add_default_i32(int32_t default_i32) {
445 fbb_.AddElement<int32_t>(ScalarStuff::VT_DEFAULT_I32, default_i32, 42);
446 }
447 void add_just_u32(uint32_t just_u32) {
448 fbb_.AddElement<uint32_t>(ScalarStuff::VT_JUST_U32, just_u32, 0);
449 }
450 void add_maybe_u32(uint32_t maybe_u32) {
451 fbb_.AddElement<uint32_t>(ScalarStuff::VT_MAYBE_U32, maybe_u32);
452 }
453 void add_default_u32(uint32_t default_u32) {
454 fbb_.AddElement<uint32_t>(ScalarStuff::VT_DEFAULT_U32, default_u32, 42);
455 }
456 void add_just_i64(int64_t just_i64) {
457 fbb_.AddElement<int64_t>(ScalarStuff::VT_JUST_I64, just_i64, 0);
458 }
459 void add_maybe_i64(int64_t maybe_i64) {
460 fbb_.AddElement<int64_t>(ScalarStuff::VT_MAYBE_I64, maybe_i64);
461 }
462 void add_default_i64(int64_t default_i64) {
463 fbb_.AddElement<int64_t>(ScalarStuff::VT_DEFAULT_I64, default_i64, 42LL);
464 }
465 void add_just_u64(uint64_t just_u64) {
466 fbb_.AddElement<uint64_t>(ScalarStuff::VT_JUST_U64, just_u64, 0);
467 }
468 void add_maybe_u64(uint64_t maybe_u64) {
469 fbb_.AddElement<uint64_t>(ScalarStuff::VT_MAYBE_U64, maybe_u64);
470 }
471 void add_default_u64(uint64_t default_u64) {
472 fbb_.AddElement<uint64_t>(ScalarStuff::VT_DEFAULT_U64, default_u64, 42ULL);
473 }
474 void add_just_f32(float just_f32) {
475 fbb_.AddElement<float>(ScalarStuff::VT_JUST_F32, just_f32, 0.0f);
476 }
477 void add_maybe_f32(float maybe_f32) {
478 fbb_.AddElement<float>(ScalarStuff::VT_MAYBE_F32, maybe_f32);
479 }
480 void add_default_f32(float default_f32) {
481 fbb_.AddElement<float>(ScalarStuff::VT_DEFAULT_F32, default_f32, 42.0f);
482 }
483 void add_just_f64(double just_f64) {
484 fbb_.AddElement<double>(ScalarStuff::VT_JUST_F64, just_f64, 0.0);
485 }
486 void add_maybe_f64(double maybe_f64) {
487 fbb_.AddElement<double>(ScalarStuff::VT_MAYBE_F64, maybe_f64);
488 }
489 void add_default_f64(double default_f64) {
490 fbb_.AddElement<double>(ScalarStuff::VT_DEFAULT_F64, default_f64, 42.0);
491 }
492 void add_just_bool(bool just_bool) {
493 fbb_.AddElement<uint8_t>(ScalarStuff::VT_JUST_BOOL, static_cast<uint8_t>(just_bool), 0);
494 }
495 void add_maybe_bool(bool maybe_bool) {
496 fbb_.AddElement<uint8_t>(ScalarStuff::VT_MAYBE_BOOL, static_cast<uint8_t>(maybe_bool));
497 }
498 void add_default_bool(bool default_bool) {
499 fbb_.AddElement<uint8_t>(ScalarStuff::VT_DEFAULT_BOOL, static_cast<uint8_t>(default_bool), 1);
500 }
501 void add_just_enum(optional_scalars::OptionalByte just_enum) {
502 fbb_.AddElement<int8_t>(ScalarStuff::VT_JUST_ENUM, static_cast<int8_t>(just_enum), 0);
503 }
504 void add_maybe_enum(optional_scalars::OptionalByte maybe_enum) {
505 fbb_.AddElement<int8_t>(ScalarStuff::VT_MAYBE_ENUM, static_cast<int8_t>(maybe_enum));
506 }
507 void add_default_enum(optional_scalars::OptionalByte default_enum) {
508 fbb_.AddElement<int8_t>(ScalarStuff::VT_DEFAULT_ENUM, static_cast<int8_t>(default_enum), 1);
509 }
510 explicit ScalarStuffBuilder(flatbuffers::FlatBufferBuilder &_fbb)
511 : fbb_(_fbb) {
512 start_ = fbb_.StartTable();
513 }
514 flatbuffers::Offset<ScalarStuff> Finish() {
515 const auto end = fbb_.EndTable(start_);
516 auto o = flatbuffers::Offset<ScalarStuff>(end);
517 return o;
518 }
519};
520
521inline flatbuffers::Offset<ScalarStuff> CreateScalarStuff(
522 flatbuffers::FlatBufferBuilder &_fbb,
523 int8_t just_i8 = 0,
524 flatbuffers::Optional<int8_t> maybe_i8 = flatbuffers::nullopt,
525 int8_t default_i8 = 42,
526 uint8_t just_u8 = 0,
527 flatbuffers::Optional<uint8_t> maybe_u8 = flatbuffers::nullopt,
528 uint8_t default_u8 = 42,
529 int16_t just_i16 = 0,
530 flatbuffers::Optional<int16_t> maybe_i16 = flatbuffers::nullopt,
531 int16_t default_i16 = 42,
532 uint16_t just_u16 = 0,
533 flatbuffers::Optional<uint16_t> maybe_u16 = flatbuffers::nullopt,
534 uint16_t default_u16 = 42,
535 int32_t just_i32 = 0,
536 flatbuffers::Optional<int32_t> maybe_i32 = flatbuffers::nullopt,
537 int32_t default_i32 = 42,
538 uint32_t just_u32 = 0,
539 flatbuffers::Optional<uint32_t> maybe_u32 = flatbuffers::nullopt,
540 uint32_t default_u32 = 42,
541 int64_t just_i64 = 0,
542 flatbuffers::Optional<int64_t> maybe_i64 = flatbuffers::nullopt,
543 int64_t default_i64 = 42LL,
544 uint64_t just_u64 = 0,
545 flatbuffers::Optional<uint64_t> maybe_u64 = flatbuffers::nullopt,
546 uint64_t default_u64 = 42ULL,
547 float just_f32 = 0.0f,
548 flatbuffers::Optional<float> maybe_f32 = flatbuffers::nullopt,
549 float default_f32 = 42.0f,
550 double just_f64 = 0.0,
551 flatbuffers::Optional<double> maybe_f64 = flatbuffers::nullopt,
552 double default_f64 = 42.0,
553 bool just_bool = false,
554 flatbuffers::Optional<bool> maybe_bool = flatbuffers::nullopt,
555 bool default_bool = true,
556 optional_scalars::OptionalByte just_enum = optional_scalars::OptionalByte_None,
557 flatbuffers::Optional<optional_scalars::OptionalByte> maybe_enum = flatbuffers::nullopt,
558 optional_scalars::OptionalByte default_enum = optional_scalars::OptionalByte_One) {
559 ScalarStuffBuilder builder_(_fbb);
560 builder_.add_default_f64(default_f64);
561 if(maybe_f64) { builder_.add_maybe_f64(*maybe_f64); }
562 builder_.add_just_f64(just_f64);
563 builder_.add_default_u64(default_u64);
564 if(maybe_u64) { builder_.add_maybe_u64(*maybe_u64); }
565 builder_.add_just_u64(just_u64);
566 builder_.add_default_i64(default_i64);
567 if(maybe_i64) { builder_.add_maybe_i64(*maybe_i64); }
568 builder_.add_just_i64(just_i64);
569 builder_.add_default_f32(default_f32);
570 if(maybe_f32) { builder_.add_maybe_f32(*maybe_f32); }
571 builder_.add_just_f32(just_f32);
572 builder_.add_default_u32(default_u32);
573 if(maybe_u32) { builder_.add_maybe_u32(*maybe_u32); }
574 builder_.add_just_u32(just_u32);
575 builder_.add_default_i32(default_i32);
576 if(maybe_i32) { builder_.add_maybe_i32(*maybe_i32); }
577 builder_.add_just_i32(just_i32);
578 builder_.add_default_u16(default_u16);
579 if(maybe_u16) { builder_.add_maybe_u16(*maybe_u16); }
580 builder_.add_just_u16(just_u16);
581 builder_.add_default_i16(default_i16);
582 if(maybe_i16) { builder_.add_maybe_i16(*maybe_i16); }
583 builder_.add_just_i16(just_i16);
584 builder_.add_default_enum(default_enum);
585 if(maybe_enum) { builder_.add_maybe_enum(*maybe_enum); }
586 builder_.add_just_enum(just_enum);
587 builder_.add_default_bool(default_bool);
588 if(maybe_bool) { builder_.add_maybe_bool(*maybe_bool); }
589 builder_.add_just_bool(just_bool);
590 builder_.add_default_u8(default_u8);
591 if(maybe_u8) { builder_.add_maybe_u8(*maybe_u8); }
592 builder_.add_just_u8(just_u8);
593 builder_.add_default_i8(default_i8);
594 if(maybe_i8) { builder_.add_maybe_i8(*maybe_i8); }
595 builder_.add_just_i8(just_i8);
596 return builder_.Finish();
597}
598
599flatbuffers::Offset<ScalarStuff> CreateScalarStuff(flatbuffers::FlatBufferBuilder &_fbb, const ScalarStuffT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr);
600
James Kuszmaul8e62b022022-03-22 09:33:25 -0700601
602inline bool operator==(const ScalarStuffT &lhs, const ScalarStuffT &rhs) {
603 return
604 (lhs.just_i8 == rhs.just_i8) &&
605 (lhs.maybe_i8 == rhs.maybe_i8) &&
606 (lhs.default_i8 == rhs.default_i8) &&
607 (lhs.just_u8 == rhs.just_u8) &&
608 (lhs.maybe_u8 == rhs.maybe_u8) &&
609 (lhs.default_u8 == rhs.default_u8) &&
610 (lhs.just_i16 == rhs.just_i16) &&
611 (lhs.maybe_i16 == rhs.maybe_i16) &&
612 (lhs.default_i16 == rhs.default_i16) &&
613 (lhs.just_u16 == rhs.just_u16) &&
614 (lhs.maybe_u16 == rhs.maybe_u16) &&
615 (lhs.default_u16 == rhs.default_u16) &&
616 (lhs.just_i32 == rhs.just_i32) &&
617 (lhs.maybe_i32 == rhs.maybe_i32) &&
618 (lhs.default_i32 == rhs.default_i32) &&
619 (lhs.just_u32 == rhs.just_u32) &&
620 (lhs.maybe_u32 == rhs.maybe_u32) &&
621 (lhs.default_u32 == rhs.default_u32) &&
622 (lhs.just_i64 == rhs.just_i64) &&
623 (lhs.maybe_i64 == rhs.maybe_i64) &&
624 (lhs.default_i64 == rhs.default_i64) &&
625 (lhs.just_u64 == rhs.just_u64) &&
626 (lhs.maybe_u64 == rhs.maybe_u64) &&
627 (lhs.default_u64 == rhs.default_u64) &&
628 (lhs.just_f32 == rhs.just_f32) &&
629 (lhs.maybe_f32 == rhs.maybe_f32) &&
630 (lhs.default_f32 == rhs.default_f32) &&
631 (lhs.just_f64 == rhs.just_f64) &&
632 (lhs.maybe_f64 == rhs.maybe_f64) &&
633 (lhs.default_f64 == rhs.default_f64) &&
634 (lhs.just_bool == rhs.just_bool) &&
635 (lhs.maybe_bool == rhs.maybe_bool) &&
636 (lhs.default_bool == rhs.default_bool) &&
637 (lhs.just_enum == rhs.just_enum) &&
638 (lhs.maybe_enum == rhs.maybe_enum) &&
639 (lhs.default_enum == rhs.default_enum);
640}
641
642inline bool operator!=(const ScalarStuffT &lhs, const ScalarStuffT &rhs) {
643 return !(lhs == rhs);
644}
645
646
Austin Schuh272c6132020-11-14 16:37:52 -0800647inline ScalarStuffT *ScalarStuff::UnPack(const flatbuffers::resolver_function_t *_resolver) const {
James Kuszmaul8e62b022022-03-22 09:33:25 -0700648 auto _o = std::unique_ptr<ScalarStuffT>(new ScalarStuffT());
Austin Schuh272c6132020-11-14 16:37:52 -0800649 UnPackTo(_o.get(), _resolver);
650 return _o.release();
651}
652
653inline void ScalarStuff::UnPackTo(ScalarStuffT *_o, const flatbuffers::resolver_function_t *_resolver) const {
654 (void)_o;
655 (void)_resolver;
656 { auto _e = just_i8(); _o->just_i8 = _e; }
657 { auto _e = maybe_i8(); _o->maybe_i8 = _e; }
658 { auto _e = default_i8(); _o->default_i8 = _e; }
659 { auto _e = just_u8(); _o->just_u8 = _e; }
660 { auto _e = maybe_u8(); _o->maybe_u8 = _e; }
661 { auto _e = default_u8(); _o->default_u8 = _e; }
662 { auto _e = just_i16(); _o->just_i16 = _e; }
663 { auto _e = maybe_i16(); _o->maybe_i16 = _e; }
664 { auto _e = default_i16(); _o->default_i16 = _e; }
665 { auto _e = just_u16(); _o->just_u16 = _e; }
666 { auto _e = maybe_u16(); _o->maybe_u16 = _e; }
667 { auto _e = default_u16(); _o->default_u16 = _e; }
668 { auto _e = just_i32(); _o->just_i32 = _e; }
669 { auto _e = maybe_i32(); _o->maybe_i32 = _e; }
670 { auto _e = default_i32(); _o->default_i32 = _e; }
671 { auto _e = just_u32(); _o->just_u32 = _e; }
672 { auto _e = maybe_u32(); _o->maybe_u32 = _e; }
673 { auto _e = default_u32(); _o->default_u32 = _e; }
674 { auto _e = just_i64(); _o->just_i64 = _e; }
675 { auto _e = maybe_i64(); _o->maybe_i64 = _e; }
676 { auto _e = default_i64(); _o->default_i64 = _e; }
677 { auto _e = just_u64(); _o->just_u64 = _e; }
678 { auto _e = maybe_u64(); _o->maybe_u64 = _e; }
679 { auto _e = default_u64(); _o->default_u64 = _e; }
680 { auto _e = just_f32(); _o->just_f32 = _e; }
681 { auto _e = maybe_f32(); _o->maybe_f32 = _e; }
682 { auto _e = default_f32(); _o->default_f32 = _e; }
683 { auto _e = just_f64(); _o->just_f64 = _e; }
684 { auto _e = maybe_f64(); _o->maybe_f64 = _e; }
685 { auto _e = default_f64(); _o->default_f64 = _e; }
686 { auto _e = just_bool(); _o->just_bool = _e; }
687 { auto _e = maybe_bool(); _o->maybe_bool = _e; }
688 { auto _e = default_bool(); _o->default_bool = _e; }
689 { auto _e = just_enum(); _o->just_enum = _e; }
690 { auto _e = maybe_enum(); _o->maybe_enum = _e; }
691 { auto _e = default_enum(); _o->default_enum = _e; }
692}
693
694inline flatbuffers::Offset<ScalarStuff> ScalarStuff::Pack(flatbuffers::FlatBufferBuilder &_fbb, const ScalarStuffT* _o, const flatbuffers::rehasher_function_t *_rehasher) {
695 return CreateScalarStuff(_fbb, _o, _rehasher);
696}
697
698inline flatbuffers::Offset<ScalarStuff> CreateScalarStuff(flatbuffers::FlatBufferBuilder &_fbb, const ScalarStuffT *_o, const flatbuffers::rehasher_function_t *_rehasher) {
699 (void)_rehasher;
700 (void)_o;
701 struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const ScalarStuffT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va;
702 auto _just_i8 = _o->just_i8;
703 auto _maybe_i8 = _o->maybe_i8;
704 auto _default_i8 = _o->default_i8;
705 auto _just_u8 = _o->just_u8;
706 auto _maybe_u8 = _o->maybe_u8;
707 auto _default_u8 = _o->default_u8;
708 auto _just_i16 = _o->just_i16;
709 auto _maybe_i16 = _o->maybe_i16;
710 auto _default_i16 = _o->default_i16;
711 auto _just_u16 = _o->just_u16;
712 auto _maybe_u16 = _o->maybe_u16;
713 auto _default_u16 = _o->default_u16;
714 auto _just_i32 = _o->just_i32;
715 auto _maybe_i32 = _o->maybe_i32;
716 auto _default_i32 = _o->default_i32;
717 auto _just_u32 = _o->just_u32;
718 auto _maybe_u32 = _o->maybe_u32;
719 auto _default_u32 = _o->default_u32;
720 auto _just_i64 = _o->just_i64;
721 auto _maybe_i64 = _o->maybe_i64;
722 auto _default_i64 = _o->default_i64;
723 auto _just_u64 = _o->just_u64;
724 auto _maybe_u64 = _o->maybe_u64;
725 auto _default_u64 = _o->default_u64;
726 auto _just_f32 = _o->just_f32;
727 auto _maybe_f32 = _o->maybe_f32;
728 auto _default_f32 = _o->default_f32;
729 auto _just_f64 = _o->just_f64;
730 auto _maybe_f64 = _o->maybe_f64;
731 auto _default_f64 = _o->default_f64;
732 auto _just_bool = _o->just_bool;
733 auto _maybe_bool = _o->maybe_bool;
734 auto _default_bool = _o->default_bool;
735 auto _just_enum = _o->just_enum;
736 auto _maybe_enum = _o->maybe_enum;
737 auto _default_enum = _o->default_enum;
738 return optional_scalars::CreateScalarStuff(
739 _fbb,
740 _just_i8,
741 _maybe_i8,
742 _default_i8,
743 _just_u8,
744 _maybe_u8,
745 _default_u8,
746 _just_i16,
747 _maybe_i16,
748 _default_i16,
749 _just_u16,
750 _maybe_u16,
751 _default_u16,
752 _just_i32,
753 _maybe_i32,
754 _default_i32,
755 _just_u32,
756 _maybe_u32,
757 _default_u32,
758 _just_i64,
759 _maybe_i64,
760 _default_i64,
761 _just_u64,
762 _maybe_u64,
763 _default_u64,
764 _just_f32,
765 _maybe_f32,
766 _default_f32,
767 _just_f64,
768 _maybe_f64,
769 _default_f64,
770 _just_bool,
771 _maybe_bool,
772 _default_bool,
773 _just_enum,
774 _maybe_enum,
775 _default_enum);
776}
777
778inline const flatbuffers::TypeTable *OptionalByteTypeTable() {
779 static const flatbuffers::TypeCode type_codes[] = {
780 { flatbuffers::ET_CHAR, 0, 0 },
781 { flatbuffers::ET_CHAR, 0, 0 },
782 { flatbuffers::ET_CHAR, 0, 0 }
783 };
784 static const flatbuffers::TypeFunction type_refs[] = {
785 optional_scalars::OptionalByteTypeTable
786 };
787 static const char * const names[] = {
788 "None",
789 "One",
790 "Two"
791 };
792 static const flatbuffers::TypeTable tt = {
793 flatbuffers::ST_ENUM, 3, type_codes, type_refs, nullptr, nullptr, names
794 };
795 return &tt;
796}
797
798inline const flatbuffers::TypeTable *ScalarStuffTypeTable() {
799 static const flatbuffers::TypeCode type_codes[] = {
800 { flatbuffers::ET_CHAR, 0, -1 },
801 { flatbuffers::ET_CHAR, 0, -1 },
802 { flatbuffers::ET_CHAR, 0, -1 },
803 { flatbuffers::ET_UCHAR, 0, -1 },
804 { flatbuffers::ET_UCHAR, 0, -1 },
805 { flatbuffers::ET_UCHAR, 0, -1 },
806 { flatbuffers::ET_SHORT, 0, -1 },
807 { flatbuffers::ET_SHORT, 0, -1 },
808 { flatbuffers::ET_SHORT, 0, -1 },
809 { flatbuffers::ET_USHORT, 0, -1 },
810 { flatbuffers::ET_USHORT, 0, -1 },
811 { flatbuffers::ET_USHORT, 0, -1 },
812 { flatbuffers::ET_INT, 0, -1 },
813 { flatbuffers::ET_INT, 0, -1 },
814 { flatbuffers::ET_INT, 0, -1 },
815 { flatbuffers::ET_UINT, 0, -1 },
816 { flatbuffers::ET_UINT, 0, -1 },
817 { flatbuffers::ET_UINT, 0, -1 },
818 { flatbuffers::ET_LONG, 0, -1 },
819 { flatbuffers::ET_LONG, 0, -1 },
820 { flatbuffers::ET_LONG, 0, -1 },
821 { flatbuffers::ET_ULONG, 0, -1 },
822 { flatbuffers::ET_ULONG, 0, -1 },
823 { flatbuffers::ET_ULONG, 0, -1 },
824 { flatbuffers::ET_FLOAT, 0, -1 },
825 { flatbuffers::ET_FLOAT, 0, -1 },
826 { flatbuffers::ET_FLOAT, 0, -1 },
827 { flatbuffers::ET_DOUBLE, 0, -1 },
828 { flatbuffers::ET_DOUBLE, 0, -1 },
829 { flatbuffers::ET_DOUBLE, 0, -1 },
830 { flatbuffers::ET_BOOL, 0, -1 },
831 { flatbuffers::ET_BOOL, 0, -1 },
832 { flatbuffers::ET_BOOL, 0, -1 },
833 { flatbuffers::ET_CHAR, 0, 0 },
834 { flatbuffers::ET_CHAR, 0, 0 },
835 { flatbuffers::ET_CHAR, 0, 0 }
836 };
837 static const flatbuffers::TypeFunction type_refs[] = {
838 optional_scalars::OptionalByteTypeTable
839 };
840 static const char * const names[] = {
841 "just_i8",
842 "maybe_i8",
843 "default_i8",
844 "just_u8",
845 "maybe_u8",
846 "default_u8",
847 "just_i16",
848 "maybe_i16",
849 "default_i16",
850 "just_u16",
851 "maybe_u16",
852 "default_u16",
853 "just_i32",
854 "maybe_i32",
855 "default_i32",
856 "just_u32",
857 "maybe_u32",
858 "default_u32",
859 "just_i64",
860 "maybe_i64",
861 "default_i64",
862 "just_u64",
863 "maybe_u64",
864 "default_u64",
865 "just_f32",
866 "maybe_f32",
867 "default_f32",
868 "just_f64",
869 "maybe_f64",
870 "default_f64",
871 "just_bool",
872 "maybe_bool",
873 "default_bool",
874 "just_enum",
875 "maybe_enum",
876 "default_enum"
877 };
878 static const flatbuffers::TypeTable tt = {
879 flatbuffers::ST_TABLE, 36, type_codes, type_refs, nullptr, nullptr, names
880 };
881 return &tt;
882}
883
884inline const optional_scalars::ScalarStuff *GetScalarStuff(const void *buf) {
885 return flatbuffers::GetRoot<optional_scalars::ScalarStuff>(buf);
886}
887
888inline const optional_scalars::ScalarStuff *GetSizePrefixedScalarStuff(const void *buf) {
889 return flatbuffers::GetSizePrefixedRoot<optional_scalars::ScalarStuff>(buf);
890}
891
892inline ScalarStuff *GetMutableScalarStuff(void *buf) {
893 return flatbuffers::GetMutableRoot<ScalarStuff>(buf);
894}
895
James Kuszmaul8e62b022022-03-22 09:33:25 -0700896inline optional_scalars::ScalarStuff *GetMutableSizePrefixedScalarStuff(void *buf) {
897 return flatbuffers::GetMutableSizePrefixedRoot<optional_scalars::ScalarStuff>(buf);
898}
899
Austin Schuh272c6132020-11-14 16:37:52 -0800900inline const char *ScalarStuffIdentifier() {
901 return "NULL";
902}
903
904inline bool ScalarStuffBufferHasIdentifier(const void *buf) {
905 return flatbuffers::BufferHasIdentifier(
906 buf, ScalarStuffIdentifier());
907}
908
James Kuszmaul8e62b022022-03-22 09:33:25 -0700909inline bool SizePrefixedScalarStuffBufferHasIdentifier(const void *buf) {
910 return flatbuffers::BufferHasIdentifier(
911 buf, ScalarStuffIdentifier(), true);
912}
913
Austin Schuh272c6132020-11-14 16:37:52 -0800914inline bool VerifyScalarStuffBuffer(
915 flatbuffers::Verifier &verifier) {
916 return verifier.VerifyBuffer<optional_scalars::ScalarStuff>(ScalarStuffIdentifier());
917}
918
919inline bool VerifySizePrefixedScalarStuffBuffer(
920 flatbuffers::Verifier &verifier) {
921 return verifier.VerifySizePrefixedBuffer<optional_scalars::ScalarStuff>(ScalarStuffIdentifier());
922}
923
924inline const char *ScalarStuffExtension() {
925 return "mon";
926}
927
928inline void FinishScalarStuffBuffer(
929 flatbuffers::FlatBufferBuilder &fbb,
930 flatbuffers::Offset<optional_scalars::ScalarStuff> root) {
931 fbb.Finish(root, ScalarStuffIdentifier());
932}
933
934inline void FinishSizePrefixedScalarStuffBuffer(
935 flatbuffers::FlatBufferBuilder &fbb,
936 flatbuffers::Offset<optional_scalars::ScalarStuff> root) {
937 fbb.FinishSizePrefixed(root, ScalarStuffIdentifier());
938}
939
940inline flatbuffers::unique_ptr<optional_scalars::ScalarStuffT> UnPackScalarStuff(
941 const void *buf,
942 const flatbuffers::resolver_function_t *res = nullptr) {
943 return flatbuffers::unique_ptr<optional_scalars::ScalarStuffT>(GetScalarStuff(buf)->UnPack(res));
944}
945
946inline flatbuffers::unique_ptr<optional_scalars::ScalarStuffT> UnPackSizePrefixedScalarStuff(
947 const void *buf,
948 const flatbuffers::resolver_function_t *res = nullptr) {
949 return flatbuffers::unique_ptr<optional_scalars::ScalarStuffT>(GetSizePrefixedScalarStuff(buf)->UnPack(res));
950}
951
952} // namespace optional_scalars
953
954#endif // FLATBUFFERS_GENERATED_OPTIONALSCALARS_OPTIONAL_SCALARS_H_