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