...

Text file src/github.com/google/flatbuffers/tests/optional_scalars_generated.h

Documentation: github.com/google/flatbuffers/tests

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

View as plain text