1 // automatically generated by the FlatBuffers compiler, do not modify
2 
3 
4 #ifndef FLATBUFFERS_GENERATED_MONSTERTEST_MYGAME_EXAMPLE_H_
5 #define FLATBUFFERS_GENERATED_MONSTERTEST_MYGAME_EXAMPLE_H_
6 
7 #include "flatbuffers/flatbuffers.h"
8 #include "flatbuffers/flexbuffers.h"
9 
10 namespace MyGame {
11 
12 struct InParentNamespace;
13 struct InParentNamespaceBuilder;
14 struct InParentNamespaceT;
15 
16 namespace Example2 {
17 
18 struct Monster;
19 struct MonsterBuilder;
20 struct MonsterT;
21 
22 }  // namespace Example2
23 
24 namespace Example {
25 
26 struct Test;
27 
28 struct TestSimpleTableWithEnum;
29 struct TestSimpleTableWithEnumBuilder;
30 struct TestSimpleTableWithEnumT;
31 
32 struct Vec3;
33 
34 struct Ability;
35 
36 struct Stat;
37 struct StatBuilder;
38 struct StatT;
39 
40 struct Referrable;
41 struct ReferrableBuilder;
42 struct ReferrableT;
43 
44 struct Monster;
45 struct MonsterBuilder;
46 struct MonsterT;
47 
48 struct TypeAliases;
49 struct TypeAliasesBuilder;
50 struct TypeAliasesT;
51 
52 }  // namespace Example
53 
54 inline const flatbuffers::TypeTable *InParentNamespaceTypeTable();
55 
56 namespace Example2 {
57 
58 inline const flatbuffers::TypeTable *MonsterTypeTable();
59 
60 }  // namespace Example2
61 
62 namespace Example {
63 
64 inline const flatbuffers::TypeTable *TestTypeTable();
65 
66 inline const flatbuffers::TypeTable *TestSimpleTableWithEnumTypeTable();
67 
68 inline const flatbuffers::TypeTable *Vec3TypeTable();
69 
70 inline const flatbuffers::TypeTable *AbilityTypeTable();
71 
72 inline const flatbuffers::TypeTable *StatTypeTable();
73 
74 inline const flatbuffers::TypeTable *ReferrableTypeTable();
75 
76 inline const flatbuffers::TypeTable *MonsterTypeTable();
77 
78 inline const flatbuffers::TypeTable *TypeAliasesTypeTable();
79 
80 /// Composite components of Monster color.
81 enum class Color : uint8_t {
82   Red = 1,
83   /// \brief color Green
84   /// Green is bit_flag with value (1u << 1)
85   Green = 2,
86   /// \brief color Blue (1u << 3)
87   Blue = 8,
88   NONE = 0,
89   ANY = 11
90 };
FLATBUFFERS_DEFINE_BITMASK_OPERATORS(Color,uint8_t)91 FLATBUFFERS_DEFINE_BITMASK_OPERATORS(Color, uint8_t)
92 
93 inline const Color (&EnumValuesColor())[3] {
94   static const Color values[] = {
95     Color::Red,
96     Color::Green,
97     Color::Blue
98   };
99   return values;
100 }
101 
EnumNamesColor()102 inline const char * const *EnumNamesColor() {
103   static const char * const names[9] = {
104     "Red",
105     "Green",
106     "",
107     "",
108     "",
109     "",
110     "",
111     "Blue",
112     nullptr
113   };
114   return names;
115 }
116 
EnumNameColor(Color e)117 inline const char *EnumNameColor(Color e) {
118   if (flatbuffers::IsOutRange(e, Color::Red, Color::Blue)) return "";
119   const size_t index = static_cast<size_t>(e) - static_cast<size_t>(Color::Red);
120   return EnumNamesColor()[index];
121 }
122 
123 enum class Race : int8_t {
124   None = -1,
125   Human = 0,
126   Dwarf = 1,
127   Elf = 2,
128   MIN = None,
129   MAX = Elf
130 };
131 
EnumValuesRace()132 inline const Race (&EnumValuesRace())[4] {
133   static const Race values[] = {
134     Race::None,
135     Race::Human,
136     Race::Dwarf,
137     Race::Elf
138   };
139   return values;
140 }
141 
EnumNamesRace()142 inline const char * const *EnumNamesRace() {
143   static const char * const names[5] = {
144     "None",
145     "Human",
146     "Dwarf",
147     "Elf",
148     nullptr
149   };
150   return names;
151 }
152 
EnumNameRace(Race e)153 inline const char *EnumNameRace(Race e) {
154   if (flatbuffers::IsOutRange(e, Race::None, Race::Elf)) return "";
155   const size_t index = static_cast<size_t>(e) - static_cast<size_t>(Race::None);
156   return EnumNamesRace()[index];
157 }
158 
159 enum class Any : uint8_t {
160   NONE = 0,
161   Monster = 1,
162   TestSimpleTableWithEnum = 2,
163   MyGame_Example2_Monster = 3,
164   MIN = NONE,
165   MAX = MyGame_Example2_Monster
166 };
167 
EnumValuesAny()168 inline const Any (&EnumValuesAny())[4] {
169   static const Any values[] = {
170     Any::NONE,
171     Any::Monster,
172     Any::TestSimpleTableWithEnum,
173     Any::MyGame_Example2_Monster
174   };
175   return values;
176 }
177 
EnumNamesAny()178 inline const char * const *EnumNamesAny() {
179   static const char * const names[5] = {
180     "NONE",
181     "Monster",
182     "TestSimpleTableWithEnum",
183     "MyGame_Example2_Monster",
184     nullptr
185   };
186   return names;
187 }
188 
EnumNameAny(Any e)189 inline const char *EnumNameAny(Any e) {
190   if (flatbuffers::IsOutRange(e, Any::NONE, Any::MyGame_Example2_Monster)) return "";
191   const size_t index = static_cast<size_t>(e);
192   return EnumNamesAny()[index];
193 }
194 
195 template<typename T> struct AnyTraits {
196   static const Any enum_value = Any::NONE;
197 };
198 
199 template<> struct AnyTraits<MyGame::Example::Monster> {
200   static const Any enum_value = Any::Monster;
201 };
202 
203 template<> struct AnyTraits<MyGame::Example::TestSimpleTableWithEnum> {
204   static const Any enum_value = Any::TestSimpleTableWithEnum;
205 };
206 
207 template<> struct AnyTraits<MyGame::Example2::Monster> {
208   static const Any enum_value = Any::MyGame_Example2_Monster;
209 };
210 
211 struct AnyUnion {
212   Any type;
213   void *value;
214 
215   AnyUnion() : type(Any::NONE), value(nullptr) {}
216   AnyUnion(AnyUnion&& u) FLATBUFFERS_NOEXCEPT :
217     type(Any::NONE), value(nullptr)
218     { std::swap(type, u.type); std::swap(value, u.value); }
219   AnyUnion(const AnyUnion &);
220   AnyUnion &operator=(const AnyUnion &u)
221     { AnyUnion t(u); std::swap(type, t.type); std::swap(value, t.value); return *this; }
222   AnyUnion &operator=(AnyUnion &&u) FLATBUFFERS_NOEXCEPT
223     { std::swap(type, u.type); std::swap(value, u.value); return *this; }
224   ~AnyUnion() { Reset(); }
225 
226   void Reset();
227 
228 #ifndef FLATBUFFERS_CPP98_STL
229   template <typename T>
230   void Set(T&& val) {
231     using RT = typename std::remove_reference<T>::type;
232     Reset();
233     type = AnyTraits<typename RT::TableType>::enum_value;
234     if (type != Any::NONE) {
235       value = new RT(std::forward<T>(val));
236     }
237   }
238 #endif  // FLATBUFFERS_CPP98_STL
239 
240   static void *UnPack(const void *obj, Any type, const flatbuffers::resolver_function_t *resolver);
241   flatbuffers::Offset<void> Pack(flatbuffers::FlatBufferBuilder &_fbb, const flatbuffers::rehasher_function_t *_rehasher = nullptr) const;
242 
243   MyGame::Example::MonsterT *AsMonster() {
244     return type == Any::Monster ?
245       reinterpret_cast<MyGame::Example::MonsterT *>(value) : nullptr;
246   }
247   const MyGame::Example::MonsterT *AsMonster() const {
248     return type == Any::Monster ?
249       reinterpret_cast<const MyGame::Example::MonsterT *>(value) : nullptr;
250   }
251   MyGame::Example::TestSimpleTableWithEnumT *AsTestSimpleTableWithEnum() {
252     return type == Any::TestSimpleTableWithEnum ?
253       reinterpret_cast<MyGame::Example::TestSimpleTableWithEnumT *>(value) : nullptr;
254   }
255   const MyGame::Example::TestSimpleTableWithEnumT *AsTestSimpleTableWithEnum() const {
256     return type == Any::TestSimpleTableWithEnum ?
257       reinterpret_cast<const MyGame::Example::TestSimpleTableWithEnumT *>(value) : nullptr;
258   }
259   MyGame::Example2::MonsterT *AsMyGame_Example2_Monster() {
260     return type == Any::MyGame_Example2_Monster ?
261       reinterpret_cast<MyGame::Example2::MonsterT *>(value) : nullptr;
262   }
263   const MyGame::Example2::MonsterT *AsMyGame_Example2_Monster() const {
264     return type == Any::MyGame_Example2_Monster ?
265       reinterpret_cast<const MyGame::Example2::MonsterT *>(value) : nullptr;
266   }
267 };
268 
269 bool VerifyAny(flatbuffers::Verifier &verifier, const void *obj, Any type);
270 bool VerifyAnyVector(flatbuffers::Verifier &verifier, const flatbuffers::Vector<flatbuffers::Offset<void>> *values, const flatbuffers::Vector<uint8_t> *types);
271 
272 enum class AnyUniqueAliases : uint8_t {
273   NONE = 0,
274   M = 1,
275   TS = 2,
276   M2 = 3,
277   MIN = NONE,
278   MAX = M2
279 };
280 
281 inline const AnyUniqueAliases (&EnumValuesAnyUniqueAliases())[4] {
282   static const AnyUniqueAliases values[] = {
283     AnyUniqueAliases::NONE,
284     AnyUniqueAliases::M,
285     AnyUniqueAliases::TS,
286     AnyUniqueAliases::M2
287   };
288   return values;
289 }
290 
291 inline const char * const *EnumNamesAnyUniqueAliases() {
292   static const char * const names[5] = {
293     "NONE",
294     "M",
295     "TS",
296     "M2",
297     nullptr
298   };
299   return names;
300 }
301 
302 inline const char *EnumNameAnyUniqueAliases(AnyUniqueAliases e) {
303   if (flatbuffers::IsOutRange(e, AnyUniqueAliases::NONE, AnyUniqueAliases::M2)) return "";
304   const size_t index = static_cast<size_t>(e);
305   return EnumNamesAnyUniqueAliases()[index];
306 }
307 
308 template<typename T> struct AnyUniqueAliasesTraits {
309   static const AnyUniqueAliases enum_value = AnyUniqueAliases::NONE;
310 };
311 
312 template<> struct AnyUniqueAliasesTraits<MyGame::Example::Monster> {
313   static const AnyUniqueAliases enum_value = AnyUniqueAliases::M;
314 };
315 
316 template<> struct AnyUniqueAliasesTraits<MyGame::Example::TestSimpleTableWithEnum> {
317   static const AnyUniqueAliases enum_value = AnyUniqueAliases::TS;
318 };
319 
320 template<> struct AnyUniqueAliasesTraits<MyGame::Example2::Monster> {
321   static const AnyUniqueAliases enum_value = AnyUniqueAliases::M2;
322 };
323 
324 struct AnyUniqueAliasesUnion {
325   AnyUniqueAliases type;
326   void *value;
327 
328   AnyUniqueAliasesUnion() : type(AnyUniqueAliases::NONE), value(nullptr) {}
329   AnyUniqueAliasesUnion(AnyUniqueAliasesUnion&& u) FLATBUFFERS_NOEXCEPT :
330     type(AnyUniqueAliases::NONE), value(nullptr)
331     { std::swap(type, u.type); std::swap(value, u.value); }
332   AnyUniqueAliasesUnion(const AnyUniqueAliasesUnion &);
333   AnyUniqueAliasesUnion &operator=(const AnyUniqueAliasesUnion &u)
334     { AnyUniqueAliasesUnion t(u); std::swap(type, t.type); std::swap(value, t.value); return *this; }
335   AnyUniqueAliasesUnion &operator=(AnyUniqueAliasesUnion &&u) FLATBUFFERS_NOEXCEPT
336     { std::swap(type, u.type); std::swap(value, u.value); return *this; }
337   ~AnyUniqueAliasesUnion() { Reset(); }
338 
339   void Reset();
340 
341 #ifndef FLATBUFFERS_CPP98_STL
342   template <typename T>
343   void Set(T&& val) {
344     using RT = typename std::remove_reference<T>::type;
345     Reset();
346     type = AnyUniqueAliasesTraits<typename RT::TableType>::enum_value;
347     if (type != AnyUniqueAliases::NONE) {
348       value = new RT(std::forward<T>(val));
349     }
350   }
351 #endif  // FLATBUFFERS_CPP98_STL
352 
353   static void *UnPack(const void *obj, AnyUniqueAliases type, const flatbuffers::resolver_function_t *resolver);
354   flatbuffers::Offset<void> Pack(flatbuffers::FlatBufferBuilder &_fbb, const flatbuffers::rehasher_function_t *_rehasher = nullptr) const;
355 
356   MyGame::Example::MonsterT *AsM() {
357     return type == AnyUniqueAliases::M ?
358       reinterpret_cast<MyGame::Example::MonsterT *>(value) : nullptr;
359   }
360   const MyGame::Example::MonsterT *AsM() const {
361     return type == AnyUniqueAliases::M ?
362       reinterpret_cast<const MyGame::Example::MonsterT *>(value) : nullptr;
363   }
364   MyGame::Example::TestSimpleTableWithEnumT *AsTS() {
365     return type == AnyUniqueAliases::TS ?
366       reinterpret_cast<MyGame::Example::TestSimpleTableWithEnumT *>(value) : nullptr;
367   }
368   const MyGame::Example::TestSimpleTableWithEnumT *AsTS() const {
369     return type == AnyUniqueAliases::TS ?
370       reinterpret_cast<const MyGame::Example::TestSimpleTableWithEnumT *>(value) : nullptr;
371   }
372   MyGame::Example2::MonsterT *AsM2() {
373     return type == AnyUniqueAliases::M2 ?
374       reinterpret_cast<MyGame::Example2::MonsterT *>(value) : nullptr;
375   }
376   const MyGame::Example2::MonsterT *AsM2() const {
377     return type == AnyUniqueAliases::M2 ?
378       reinterpret_cast<const MyGame::Example2::MonsterT *>(value) : nullptr;
379   }
380 };
381 
382 bool VerifyAnyUniqueAliases(flatbuffers::Verifier &verifier, const void *obj, AnyUniqueAliases type);
383 bool VerifyAnyUniqueAliasesVector(flatbuffers::Verifier &verifier, const flatbuffers::Vector<flatbuffers::Offset<void>> *values, const flatbuffers::Vector<uint8_t> *types);
384 
385 enum class AnyAmbiguousAliases : uint8_t {
386   NONE = 0,
387   M1 = 1,
388   M2 = 2,
389   M3 = 3,
390   MIN = NONE,
391   MAX = M3
392 };
393 
394 inline const AnyAmbiguousAliases (&EnumValuesAnyAmbiguousAliases())[4] {
395   static const AnyAmbiguousAliases values[] = {
396     AnyAmbiguousAliases::NONE,
397     AnyAmbiguousAliases::M1,
398     AnyAmbiguousAliases::M2,
399     AnyAmbiguousAliases::M3
400   };
401   return values;
402 }
403 
404 inline const char * const *EnumNamesAnyAmbiguousAliases() {
405   static const char * const names[5] = {
406     "NONE",
407     "M1",
408     "M2",
409     "M3",
410     nullptr
411   };
412   return names;
413 }
414 
415 inline const char *EnumNameAnyAmbiguousAliases(AnyAmbiguousAliases e) {
416   if (flatbuffers::IsOutRange(e, AnyAmbiguousAliases::NONE, AnyAmbiguousAliases::M3)) return "";
417   const size_t index = static_cast<size_t>(e);
418   return EnumNamesAnyAmbiguousAliases()[index];
419 }
420 
421 struct AnyAmbiguousAliasesUnion {
422   AnyAmbiguousAliases type;
423   void *value;
424 
425   AnyAmbiguousAliasesUnion() : type(AnyAmbiguousAliases::NONE), value(nullptr) {}
426   AnyAmbiguousAliasesUnion(AnyAmbiguousAliasesUnion&& u) FLATBUFFERS_NOEXCEPT :
427     type(AnyAmbiguousAliases::NONE), value(nullptr)
428     { std::swap(type, u.type); std::swap(value, u.value); }
429   AnyAmbiguousAliasesUnion(const AnyAmbiguousAliasesUnion &);
430   AnyAmbiguousAliasesUnion &operator=(const AnyAmbiguousAliasesUnion &u)
431     { AnyAmbiguousAliasesUnion t(u); std::swap(type, t.type); std::swap(value, t.value); return *this; }
432   AnyAmbiguousAliasesUnion &operator=(AnyAmbiguousAliasesUnion &&u) FLATBUFFERS_NOEXCEPT
433     { std::swap(type, u.type); std::swap(value, u.value); return *this; }
434   ~AnyAmbiguousAliasesUnion() { Reset(); }
435 
436   void Reset();
437 
438   static void *UnPack(const void *obj, AnyAmbiguousAliases type, const flatbuffers::resolver_function_t *resolver);
439   flatbuffers::Offset<void> Pack(flatbuffers::FlatBufferBuilder &_fbb, const flatbuffers::rehasher_function_t *_rehasher = nullptr) const;
440 
441   MyGame::Example::MonsterT *AsM1() {
442     return type == AnyAmbiguousAliases::M1 ?
443       reinterpret_cast<MyGame::Example::MonsterT *>(value) : nullptr;
444   }
445   const MyGame::Example::MonsterT *AsM1() const {
446     return type == AnyAmbiguousAliases::M1 ?
447       reinterpret_cast<const MyGame::Example::MonsterT *>(value) : nullptr;
448   }
449   MyGame::Example::MonsterT *AsM2() {
450     return type == AnyAmbiguousAliases::M2 ?
451       reinterpret_cast<MyGame::Example::MonsterT *>(value) : nullptr;
452   }
453   const MyGame::Example::MonsterT *AsM2() const {
454     return type == AnyAmbiguousAliases::M2 ?
455       reinterpret_cast<const MyGame::Example::MonsterT *>(value) : nullptr;
456   }
457   MyGame::Example::MonsterT *AsM3() {
458     return type == AnyAmbiguousAliases::M3 ?
459       reinterpret_cast<MyGame::Example::MonsterT *>(value) : nullptr;
460   }
461   const MyGame::Example::MonsterT *AsM3() const {
462     return type == AnyAmbiguousAliases::M3 ?
463       reinterpret_cast<const MyGame::Example::MonsterT *>(value) : nullptr;
464   }
465 };
466 
467 bool VerifyAnyAmbiguousAliases(flatbuffers::Verifier &verifier, const void *obj, AnyAmbiguousAliases type);
468 bool VerifyAnyAmbiguousAliasesVector(flatbuffers::Verifier &verifier, const flatbuffers::Vector<flatbuffers::Offset<void>> *values, const flatbuffers::Vector<uint8_t> *types);
469 
470 FLATBUFFERS_MANUALLY_ALIGNED_STRUCT(2) Test FLATBUFFERS_FINAL_CLASS {
471  private:
472   int16_t a_;
473   int8_t b_;
474   int8_t padding0__;
475 
476  public:
477   static const flatbuffers::TypeTable *MiniReflectTypeTable() {
478     return TestTypeTable();
479   }
480   Test() {
481     memset(static_cast<void *>(this), 0, sizeof(Test));
482   }
483   Test(int16_t _a, int8_t _b)
484       : a_(flatbuffers::EndianScalar(_a)),
485         b_(flatbuffers::EndianScalar(_b)),
486         padding0__(0) {
487     (void)padding0__;
488   }
489   int16_t a() const {
490     return flatbuffers::EndianScalar(a_);
491   }
492   void mutate_a(int16_t _a) {
493     flatbuffers::WriteScalar(&a_, _a);
494   }
495   int8_t b() const {
496     return flatbuffers::EndianScalar(b_);
497   }
498   void mutate_b(int8_t _b) {
499     flatbuffers::WriteScalar(&b_, _b);
500   }
501 };
502 FLATBUFFERS_STRUCT_END(Test, 4);
503 
504 FLATBUFFERS_MANUALLY_ALIGNED_STRUCT(8) Vec3 FLATBUFFERS_FINAL_CLASS {
505  private:
506   float x_;
507   float y_;
508   float z_;
509   int32_t padding0__;
510   double test1_;
511   uint8_t test2_;
512   int8_t padding1__;
513   MyGame::Example::Test test3_;
514   int16_t padding2__;
515 
516  public:
517   static const flatbuffers::TypeTable *MiniReflectTypeTable() {
518     return Vec3TypeTable();
519   }
520   Vec3() {
521     memset(static_cast<void *>(this), 0, sizeof(Vec3));
522   }
523   Vec3(float _x, float _y, float _z, double _test1, MyGame::Example::Color _test2, const MyGame::Example::Test &_test3)
524       : x_(flatbuffers::EndianScalar(_x)),
525         y_(flatbuffers::EndianScalar(_y)),
526         z_(flatbuffers::EndianScalar(_z)),
527         padding0__(0),
528         test1_(flatbuffers::EndianScalar(_test1)),
529         test2_(flatbuffers::EndianScalar(static_cast<uint8_t>(_test2))),
530         padding1__(0),
531         test3_(_test3),
532         padding2__(0) {
533     (void)padding0__;
534     (void)padding1__;
535     (void)padding2__;
536   }
537   float x() const {
538     return flatbuffers::EndianScalar(x_);
539   }
540   void mutate_x(float _x) {
541     flatbuffers::WriteScalar(&x_, _x);
542   }
543   float y() const {
544     return flatbuffers::EndianScalar(y_);
545   }
546   void mutate_y(float _y) {
547     flatbuffers::WriteScalar(&y_, _y);
548   }
549   float z() const {
550     return flatbuffers::EndianScalar(z_);
551   }
552   void mutate_z(float _z) {
553     flatbuffers::WriteScalar(&z_, _z);
554   }
555   double test1() const {
556     return flatbuffers::EndianScalar(test1_);
557   }
558   void mutate_test1(double _test1) {
559     flatbuffers::WriteScalar(&test1_, _test1);
560   }
561   MyGame::Example::Color test2() const {
562     return static_cast<MyGame::Example::Color>(flatbuffers::EndianScalar(test2_));
563   }
564   void mutate_test2(MyGame::Example::Color _test2) {
565     flatbuffers::WriteScalar(&test2_, static_cast<uint8_t>(_test2));
566   }
567   const MyGame::Example::Test &test3() const {
568     return test3_;
569   }
570   MyGame::Example::Test &mutable_test3() {
571     return test3_;
572   }
573 };
574 FLATBUFFERS_STRUCT_END(Vec3, 32);
575 
576 FLATBUFFERS_MANUALLY_ALIGNED_STRUCT(4) Ability FLATBUFFERS_FINAL_CLASS {
577  private:
578   uint32_t id_;
579   uint32_t distance_;
580 
581  public:
582   static const flatbuffers::TypeTable *MiniReflectTypeTable() {
583     return AbilityTypeTable();
584   }
585   Ability() {
586     memset(static_cast<void *>(this), 0, sizeof(Ability));
587   }
588   Ability(uint32_t _id, uint32_t _distance)
589       : id_(flatbuffers::EndianScalar(_id)),
590         distance_(flatbuffers::EndianScalar(_distance)) {
591   }
592   uint32_t id() const {
593     return flatbuffers::EndianScalar(id_);
594   }
595   void mutate_id(uint32_t _id) {
596     flatbuffers::WriteScalar(&id_, _id);
597   }
598   bool KeyCompareLessThan(const Ability *o) const {
599     return id() < o->id();
600   }
601   int KeyCompareWithValue(uint32_t val) const {
602     return static_cast<int>(id() > val) - static_cast<int>(id() < val);
603   }
604   uint32_t distance() const {
605     return flatbuffers::EndianScalar(distance_);
606   }
607   void mutate_distance(uint32_t _distance) {
608     flatbuffers::WriteScalar(&distance_, _distance);
609   }
610 };
611 FLATBUFFERS_STRUCT_END(Ability, 8);
612 
613 }  // namespace Example
614 
615 struct InParentNamespaceT : public flatbuffers::NativeTable {
616   typedef InParentNamespace TableType;
617   InParentNamespaceT() {
618   }
619 };
620 
621 struct InParentNamespace FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
622   typedef InParentNamespaceT NativeTableType;
623   typedef InParentNamespaceBuilder Builder;
624   struct Traits;
625   static const flatbuffers::TypeTable *MiniReflectTypeTable() {
626     return InParentNamespaceTypeTable();
627   }
628   bool Verify(flatbuffers::Verifier &verifier) const {
629     return VerifyTableStart(verifier) &&
630            verifier.EndTable();
631   }
632   InParentNamespaceT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const;
633   void UnPackTo(InParentNamespaceT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const;
634   static flatbuffers::Offset<InParentNamespace> Pack(flatbuffers::FlatBufferBuilder &_fbb, const InParentNamespaceT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr);
635 };
636 
637 struct InParentNamespaceBuilder {
638   typedef InParentNamespace Table;
639   flatbuffers::FlatBufferBuilder &fbb_;
640   flatbuffers::uoffset_t start_;
641   explicit InParentNamespaceBuilder(flatbuffers::FlatBufferBuilder &_fbb)
642         : fbb_(_fbb) {
643     start_ = fbb_.StartTable();
644   }
645   InParentNamespaceBuilder &operator=(const InParentNamespaceBuilder &);
646   flatbuffers::Offset<InParentNamespace> Finish() {
647     const auto end = fbb_.EndTable(start_);
648     auto o = flatbuffers::Offset<InParentNamespace>(end);
649     return o;
650   }
651 };
652 
653 inline flatbuffers::Offset<InParentNamespace> CreateInParentNamespace(
654     flatbuffers::FlatBufferBuilder &_fbb) {
655   InParentNamespaceBuilder builder_(_fbb);
656   return builder_.Finish();
657 }
658 
659 struct InParentNamespace::Traits {
660   using type = InParentNamespace;
661   static auto constexpr Create = CreateInParentNamespace;
662 };
663 
664 flatbuffers::Offset<InParentNamespace> CreateInParentNamespace(flatbuffers::FlatBufferBuilder &_fbb, const InParentNamespaceT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr);
665 
666 namespace Example2 {
667 
668 struct MonsterT : public flatbuffers::NativeTable {
669   typedef Monster TableType;
670   MonsterT() {
671   }
672 };
673 
674 struct Monster FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
675   typedef MonsterT NativeTableType;
676   typedef MonsterBuilder Builder;
677   struct Traits;
678   static const flatbuffers::TypeTable *MiniReflectTypeTable() {
679     return MonsterTypeTable();
680   }
681   bool Verify(flatbuffers::Verifier &verifier) const {
682     return VerifyTableStart(verifier) &&
683            verifier.EndTable();
684   }
685   MonsterT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const;
686   void UnPackTo(MonsterT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const;
687   static flatbuffers::Offset<Monster> Pack(flatbuffers::FlatBufferBuilder &_fbb, const MonsterT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr);
688 };
689 
690 struct MonsterBuilder {
691   typedef Monster Table;
692   flatbuffers::FlatBufferBuilder &fbb_;
693   flatbuffers::uoffset_t start_;
694   explicit MonsterBuilder(flatbuffers::FlatBufferBuilder &_fbb)
695         : fbb_(_fbb) {
696     start_ = fbb_.StartTable();
697   }
698   MonsterBuilder &operator=(const MonsterBuilder &);
699   flatbuffers::Offset<Monster> Finish() {
700     const auto end = fbb_.EndTable(start_);
701     auto o = flatbuffers::Offset<Monster>(end);
702     return o;
703   }
704 };
705 
706 inline flatbuffers::Offset<Monster> CreateMonster(
707     flatbuffers::FlatBufferBuilder &_fbb) {
708   MonsterBuilder builder_(_fbb);
709   return builder_.Finish();
710 }
711 
712 struct Monster::Traits {
713   using type = Monster;
714   static auto constexpr Create = CreateMonster;
715 };
716 
717 flatbuffers::Offset<Monster> CreateMonster(flatbuffers::FlatBufferBuilder &_fbb, const MonsterT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr);
718 
719 }  // namespace Example2
720 
721 namespace Example {
722 
723 struct TestSimpleTableWithEnumT : public flatbuffers::NativeTable {
724   typedef TestSimpleTableWithEnum TableType;
725   MyGame::Example::Color color;
726   TestSimpleTableWithEnumT()
727       : color(MyGame::Example::Color::Green) {
728   }
729 };
730 
731 struct TestSimpleTableWithEnum FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
732   typedef TestSimpleTableWithEnumT NativeTableType;
733   typedef TestSimpleTableWithEnumBuilder Builder;
734   struct Traits;
735   static const flatbuffers::TypeTable *MiniReflectTypeTable() {
736     return TestSimpleTableWithEnumTypeTable();
737   }
738   enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
739     VT_COLOR = 4
740   };
741   MyGame::Example::Color color() const {
742     return static_cast<MyGame::Example::Color>(GetField<uint8_t>(VT_COLOR, 2));
743   }
744   bool mutate_color(MyGame::Example::Color _color) {
745     return SetField<uint8_t>(VT_COLOR, static_cast<uint8_t>(_color), 2);
746   }
747   bool Verify(flatbuffers::Verifier &verifier) const {
748     return VerifyTableStart(verifier) &&
749            VerifyField<uint8_t>(verifier, VT_COLOR) &&
750            verifier.EndTable();
751   }
752   TestSimpleTableWithEnumT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const;
753   void UnPackTo(TestSimpleTableWithEnumT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const;
754   static flatbuffers::Offset<TestSimpleTableWithEnum> Pack(flatbuffers::FlatBufferBuilder &_fbb, const TestSimpleTableWithEnumT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr);
755 };
756 
757 struct TestSimpleTableWithEnumBuilder {
758   typedef TestSimpleTableWithEnum Table;
759   flatbuffers::FlatBufferBuilder &fbb_;
760   flatbuffers::uoffset_t start_;
761   void add_color(MyGame::Example::Color color) {
762     fbb_.AddElement<uint8_t>(TestSimpleTableWithEnum::VT_COLOR, static_cast<uint8_t>(color), 2);
763   }
764   explicit TestSimpleTableWithEnumBuilder(flatbuffers::FlatBufferBuilder &_fbb)
765         : fbb_(_fbb) {
766     start_ = fbb_.StartTable();
767   }
768   TestSimpleTableWithEnumBuilder &operator=(const TestSimpleTableWithEnumBuilder &);
769   flatbuffers::Offset<TestSimpleTableWithEnum> Finish() {
770     const auto end = fbb_.EndTable(start_);
771     auto o = flatbuffers::Offset<TestSimpleTableWithEnum>(end);
772     return o;
773   }
774 };
775 
776 inline flatbuffers::Offset<TestSimpleTableWithEnum> CreateTestSimpleTableWithEnum(
777     flatbuffers::FlatBufferBuilder &_fbb,
778     MyGame::Example::Color color = MyGame::Example::Color::Green) {
779   TestSimpleTableWithEnumBuilder builder_(_fbb);
780   builder_.add_color(color);
781   return builder_.Finish();
782 }
783 
784 struct TestSimpleTableWithEnum::Traits {
785   using type = TestSimpleTableWithEnum;
786   static auto constexpr Create = CreateTestSimpleTableWithEnum;
787 };
788 
789 flatbuffers::Offset<TestSimpleTableWithEnum> CreateTestSimpleTableWithEnum(flatbuffers::FlatBufferBuilder &_fbb, const TestSimpleTableWithEnumT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr);
790 
791 struct StatT : public flatbuffers::NativeTable {
792   typedef Stat TableType;
793   std::string id;
794   int64_t val;
795   uint16_t count;
796   StatT()
797       : val(0),
798         count(0) {
799   }
800 };
801 
802 struct Stat FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
803   typedef StatT NativeTableType;
804   typedef StatBuilder Builder;
805   struct Traits;
806   static const flatbuffers::TypeTable *MiniReflectTypeTable() {
807     return StatTypeTable();
808   }
809   enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
810     VT_ID = 4,
811     VT_VAL = 6,
812     VT_COUNT = 8
813   };
814   const flatbuffers::String *id() const {
815     return GetPointer<const flatbuffers::String *>(VT_ID);
816   }
817   flatbuffers::String *mutable_id() {
818     return GetPointer<flatbuffers::String *>(VT_ID);
819   }
820   int64_t val() const {
821     return GetField<int64_t>(VT_VAL, 0);
822   }
823   bool mutate_val(int64_t _val) {
824     return SetField<int64_t>(VT_VAL, _val, 0);
825   }
826   uint16_t count() const {
827     return GetField<uint16_t>(VT_COUNT, 0);
828   }
829   bool mutate_count(uint16_t _count) {
830     return SetField<uint16_t>(VT_COUNT, _count, 0);
831   }
832   bool Verify(flatbuffers::Verifier &verifier) const {
833     return VerifyTableStart(verifier) &&
834            VerifyOffset(verifier, VT_ID) &&
835            verifier.VerifyString(id()) &&
836            VerifyField<int64_t>(verifier, VT_VAL) &&
837            VerifyField<uint16_t>(verifier, VT_COUNT) &&
838            verifier.EndTable();
839   }
840   StatT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const;
841   void UnPackTo(StatT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const;
842   static flatbuffers::Offset<Stat> Pack(flatbuffers::FlatBufferBuilder &_fbb, const StatT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr);
843 };
844 
845 struct StatBuilder {
846   typedef Stat Table;
847   flatbuffers::FlatBufferBuilder &fbb_;
848   flatbuffers::uoffset_t start_;
849   void add_id(flatbuffers::Offset<flatbuffers::String> id) {
850     fbb_.AddOffset(Stat::VT_ID, id);
851   }
852   void add_val(int64_t val) {
853     fbb_.AddElement<int64_t>(Stat::VT_VAL, val, 0);
854   }
855   void add_count(uint16_t count) {
856     fbb_.AddElement<uint16_t>(Stat::VT_COUNT, count, 0);
857   }
858   explicit StatBuilder(flatbuffers::FlatBufferBuilder &_fbb)
859         : fbb_(_fbb) {
860     start_ = fbb_.StartTable();
861   }
862   StatBuilder &operator=(const StatBuilder &);
863   flatbuffers::Offset<Stat> Finish() {
864     const auto end = fbb_.EndTable(start_);
865     auto o = flatbuffers::Offset<Stat>(end);
866     return o;
867   }
868 };
869 
870 inline flatbuffers::Offset<Stat> CreateStat(
871     flatbuffers::FlatBufferBuilder &_fbb,
872     flatbuffers::Offset<flatbuffers::String> id = 0,
873     int64_t val = 0,
874     uint16_t count = 0) {
875   StatBuilder builder_(_fbb);
876   builder_.add_val(val);
877   builder_.add_id(id);
878   builder_.add_count(count);
879   return builder_.Finish();
880 }
881 
882 struct Stat::Traits {
883   using type = Stat;
884   static auto constexpr Create = CreateStat;
885 };
886 
887 inline flatbuffers::Offset<Stat> CreateStatDirect(
888     flatbuffers::FlatBufferBuilder &_fbb,
889     const char *id = nullptr,
890     int64_t val = 0,
891     uint16_t count = 0) {
892   auto id__ = id ? _fbb.CreateString(id) : 0;
893   return MyGame::Example::CreateStat(
894       _fbb,
895       id__,
896       val,
897       count);
898 }
899 
900 flatbuffers::Offset<Stat> CreateStat(flatbuffers::FlatBufferBuilder &_fbb, const StatT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr);
901 
902 struct ReferrableT : public flatbuffers::NativeTable {
903   typedef Referrable TableType;
904   uint64_t id;
905   ReferrableT()
906       : id(0) {
907   }
908 };
909 
910 struct Referrable FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
911   typedef ReferrableT NativeTableType;
912   typedef ReferrableBuilder Builder;
913   struct Traits;
914   static const flatbuffers::TypeTable *MiniReflectTypeTable() {
915     return ReferrableTypeTable();
916   }
917   enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
918     VT_ID = 4
919   };
920   uint64_t id() const {
921     return GetField<uint64_t>(VT_ID, 0);
922   }
923   bool mutate_id(uint64_t _id) {
924     return SetField<uint64_t>(VT_ID, _id, 0);
925   }
926   bool KeyCompareLessThan(const Referrable *o) const {
927     return id() < o->id();
928   }
929   int KeyCompareWithValue(uint64_t val) const {
930     return static_cast<int>(id() > val) - static_cast<int>(id() < val);
931   }
932   bool Verify(flatbuffers::Verifier &verifier) const {
933     return VerifyTableStart(verifier) &&
934            VerifyField<uint64_t>(verifier, VT_ID) &&
935            verifier.EndTable();
936   }
937   ReferrableT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const;
938   void UnPackTo(ReferrableT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const;
939   static flatbuffers::Offset<Referrable> Pack(flatbuffers::FlatBufferBuilder &_fbb, const ReferrableT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr);
940 };
941 
942 struct ReferrableBuilder {
943   typedef Referrable Table;
944   flatbuffers::FlatBufferBuilder &fbb_;
945   flatbuffers::uoffset_t start_;
946   void add_id(uint64_t id) {
947     fbb_.AddElement<uint64_t>(Referrable::VT_ID, id, 0);
948   }
949   explicit ReferrableBuilder(flatbuffers::FlatBufferBuilder &_fbb)
950         : fbb_(_fbb) {
951     start_ = fbb_.StartTable();
952   }
953   ReferrableBuilder &operator=(const ReferrableBuilder &);
954   flatbuffers::Offset<Referrable> Finish() {
955     const auto end = fbb_.EndTable(start_);
956     auto o = flatbuffers::Offset<Referrable>(end);
957     return o;
958   }
959 };
960 
961 inline flatbuffers::Offset<Referrable> CreateReferrable(
962     flatbuffers::FlatBufferBuilder &_fbb,
963     uint64_t id = 0) {
964   ReferrableBuilder builder_(_fbb);
965   builder_.add_id(id);
966   return builder_.Finish();
967 }
968 
969 struct Referrable::Traits {
970   using type = Referrable;
971   static auto constexpr Create = CreateReferrable;
972 };
973 
974 flatbuffers::Offset<Referrable> CreateReferrable(flatbuffers::FlatBufferBuilder &_fbb, const ReferrableT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr);
975 
976 struct MonsterT : public flatbuffers::NativeTable {
977   typedef Monster TableType;
978   std::unique_ptr<MyGame::Example::Vec3> pos;
979   int16_t mana;
980   int16_t hp;
981   std::string name;
982   std::vector<uint8_t> inventory;
983   MyGame::Example::Color color;
984   MyGame::Example::AnyUnion test;
985   std::vector<MyGame::Example::Test> test4;
986   std::vector<std::string> testarrayofstring;
987   std::vector<std::unique_ptr<MyGame::Example::MonsterT>> testarrayoftables;
988   std::unique_ptr<MyGame::Example::MonsterT> enemy;
989   std::vector<uint8_t> testnestedflatbuffer;
990   std::unique_ptr<MyGame::Example::StatT> testempty;
991   bool testbool;
992   int32_t testhashs32_fnv1;
993   uint32_t testhashu32_fnv1;
994   int64_t testhashs64_fnv1;
995   uint64_t testhashu64_fnv1;
996   int32_t testhashs32_fnv1a;
997   Stat *testhashu32_fnv1a;
998   int64_t testhashs64_fnv1a;
999   uint64_t testhashu64_fnv1a;
1000   std::vector<bool> testarrayofbools;
1001   float testf;
1002   float testf2;
1003   float testf3;
1004   std::vector<std::string> testarrayofstring2;
1005   std::vector<MyGame::Example::Ability> testarrayofsortedstruct;
1006   std::vector<uint8_t> flex;
1007   std::vector<MyGame::Example::Test> test5;
1008   std::vector<int64_t> vector_of_longs;
1009   std::vector<double> vector_of_doubles;
1010   std::unique_ptr<MyGame::InParentNamespaceT> parent_namespace_test;
1011   std::vector<std::unique_ptr<MyGame::Example::ReferrableT>> vector_of_referrables;
1012   ReferrableT *single_weak_reference;
1013   std::vector<ReferrableT *> vector_of_weak_references;
1014   std::vector<std::unique_ptr<MyGame::Example::ReferrableT>> vector_of_strong_referrables;
1015   ReferrableT *co_owning_reference;
1016   std::vector<std::unique_ptr<ReferrableT>> vector_of_co_owning_references;
1017   ReferrableT *non_owning_reference;
1018   std::vector<ReferrableT *> vector_of_non_owning_references;
1019   MyGame::Example::AnyUniqueAliasesUnion any_unique;
1020   MyGame::Example::AnyAmbiguousAliasesUnion any_ambiguous;
1021   std::vector<MyGame::Example::Color> vector_of_enums;
1022   MyGame::Example::Race signed_enum;
1023   MonsterT()
1024       : mana(150),
1025         hp(100),
1026         color(MyGame::Example::Color::Blue),
1027         testbool(false),
1028         testhashs32_fnv1(0),
1029         testhashu32_fnv1(0),
1030         testhashs64_fnv1(0),
1031         testhashu64_fnv1(0),
1032         testhashs32_fnv1a(0),
1033         testhashu32_fnv1a(nullptr),
1034         testhashs64_fnv1a(0),
1035         testhashu64_fnv1a(0),
1036         testf(3.14159f),
1037         testf2(3.0f),
1038         testf3(0.0f),
1039         single_weak_reference(nullptr),
1040         co_owning_reference(nullptr),
1041         non_owning_reference(nullptr),
1042         signed_enum(MyGame::Example::Race::None) {
1043   }
1044 };
1045 
1046 /// an example documentation comment: "monster object"
1047 struct Monster FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
1048   typedef MonsterT NativeTableType;
1049   typedef MonsterBuilder Builder;
1050   struct Traits;
1051   static const flatbuffers::TypeTable *MiniReflectTypeTable() {
1052     return MonsterTypeTable();
1053   }
1054   enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
1055     VT_POS = 4,
1056     VT_MANA = 6,
1057     VT_HP = 8,
1058     VT_NAME = 10,
1059     VT_INVENTORY = 14,
1060     VT_COLOR = 16,
1061     VT_TEST_TYPE = 18,
1062     VT_TEST = 20,
1063     VT_TEST4 = 22,
1064     VT_TESTARRAYOFSTRING = 24,
1065     VT_TESTARRAYOFTABLES = 26,
1066     VT_ENEMY = 28,
1067     VT_TESTNESTEDFLATBUFFER = 30,
1068     VT_TESTEMPTY = 32,
1069     VT_TESTBOOL = 34,
1070     VT_TESTHASHS32_FNV1 = 36,
1071     VT_TESTHASHU32_FNV1 = 38,
1072     VT_TESTHASHS64_FNV1 = 40,
1073     VT_TESTHASHU64_FNV1 = 42,
1074     VT_TESTHASHS32_FNV1A = 44,
1075     VT_TESTHASHU32_FNV1A = 46,
1076     VT_TESTHASHS64_FNV1A = 48,
1077     VT_TESTHASHU64_FNV1A = 50,
1078     VT_TESTARRAYOFBOOLS = 52,
1079     VT_TESTF = 54,
1080     VT_TESTF2 = 56,
1081     VT_TESTF3 = 58,
1082     VT_TESTARRAYOFSTRING2 = 60,
1083     VT_TESTARRAYOFSORTEDSTRUCT = 62,
1084     VT_FLEX = 64,
1085     VT_TEST5 = 66,
1086     VT_VECTOR_OF_LONGS = 68,
1087     VT_VECTOR_OF_DOUBLES = 70,
1088     VT_PARENT_NAMESPACE_TEST = 72,
1089     VT_VECTOR_OF_REFERRABLES = 74,
1090     VT_SINGLE_WEAK_REFERENCE = 76,
1091     VT_VECTOR_OF_WEAK_REFERENCES = 78,
1092     VT_VECTOR_OF_STRONG_REFERRABLES = 80,
1093     VT_CO_OWNING_REFERENCE = 82,
1094     VT_VECTOR_OF_CO_OWNING_REFERENCES = 84,
1095     VT_NON_OWNING_REFERENCE = 86,
1096     VT_VECTOR_OF_NON_OWNING_REFERENCES = 88,
1097     VT_ANY_UNIQUE_TYPE = 90,
1098     VT_ANY_UNIQUE = 92,
1099     VT_ANY_AMBIGUOUS_TYPE = 94,
1100     VT_ANY_AMBIGUOUS = 96,
1101     VT_VECTOR_OF_ENUMS = 98,
1102     VT_SIGNED_ENUM = 100
1103   };
1104   const MyGame::Example::Vec3 *pos() const {
1105     return GetStruct<const MyGame::Example::Vec3 *>(VT_POS);
1106   }
1107   MyGame::Example::Vec3 *mutable_pos() {
1108     return GetStruct<MyGame::Example::Vec3 *>(VT_POS);
1109   }
1110   int16_t mana() const {
1111     return GetField<int16_t>(VT_MANA, 150);
1112   }
1113   bool mutate_mana(int16_t _mana) {
1114     return SetField<int16_t>(VT_MANA, _mana, 150);
1115   }
1116   int16_t hp() const {
1117     return GetField<int16_t>(VT_HP, 100);
1118   }
1119   bool mutate_hp(int16_t _hp) {
1120     return SetField<int16_t>(VT_HP, _hp, 100);
1121   }
1122   const flatbuffers::String *name() const {
1123     return GetPointer<const flatbuffers::String *>(VT_NAME);
1124   }
1125   flatbuffers::String *mutable_name() {
1126     return GetPointer<flatbuffers::String *>(VT_NAME);
1127   }
1128   bool KeyCompareLessThan(const Monster *o) const {
1129     return *name() < *o->name();
1130   }
1131   int KeyCompareWithValue(const char *val) const {
1132     return strcmp(name()->c_str(), val);
1133   }
1134   const flatbuffers::Vector<uint8_t> *inventory() const {
1135     return GetPointer<const flatbuffers::Vector<uint8_t> *>(VT_INVENTORY);
1136   }
1137   flatbuffers::Vector<uint8_t> *mutable_inventory() {
1138     return GetPointer<flatbuffers::Vector<uint8_t> *>(VT_INVENTORY);
1139   }
1140   MyGame::Example::Color color() const {
1141     return static_cast<MyGame::Example::Color>(GetField<uint8_t>(VT_COLOR, 8));
1142   }
1143   bool mutate_color(MyGame::Example::Color _color) {
1144     return SetField<uint8_t>(VT_COLOR, static_cast<uint8_t>(_color), 8);
1145   }
1146   MyGame::Example::Any test_type() const {
1147     return static_cast<MyGame::Example::Any>(GetField<uint8_t>(VT_TEST_TYPE, 0));
1148   }
1149   const void *test() const {
1150     return GetPointer<const void *>(VT_TEST);
1151   }
1152   template<typename T> const T *test_as() const;
1153   const MyGame::Example::Monster *test_as_Monster() const {
1154     return test_type() == MyGame::Example::Any::Monster ? static_cast<const MyGame::Example::Monster *>(test()) : nullptr;
1155   }
1156   const MyGame::Example::TestSimpleTableWithEnum *test_as_TestSimpleTableWithEnum() const {
1157     return test_type() == MyGame::Example::Any::TestSimpleTableWithEnum ? static_cast<const MyGame::Example::TestSimpleTableWithEnum *>(test()) : nullptr;
1158   }
1159   const MyGame::Example2::Monster *test_as_MyGame_Example2_Monster() const {
1160     return test_type() == MyGame::Example::Any::MyGame_Example2_Monster ? static_cast<const MyGame::Example2::Monster *>(test()) : nullptr;
1161   }
1162   void *mutable_test() {
1163     return GetPointer<void *>(VT_TEST);
1164   }
1165   const flatbuffers::Vector<const MyGame::Example::Test *> *test4() const {
1166     return GetPointer<const flatbuffers::Vector<const MyGame::Example::Test *> *>(VT_TEST4);
1167   }
1168   flatbuffers::Vector<const MyGame::Example::Test *> *mutable_test4() {
1169     return GetPointer<flatbuffers::Vector<const MyGame::Example::Test *> *>(VT_TEST4);
1170   }
1171   const flatbuffers::Vector<flatbuffers::Offset<flatbuffers::String>> *testarrayofstring() const {
1172     return GetPointer<const flatbuffers::Vector<flatbuffers::Offset<flatbuffers::String>> *>(VT_TESTARRAYOFSTRING);
1173   }
1174   flatbuffers::Vector<flatbuffers::Offset<flatbuffers::String>> *mutable_testarrayofstring() {
1175     return GetPointer<flatbuffers::Vector<flatbuffers::Offset<flatbuffers::String>> *>(VT_TESTARRAYOFSTRING);
1176   }
1177   /// an example documentation comment: this will end up in the generated code
1178   /// multiline too
1179   const flatbuffers::Vector<flatbuffers::Offset<MyGame::Example::Monster>> *testarrayoftables() const {
1180     return GetPointer<const flatbuffers::Vector<flatbuffers::Offset<MyGame::Example::Monster>> *>(VT_TESTARRAYOFTABLES);
1181   }
1182   flatbuffers::Vector<flatbuffers::Offset<MyGame::Example::Monster>> *mutable_testarrayoftables() {
1183     return GetPointer<flatbuffers::Vector<flatbuffers::Offset<MyGame::Example::Monster>> *>(VT_TESTARRAYOFTABLES);
1184   }
1185   const MyGame::Example::Monster *enemy() const {
1186     return GetPointer<const MyGame::Example::Monster *>(VT_ENEMY);
1187   }
1188   MyGame::Example::Monster *mutable_enemy() {
1189     return GetPointer<MyGame::Example::Monster *>(VT_ENEMY);
1190   }
1191   const flatbuffers::Vector<uint8_t> *testnestedflatbuffer() const {
1192     return GetPointer<const flatbuffers::Vector<uint8_t> *>(VT_TESTNESTEDFLATBUFFER);
1193   }
1194   flatbuffers::Vector<uint8_t> *mutable_testnestedflatbuffer() {
1195     return GetPointer<flatbuffers::Vector<uint8_t> *>(VT_TESTNESTEDFLATBUFFER);
1196   }
1197   const MyGame::Example::Monster *testnestedflatbuffer_nested_root() const {
1198     return flatbuffers::GetRoot<MyGame::Example::Monster>(testnestedflatbuffer()->Data());
1199   }
1200   const MyGame::Example::Stat *testempty() const {
1201     return GetPointer<const MyGame::Example::Stat *>(VT_TESTEMPTY);
1202   }
1203   MyGame::Example::Stat *mutable_testempty() {
1204     return GetPointer<MyGame::Example::Stat *>(VT_TESTEMPTY);
1205   }
1206   bool testbool() const {
1207     return GetField<uint8_t>(VT_TESTBOOL, 0) != 0;
1208   }
1209   bool mutate_testbool(bool _testbool) {
1210     return SetField<uint8_t>(VT_TESTBOOL, static_cast<uint8_t>(_testbool), 0);
1211   }
1212   int32_t testhashs32_fnv1() const {
1213     return GetField<int32_t>(VT_TESTHASHS32_FNV1, 0);
1214   }
1215   bool mutate_testhashs32_fnv1(int32_t _testhashs32_fnv1) {
1216     return SetField<int32_t>(VT_TESTHASHS32_FNV1, _testhashs32_fnv1, 0);
1217   }
1218   uint32_t testhashu32_fnv1() const {
1219     return GetField<uint32_t>(VT_TESTHASHU32_FNV1, 0);
1220   }
1221   bool mutate_testhashu32_fnv1(uint32_t _testhashu32_fnv1) {
1222     return SetField<uint32_t>(VT_TESTHASHU32_FNV1, _testhashu32_fnv1, 0);
1223   }
1224   int64_t testhashs64_fnv1() const {
1225     return GetField<int64_t>(VT_TESTHASHS64_FNV1, 0);
1226   }
1227   bool mutate_testhashs64_fnv1(int64_t _testhashs64_fnv1) {
1228     return SetField<int64_t>(VT_TESTHASHS64_FNV1, _testhashs64_fnv1, 0);
1229   }
1230   uint64_t testhashu64_fnv1() const {
1231     return GetField<uint64_t>(VT_TESTHASHU64_FNV1, 0);
1232   }
1233   bool mutate_testhashu64_fnv1(uint64_t _testhashu64_fnv1) {
1234     return SetField<uint64_t>(VT_TESTHASHU64_FNV1, _testhashu64_fnv1, 0);
1235   }
1236   int32_t testhashs32_fnv1a() const {
1237     return GetField<int32_t>(VT_TESTHASHS32_FNV1A, 0);
1238   }
1239   bool mutate_testhashs32_fnv1a(int32_t _testhashs32_fnv1a) {
1240     return SetField<int32_t>(VT_TESTHASHS32_FNV1A, _testhashs32_fnv1a, 0);
1241   }
1242   uint32_t testhashu32_fnv1a() const {
1243     return GetField<uint32_t>(VT_TESTHASHU32_FNV1A, 0);
1244   }
1245   bool mutate_testhashu32_fnv1a(uint32_t _testhashu32_fnv1a) {
1246     return SetField<uint32_t>(VT_TESTHASHU32_FNV1A, _testhashu32_fnv1a, 0);
1247   }
1248   int64_t testhashs64_fnv1a() const {
1249     return GetField<int64_t>(VT_TESTHASHS64_FNV1A, 0);
1250   }
1251   bool mutate_testhashs64_fnv1a(int64_t _testhashs64_fnv1a) {
1252     return SetField<int64_t>(VT_TESTHASHS64_FNV1A, _testhashs64_fnv1a, 0);
1253   }
1254   uint64_t testhashu64_fnv1a() const {
1255     return GetField<uint64_t>(VT_TESTHASHU64_FNV1A, 0);
1256   }
1257   bool mutate_testhashu64_fnv1a(uint64_t _testhashu64_fnv1a) {
1258     return SetField<uint64_t>(VT_TESTHASHU64_FNV1A, _testhashu64_fnv1a, 0);
1259   }
1260   const flatbuffers::Vector<uint8_t> *testarrayofbools() const {
1261     return GetPointer<const flatbuffers::Vector<uint8_t> *>(VT_TESTARRAYOFBOOLS);
1262   }
1263   flatbuffers::Vector<uint8_t> *mutable_testarrayofbools() {
1264     return GetPointer<flatbuffers::Vector<uint8_t> *>(VT_TESTARRAYOFBOOLS);
1265   }
1266   float testf() const {
1267     return GetField<float>(VT_TESTF, 3.14159f);
1268   }
1269   bool mutate_testf(float _testf) {
1270     return SetField<float>(VT_TESTF, _testf, 3.14159f);
1271   }
1272   float testf2() const {
1273     return GetField<float>(VT_TESTF2, 3.0f);
1274   }
1275   bool mutate_testf2(float _testf2) {
1276     return SetField<float>(VT_TESTF2, _testf2, 3.0f);
1277   }
1278   float testf3() const {
1279     return GetField<float>(VT_TESTF3, 0.0f);
1280   }
1281   bool mutate_testf3(float _testf3) {
1282     return SetField<float>(VT_TESTF3, _testf3, 0.0f);
1283   }
1284   const flatbuffers::Vector<flatbuffers::Offset<flatbuffers::String>> *testarrayofstring2() const {
1285     return GetPointer<const flatbuffers::Vector<flatbuffers::Offset<flatbuffers::String>> *>(VT_TESTARRAYOFSTRING2);
1286   }
1287   flatbuffers::Vector<flatbuffers::Offset<flatbuffers::String>> *mutable_testarrayofstring2() {
1288     return GetPointer<flatbuffers::Vector<flatbuffers::Offset<flatbuffers::String>> *>(VT_TESTARRAYOFSTRING2);
1289   }
1290   const flatbuffers::Vector<const MyGame::Example::Ability *> *testarrayofsortedstruct() const {
1291     return GetPointer<const flatbuffers::Vector<const MyGame::Example::Ability *> *>(VT_TESTARRAYOFSORTEDSTRUCT);
1292   }
1293   flatbuffers::Vector<const MyGame::Example::Ability *> *mutable_testarrayofsortedstruct() {
1294     return GetPointer<flatbuffers::Vector<const MyGame::Example::Ability *> *>(VT_TESTARRAYOFSORTEDSTRUCT);
1295   }
1296   const flatbuffers::Vector<uint8_t> *flex() const {
1297     return GetPointer<const flatbuffers::Vector<uint8_t> *>(VT_FLEX);
1298   }
1299   flatbuffers::Vector<uint8_t> *mutable_flex() {
1300     return GetPointer<flatbuffers::Vector<uint8_t> *>(VT_FLEX);
1301   }
1302   flexbuffers::Reference flex_flexbuffer_root() const {
1303     return flexbuffers::GetRoot(flex()->Data(), flex()->size());
1304   }
1305   const flatbuffers::Vector<const MyGame::Example::Test *> *test5() const {
1306     return GetPointer<const flatbuffers::Vector<const MyGame::Example::Test *> *>(VT_TEST5);
1307   }
1308   flatbuffers::Vector<const MyGame::Example::Test *> *mutable_test5() {
1309     return GetPointer<flatbuffers::Vector<const MyGame::Example::Test *> *>(VT_TEST5);
1310   }
1311   const flatbuffers::Vector<int64_t> *vector_of_longs() const {
1312     return GetPointer<const flatbuffers::Vector<int64_t> *>(VT_VECTOR_OF_LONGS);
1313   }
1314   flatbuffers::Vector<int64_t> *mutable_vector_of_longs() {
1315     return GetPointer<flatbuffers::Vector<int64_t> *>(VT_VECTOR_OF_LONGS);
1316   }
1317   const flatbuffers::Vector<double> *vector_of_doubles() const {
1318     return GetPointer<const flatbuffers::Vector<double> *>(VT_VECTOR_OF_DOUBLES);
1319   }
1320   flatbuffers::Vector<double> *mutable_vector_of_doubles() {
1321     return GetPointer<flatbuffers::Vector<double> *>(VT_VECTOR_OF_DOUBLES);
1322   }
1323   const MyGame::InParentNamespace *parent_namespace_test() const {
1324     return GetPointer<const MyGame::InParentNamespace *>(VT_PARENT_NAMESPACE_TEST);
1325   }
1326   MyGame::InParentNamespace *mutable_parent_namespace_test() {
1327     return GetPointer<MyGame::InParentNamespace *>(VT_PARENT_NAMESPACE_TEST);
1328   }
1329   const flatbuffers::Vector<flatbuffers::Offset<MyGame::Example::Referrable>> *vector_of_referrables() const {
1330     return GetPointer<const flatbuffers::Vector<flatbuffers::Offset<MyGame::Example::Referrable>> *>(VT_VECTOR_OF_REFERRABLES);
1331   }
1332   flatbuffers::Vector<flatbuffers::Offset<MyGame::Example::Referrable>> *mutable_vector_of_referrables() {
1333     return GetPointer<flatbuffers::Vector<flatbuffers::Offset<MyGame::Example::Referrable>> *>(VT_VECTOR_OF_REFERRABLES);
1334   }
1335   uint64_t single_weak_reference() const {
1336     return GetField<uint64_t>(VT_SINGLE_WEAK_REFERENCE, 0);
1337   }
1338   bool mutate_single_weak_reference(uint64_t _single_weak_reference) {
1339     return SetField<uint64_t>(VT_SINGLE_WEAK_REFERENCE, _single_weak_reference, 0);
1340   }
1341   const flatbuffers::Vector<uint64_t> *vector_of_weak_references() const {
1342     return GetPointer<const flatbuffers::Vector<uint64_t> *>(VT_VECTOR_OF_WEAK_REFERENCES);
1343   }
1344   flatbuffers::Vector<uint64_t> *mutable_vector_of_weak_references() {
1345     return GetPointer<flatbuffers::Vector<uint64_t> *>(VT_VECTOR_OF_WEAK_REFERENCES);
1346   }
1347   const flatbuffers::Vector<flatbuffers::Offset<MyGame::Example::Referrable>> *vector_of_strong_referrables() const {
1348     return GetPointer<const flatbuffers::Vector<flatbuffers::Offset<MyGame::Example::Referrable>> *>(VT_VECTOR_OF_STRONG_REFERRABLES);
1349   }
1350   flatbuffers::Vector<flatbuffers::Offset<MyGame::Example::Referrable>> *mutable_vector_of_strong_referrables() {
1351     return GetPointer<flatbuffers::Vector<flatbuffers::Offset<MyGame::Example::Referrable>> *>(VT_VECTOR_OF_STRONG_REFERRABLES);
1352   }
1353   uint64_t co_owning_reference() const {
1354     return GetField<uint64_t>(VT_CO_OWNING_REFERENCE, 0);
1355   }
1356   bool mutate_co_owning_reference(uint64_t _co_owning_reference) {
1357     return SetField<uint64_t>(VT_CO_OWNING_REFERENCE, _co_owning_reference, 0);
1358   }
1359   const flatbuffers::Vector<uint64_t> *vector_of_co_owning_references() const {
1360     return GetPointer<const flatbuffers::Vector<uint64_t> *>(VT_VECTOR_OF_CO_OWNING_REFERENCES);
1361   }
1362   flatbuffers::Vector<uint64_t> *mutable_vector_of_co_owning_references() {
1363     return GetPointer<flatbuffers::Vector<uint64_t> *>(VT_VECTOR_OF_CO_OWNING_REFERENCES);
1364   }
1365   uint64_t non_owning_reference() const {
1366     return GetField<uint64_t>(VT_NON_OWNING_REFERENCE, 0);
1367   }
1368   bool mutate_non_owning_reference(uint64_t _non_owning_reference) {
1369     return SetField<uint64_t>(VT_NON_OWNING_REFERENCE, _non_owning_reference, 0);
1370   }
1371   const flatbuffers::Vector<uint64_t> *vector_of_non_owning_references() const {
1372     return GetPointer<const flatbuffers::Vector<uint64_t> *>(VT_VECTOR_OF_NON_OWNING_REFERENCES);
1373   }
1374   flatbuffers::Vector<uint64_t> *mutable_vector_of_non_owning_references() {
1375     return GetPointer<flatbuffers::Vector<uint64_t> *>(VT_VECTOR_OF_NON_OWNING_REFERENCES);
1376   }
1377   MyGame::Example::AnyUniqueAliases any_unique_type() const {
1378     return static_cast<MyGame::Example::AnyUniqueAliases>(GetField<uint8_t>(VT_ANY_UNIQUE_TYPE, 0));
1379   }
1380   const void *any_unique() const {
1381     return GetPointer<const void *>(VT_ANY_UNIQUE);
1382   }
1383   template<typename T> const T *any_unique_as() const;
1384   const MyGame::Example::Monster *any_unique_as_M() const {
1385     return any_unique_type() == MyGame::Example::AnyUniqueAliases::M ? static_cast<const MyGame::Example::Monster *>(any_unique()) : nullptr;
1386   }
1387   const MyGame::Example::TestSimpleTableWithEnum *any_unique_as_TS() const {
1388     return any_unique_type() == MyGame::Example::AnyUniqueAliases::TS ? static_cast<const MyGame::Example::TestSimpleTableWithEnum *>(any_unique()) : nullptr;
1389   }
1390   const MyGame::Example2::Monster *any_unique_as_M2() const {
1391     return any_unique_type() == MyGame::Example::AnyUniqueAliases::M2 ? static_cast<const MyGame::Example2::Monster *>(any_unique()) : nullptr;
1392   }
1393   void *mutable_any_unique() {
1394     return GetPointer<void *>(VT_ANY_UNIQUE);
1395   }
1396   MyGame::Example::AnyAmbiguousAliases any_ambiguous_type() const {
1397     return static_cast<MyGame::Example::AnyAmbiguousAliases>(GetField<uint8_t>(VT_ANY_AMBIGUOUS_TYPE, 0));
1398   }
1399   const void *any_ambiguous() const {
1400     return GetPointer<const void *>(VT_ANY_AMBIGUOUS);
1401   }
1402   const MyGame::Example::Monster *any_ambiguous_as_M1() const {
1403     return any_ambiguous_type() == MyGame::Example::AnyAmbiguousAliases::M1 ? static_cast<const MyGame::Example::Monster *>(any_ambiguous()) : nullptr;
1404   }
1405   const MyGame::Example::Monster *any_ambiguous_as_M2() const {
1406     return any_ambiguous_type() == MyGame::Example::AnyAmbiguousAliases::M2 ? static_cast<const MyGame::Example::Monster *>(any_ambiguous()) : nullptr;
1407   }
1408   const MyGame::Example::Monster *any_ambiguous_as_M3() const {
1409     return any_ambiguous_type() == MyGame::Example::AnyAmbiguousAliases::M3 ? static_cast<const MyGame::Example::Monster *>(any_ambiguous()) : nullptr;
1410   }
1411   void *mutable_any_ambiguous() {
1412     return GetPointer<void *>(VT_ANY_AMBIGUOUS);
1413   }
1414   const flatbuffers::Vector<MyGame::Example::Color> *vector_of_enums() const {
1415     return GetPointer<const flatbuffers::Vector<MyGame::Example::Color> *>(VT_VECTOR_OF_ENUMS);
1416   }
1417   flatbuffers::Vector<MyGame::Example::Color> *mutable_vector_of_enums() {
1418     return GetPointer<flatbuffers::Vector<MyGame::Example::Color> *>(VT_VECTOR_OF_ENUMS);
1419   }
1420   MyGame::Example::Race signed_enum() const {
1421     return static_cast<MyGame::Example::Race>(GetField<int8_t>(VT_SIGNED_ENUM, -1));
1422   }
1423   bool mutate_signed_enum(MyGame::Example::Race _signed_enum) {
1424     return SetField<int8_t>(VT_SIGNED_ENUM, static_cast<int8_t>(_signed_enum), -1);
1425   }
1426   bool Verify(flatbuffers::Verifier &verifier) const {
1427     return VerifyTableStart(verifier) &&
1428            VerifyField<MyGame::Example::Vec3>(verifier, VT_POS) &&
1429            VerifyField<int16_t>(verifier, VT_MANA) &&
1430            VerifyField<int16_t>(verifier, VT_HP) &&
1431            VerifyOffsetRequired(verifier, VT_NAME) &&
1432            verifier.VerifyString(name()) &&
1433            VerifyOffset(verifier, VT_INVENTORY) &&
1434            verifier.VerifyVector(inventory()) &&
1435            VerifyField<uint8_t>(verifier, VT_COLOR) &&
1436            VerifyField<uint8_t>(verifier, VT_TEST_TYPE) &&
1437            VerifyOffset(verifier, VT_TEST) &&
1438            VerifyAny(verifier, test(), test_type()) &&
1439            VerifyOffset(verifier, VT_TEST4) &&
1440            verifier.VerifyVector(test4()) &&
1441            VerifyOffset(verifier, VT_TESTARRAYOFSTRING) &&
1442            verifier.VerifyVector(testarrayofstring()) &&
1443            verifier.VerifyVectorOfStrings(testarrayofstring()) &&
1444            VerifyOffset(verifier, VT_TESTARRAYOFTABLES) &&
1445            verifier.VerifyVector(testarrayoftables()) &&
1446            verifier.VerifyVectorOfTables(testarrayoftables()) &&
1447            VerifyOffset(verifier, VT_ENEMY) &&
1448            verifier.VerifyTable(enemy()) &&
1449            VerifyOffset(verifier, VT_TESTNESTEDFLATBUFFER) &&
1450            verifier.VerifyVector(testnestedflatbuffer()) &&
1451            VerifyOffset(verifier, VT_TESTEMPTY) &&
1452            verifier.VerifyTable(testempty()) &&
1453            VerifyField<uint8_t>(verifier, VT_TESTBOOL) &&
1454            VerifyField<int32_t>(verifier, VT_TESTHASHS32_FNV1) &&
1455            VerifyField<uint32_t>(verifier, VT_TESTHASHU32_FNV1) &&
1456            VerifyField<int64_t>(verifier, VT_TESTHASHS64_FNV1) &&
1457            VerifyField<uint64_t>(verifier, VT_TESTHASHU64_FNV1) &&
1458            VerifyField<int32_t>(verifier, VT_TESTHASHS32_FNV1A) &&
1459            VerifyField<uint32_t>(verifier, VT_TESTHASHU32_FNV1A) &&
1460            VerifyField<int64_t>(verifier, VT_TESTHASHS64_FNV1A) &&
1461            VerifyField<uint64_t>(verifier, VT_TESTHASHU64_FNV1A) &&
1462            VerifyOffset(verifier, VT_TESTARRAYOFBOOLS) &&
1463            verifier.VerifyVector(testarrayofbools()) &&
1464            VerifyField<float>(verifier, VT_TESTF) &&
1465            VerifyField<float>(verifier, VT_TESTF2) &&
1466            VerifyField<float>(verifier, VT_TESTF3) &&
1467            VerifyOffset(verifier, VT_TESTARRAYOFSTRING2) &&
1468            verifier.VerifyVector(testarrayofstring2()) &&
1469            verifier.VerifyVectorOfStrings(testarrayofstring2()) &&
1470            VerifyOffset(verifier, VT_TESTARRAYOFSORTEDSTRUCT) &&
1471            verifier.VerifyVector(testarrayofsortedstruct()) &&
1472            VerifyOffset(verifier, VT_FLEX) &&
1473            verifier.VerifyVector(flex()) &&
1474            VerifyOffset(verifier, VT_TEST5) &&
1475            verifier.VerifyVector(test5()) &&
1476            VerifyOffset(verifier, VT_VECTOR_OF_LONGS) &&
1477            verifier.VerifyVector(vector_of_longs()) &&
1478            VerifyOffset(verifier, VT_VECTOR_OF_DOUBLES) &&
1479            verifier.VerifyVector(vector_of_doubles()) &&
1480            VerifyOffset(verifier, VT_PARENT_NAMESPACE_TEST) &&
1481            verifier.VerifyTable(parent_namespace_test()) &&
1482            VerifyOffset(verifier, VT_VECTOR_OF_REFERRABLES) &&
1483            verifier.VerifyVector(vector_of_referrables()) &&
1484            verifier.VerifyVectorOfTables(vector_of_referrables()) &&
1485            VerifyField<uint64_t>(verifier, VT_SINGLE_WEAK_REFERENCE) &&
1486            VerifyOffset(verifier, VT_VECTOR_OF_WEAK_REFERENCES) &&
1487            verifier.VerifyVector(vector_of_weak_references()) &&
1488            VerifyOffset(verifier, VT_VECTOR_OF_STRONG_REFERRABLES) &&
1489            verifier.VerifyVector(vector_of_strong_referrables()) &&
1490            verifier.VerifyVectorOfTables(vector_of_strong_referrables()) &&
1491            VerifyField<uint64_t>(verifier, VT_CO_OWNING_REFERENCE) &&
1492            VerifyOffset(verifier, VT_VECTOR_OF_CO_OWNING_REFERENCES) &&
1493            verifier.VerifyVector(vector_of_co_owning_references()) &&
1494            VerifyField<uint64_t>(verifier, VT_NON_OWNING_REFERENCE) &&
1495            VerifyOffset(verifier, VT_VECTOR_OF_NON_OWNING_REFERENCES) &&
1496            verifier.VerifyVector(vector_of_non_owning_references()) &&
1497            VerifyField<uint8_t>(verifier, VT_ANY_UNIQUE_TYPE) &&
1498            VerifyOffset(verifier, VT_ANY_UNIQUE) &&
1499            VerifyAnyUniqueAliases(verifier, any_unique(), any_unique_type()) &&
1500            VerifyField<uint8_t>(verifier, VT_ANY_AMBIGUOUS_TYPE) &&
1501            VerifyOffset(verifier, VT_ANY_AMBIGUOUS) &&
1502            VerifyAnyAmbiguousAliases(verifier, any_ambiguous(), any_ambiguous_type()) &&
1503            VerifyOffset(verifier, VT_VECTOR_OF_ENUMS) &&
1504            verifier.VerifyVector(vector_of_enums()) &&
1505            VerifyField<int8_t>(verifier, VT_SIGNED_ENUM) &&
1506            verifier.EndTable();
1507   }
1508   MonsterT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const;
1509   void UnPackTo(MonsterT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const;
1510   static flatbuffers::Offset<Monster> Pack(flatbuffers::FlatBufferBuilder &_fbb, const MonsterT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr);
1511 };
1512 
1513 template<> inline const MyGame::Example::Monster *Monster::test_as<MyGame::Example::Monster>() const {
1514   return test_as_Monster();
1515 }
1516 
1517 template<> inline const MyGame::Example::TestSimpleTableWithEnum *Monster::test_as<MyGame::Example::TestSimpleTableWithEnum>() const {
1518   return test_as_TestSimpleTableWithEnum();
1519 }
1520 
1521 template<> inline const MyGame::Example2::Monster *Monster::test_as<MyGame::Example2::Monster>() const {
1522   return test_as_MyGame_Example2_Monster();
1523 }
1524 
1525 template<> inline const MyGame::Example::Monster *Monster::any_unique_as<MyGame::Example::Monster>() const {
1526   return any_unique_as_M();
1527 }
1528 
1529 template<> inline const MyGame::Example::TestSimpleTableWithEnum *Monster::any_unique_as<MyGame::Example::TestSimpleTableWithEnum>() const {
1530   return any_unique_as_TS();
1531 }
1532 
1533 template<> inline const MyGame::Example2::Monster *Monster::any_unique_as<MyGame::Example2::Monster>() const {
1534   return any_unique_as_M2();
1535 }
1536 
1537 struct MonsterBuilder {
1538   typedef Monster Table;
1539   flatbuffers::FlatBufferBuilder &fbb_;
1540   flatbuffers::uoffset_t start_;
1541   void add_pos(const MyGame::Example::Vec3 *pos) {
1542     fbb_.AddStruct(Monster::VT_POS, pos);
1543   }
1544   void add_mana(int16_t mana) {
1545     fbb_.AddElement<int16_t>(Monster::VT_MANA, mana, 150);
1546   }
1547   void add_hp(int16_t hp) {
1548     fbb_.AddElement<int16_t>(Monster::VT_HP, hp, 100);
1549   }
1550   void add_name(flatbuffers::Offset<flatbuffers::String> name) {
1551     fbb_.AddOffset(Monster::VT_NAME, name);
1552   }
1553   void add_inventory(flatbuffers::Offset<flatbuffers::Vector<uint8_t>> inventory) {
1554     fbb_.AddOffset(Monster::VT_INVENTORY, inventory);
1555   }
1556   void add_color(MyGame::Example::Color color) {
1557     fbb_.AddElement<uint8_t>(Monster::VT_COLOR, static_cast<uint8_t>(color), 8);
1558   }
1559   void add_test_type(MyGame::Example::Any test_type) {
1560     fbb_.AddElement<uint8_t>(Monster::VT_TEST_TYPE, static_cast<uint8_t>(test_type), 0);
1561   }
1562   void add_test(flatbuffers::Offset<void> test) {
1563     fbb_.AddOffset(Monster::VT_TEST, test);
1564   }
1565   void add_test4(flatbuffers::Offset<flatbuffers::Vector<const MyGame::Example::Test *>> test4) {
1566     fbb_.AddOffset(Monster::VT_TEST4, test4);
1567   }
1568   void add_testarrayofstring(flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<flatbuffers::String>>> testarrayofstring) {
1569     fbb_.AddOffset(Monster::VT_TESTARRAYOFSTRING, testarrayofstring);
1570   }
1571   void add_testarrayoftables(flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<MyGame::Example::Monster>>> testarrayoftables) {
1572     fbb_.AddOffset(Monster::VT_TESTARRAYOFTABLES, testarrayoftables);
1573   }
1574   void add_enemy(flatbuffers::Offset<MyGame::Example::Monster> enemy) {
1575     fbb_.AddOffset(Monster::VT_ENEMY, enemy);
1576   }
1577   void add_testnestedflatbuffer(flatbuffers::Offset<flatbuffers::Vector<uint8_t>> testnestedflatbuffer) {
1578     fbb_.AddOffset(Monster::VT_TESTNESTEDFLATBUFFER, testnestedflatbuffer);
1579   }
1580   void add_testempty(flatbuffers::Offset<MyGame::Example::Stat> testempty) {
1581     fbb_.AddOffset(Monster::VT_TESTEMPTY, testempty);
1582   }
1583   void add_testbool(bool testbool) {
1584     fbb_.AddElement<uint8_t>(Monster::VT_TESTBOOL, static_cast<uint8_t>(testbool), 0);
1585   }
1586   void add_testhashs32_fnv1(int32_t testhashs32_fnv1) {
1587     fbb_.AddElement<int32_t>(Monster::VT_TESTHASHS32_FNV1, testhashs32_fnv1, 0);
1588   }
1589   void add_testhashu32_fnv1(uint32_t testhashu32_fnv1) {
1590     fbb_.AddElement<uint32_t>(Monster::VT_TESTHASHU32_FNV1, testhashu32_fnv1, 0);
1591   }
1592   void add_testhashs64_fnv1(int64_t testhashs64_fnv1) {
1593     fbb_.AddElement<int64_t>(Monster::VT_TESTHASHS64_FNV1, testhashs64_fnv1, 0);
1594   }
1595   void add_testhashu64_fnv1(uint64_t testhashu64_fnv1) {
1596     fbb_.AddElement<uint64_t>(Monster::VT_TESTHASHU64_FNV1, testhashu64_fnv1, 0);
1597   }
1598   void add_testhashs32_fnv1a(int32_t testhashs32_fnv1a) {
1599     fbb_.AddElement<int32_t>(Monster::VT_TESTHASHS32_FNV1A, testhashs32_fnv1a, 0);
1600   }
1601   void add_testhashu32_fnv1a(uint32_t testhashu32_fnv1a) {
1602     fbb_.AddElement<uint32_t>(Monster::VT_TESTHASHU32_FNV1A, testhashu32_fnv1a, 0);
1603   }
1604   void add_testhashs64_fnv1a(int64_t testhashs64_fnv1a) {
1605     fbb_.AddElement<int64_t>(Monster::VT_TESTHASHS64_FNV1A, testhashs64_fnv1a, 0);
1606   }
1607   void add_testhashu64_fnv1a(uint64_t testhashu64_fnv1a) {
1608     fbb_.AddElement<uint64_t>(Monster::VT_TESTHASHU64_FNV1A, testhashu64_fnv1a, 0);
1609   }
1610   void add_testarrayofbools(flatbuffers::Offset<flatbuffers::Vector<uint8_t>> testarrayofbools) {
1611     fbb_.AddOffset(Monster::VT_TESTARRAYOFBOOLS, testarrayofbools);
1612   }
1613   void add_testf(float testf) {
1614     fbb_.AddElement<float>(Monster::VT_TESTF, testf, 3.14159f);
1615   }
1616   void add_testf2(float testf2) {
1617     fbb_.AddElement<float>(Monster::VT_TESTF2, testf2, 3.0f);
1618   }
1619   void add_testf3(float testf3) {
1620     fbb_.AddElement<float>(Monster::VT_TESTF3, testf3, 0.0f);
1621   }
1622   void add_testarrayofstring2(flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<flatbuffers::String>>> testarrayofstring2) {
1623     fbb_.AddOffset(Monster::VT_TESTARRAYOFSTRING2, testarrayofstring2);
1624   }
1625   void add_testarrayofsortedstruct(flatbuffers::Offset<flatbuffers::Vector<const MyGame::Example::Ability *>> testarrayofsortedstruct) {
1626     fbb_.AddOffset(Monster::VT_TESTARRAYOFSORTEDSTRUCT, testarrayofsortedstruct);
1627   }
1628   void add_flex(flatbuffers::Offset<flatbuffers::Vector<uint8_t>> flex) {
1629     fbb_.AddOffset(Monster::VT_FLEX, flex);
1630   }
1631   void add_test5(flatbuffers::Offset<flatbuffers::Vector<const MyGame::Example::Test *>> test5) {
1632     fbb_.AddOffset(Monster::VT_TEST5, test5);
1633   }
1634   void add_vector_of_longs(flatbuffers::Offset<flatbuffers::Vector<int64_t>> vector_of_longs) {
1635     fbb_.AddOffset(Monster::VT_VECTOR_OF_LONGS, vector_of_longs);
1636   }
1637   void add_vector_of_doubles(flatbuffers::Offset<flatbuffers::Vector<double>> vector_of_doubles) {
1638     fbb_.AddOffset(Monster::VT_VECTOR_OF_DOUBLES, vector_of_doubles);
1639   }
1640   void add_parent_namespace_test(flatbuffers::Offset<MyGame::InParentNamespace> parent_namespace_test) {
1641     fbb_.AddOffset(Monster::VT_PARENT_NAMESPACE_TEST, parent_namespace_test);
1642   }
1643   void add_vector_of_referrables(flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<MyGame::Example::Referrable>>> vector_of_referrables) {
1644     fbb_.AddOffset(Monster::VT_VECTOR_OF_REFERRABLES, vector_of_referrables);
1645   }
1646   void add_single_weak_reference(uint64_t single_weak_reference) {
1647     fbb_.AddElement<uint64_t>(Monster::VT_SINGLE_WEAK_REFERENCE, single_weak_reference, 0);
1648   }
1649   void add_vector_of_weak_references(flatbuffers::Offset<flatbuffers::Vector<uint64_t>> vector_of_weak_references) {
1650     fbb_.AddOffset(Monster::VT_VECTOR_OF_WEAK_REFERENCES, vector_of_weak_references);
1651   }
1652   void add_vector_of_strong_referrables(flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<MyGame::Example::Referrable>>> vector_of_strong_referrables) {
1653     fbb_.AddOffset(Monster::VT_VECTOR_OF_STRONG_REFERRABLES, vector_of_strong_referrables);
1654   }
1655   void add_co_owning_reference(uint64_t co_owning_reference) {
1656     fbb_.AddElement<uint64_t>(Monster::VT_CO_OWNING_REFERENCE, co_owning_reference, 0);
1657   }
1658   void add_vector_of_co_owning_references(flatbuffers::Offset<flatbuffers::Vector<uint64_t>> vector_of_co_owning_references) {
1659     fbb_.AddOffset(Monster::VT_VECTOR_OF_CO_OWNING_REFERENCES, vector_of_co_owning_references);
1660   }
1661   void add_non_owning_reference(uint64_t non_owning_reference) {
1662     fbb_.AddElement<uint64_t>(Monster::VT_NON_OWNING_REFERENCE, non_owning_reference, 0);
1663   }
1664   void add_vector_of_non_owning_references(flatbuffers::Offset<flatbuffers::Vector<uint64_t>> vector_of_non_owning_references) {
1665     fbb_.AddOffset(Monster::VT_VECTOR_OF_NON_OWNING_REFERENCES, vector_of_non_owning_references);
1666   }
1667   void add_any_unique_type(MyGame::Example::AnyUniqueAliases any_unique_type) {
1668     fbb_.AddElement<uint8_t>(Monster::VT_ANY_UNIQUE_TYPE, static_cast<uint8_t>(any_unique_type), 0);
1669   }
1670   void add_any_unique(flatbuffers::Offset<void> any_unique) {
1671     fbb_.AddOffset(Monster::VT_ANY_UNIQUE, any_unique);
1672   }
1673   void add_any_ambiguous_type(MyGame::Example::AnyAmbiguousAliases any_ambiguous_type) {
1674     fbb_.AddElement<uint8_t>(Monster::VT_ANY_AMBIGUOUS_TYPE, static_cast<uint8_t>(any_ambiguous_type), 0);
1675   }
1676   void add_any_ambiguous(flatbuffers::Offset<void> any_ambiguous) {
1677     fbb_.AddOffset(Monster::VT_ANY_AMBIGUOUS, any_ambiguous);
1678   }
1679   void add_vector_of_enums(flatbuffers::Offset<flatbuffers::Vector<MyGame::Example::Color>> vector_of_enums) {
1680     fbb_.AddOffset(Monster::VT_VECTOR_OF_ENUMS, vector_of_enums);
1681   }
1682   void add_signed_enum(MyGame::Example::Race signed_enum) {
1683     fbb_.AddElement<int8_t>(Monster::VT_SIGNED_ENUM, static_cast<int8_t>(signed_enum), -1);
1684   }
1685   explicit MonsterBuilder(flatbuffers::FlatBufferBuilder &_fbb)
1686         : fbb_(_fbb) {
1687     start_ = fbb_.StartTable();
1688   }
1689   MonsterBuilder &operator=(const MonsterBuilder &);
1690   flatbuffers::Offset<Monster> Finish() {
1691     const auto end = fbb_.EndTable(start_);
1692     auto o = flatbuffers::Offset<Monster>(end);
1693     fbb_.Required(o, Monster::VT_NAME);
1694     return o;
1695   }
1696 };
1697 
1698 inline flatbuffers::Offset<Monster> CreateMonster(
1699     flatbuffers::FlatBufferBuilder &_fbb,
1700     const MyGame::Example::Vec3 *pos = 0,
1701     int16_t mana = 150,
1702     int16_t hp = 100,
1703     flatbuffers::Offset<flatbuffers::String> name = 0,
1704     flatbuffers::Offset<flatbuffers::Vector<uint8_t>> inventory = 0,
1705     MyGame::Example::Color color = MyGame::Example::Color::Blue,
1706     MyGame::Example::Any test_type = MyGame::Example::Any::NONE,
1707     flatbuffers::Offset<void> test = 0,
1708     flatbuffers::Offset<flatbuffers::Vector<const MyGame::Example::Test *>> test4 = 0,
1709     flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<flatbuffers::String>>> testarrayofstring = 0,
1710     flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<MyGame::Example::Monster>>> testarrayoftables = 0,
1711     flatbuffers::Offset<MyGame::Example::Monster> enemy = 0,
1712     flatbuffers::Offset<flatbuffers::Vector<uint8_t>> testnestedflatbuffer = 0,
1713     flatbuffers::Offset<MyGame::Example::Stat> testempty = 0,
1714     bool testbool = false,
1715     int32_t testhashs32_fnv1 = 0,
1716     uint32_t testhashu32_fnv1 = 0,
1717     int64_t testhashs64_fnv1 = 0,
1718     uint64_t testhashu64_fnv1 = 0,
1719     int32_t testhashs32_fnv1a = 0,
1720     uint32_t testhashu32_fnv1a = 0,
1721     int64_t testhashs64_fnv1a = 0,
1722     uint64_t testhashu64_fnv1a = 0,
1723     flatbuffers::Offset<flatbuffers::Vector<uint8_t>> testarrayofbools = 0,
1724     float testf = 3.14159f,
1725     float testf2 = 3.0f,
1726     float testf3 = 0.0f,
1727     flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<flatbuffers::String>>> testarrayofstring2 = 0,
1728     flatbuffers::Offset<flatbuffers::Vector<const MyGame::Example::Ability *>> testarrayofsortedstruct = 0,
1729     flatbuffers::Offset<flatbuffers::Vector<uint8_t>> flex = 0,
1730     flatbuffers::Offset<flatbuffers::Vector<const MyGame::Example::Test *>> test5 = 0,
1731     flatbuffers::Offset<flatbuffers::Vector<int64_t>> vector_of_longs = 0,
1732     flatbuffers::Offset<flatbuffers::Vector<double>> vector_of_doubles = 0,
1733     flatbuffers::Offset<MyGame::InParentNamespace> parent_namespace_test = 0,
1734     flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<MyGame::Example::Referrable>>> vector_of_referrables = 0,
1735     uint64_t single_weak_reference = 0,
1736     flatbuffers::Offset<flatbuffers::Vector<uint64_t>> vector_of_weak_references = 0,
1737     flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<MyGame::Example::Referrable>>> vector_of_strong_referrables = 0,
1738     uint64_t co_owning_reference = 0,
1739     flatbuffers::Offset<flatbuffers::Vector<uint64_t>> vector_of_co_owning_references = 0,
1740     uint64_t non_owning_reference = 0,
1741     flatbuffers::Offset<flatbuffers::Vector<uint64_t>> vector_of_non_owning_references = 0,
1742     MyGame::Example::AnyUniqueAliases any_unique_type = MyGame::Example::AnyUniqueAliases::NONE,
1743     flatbuffers::Offset<void> any_unique = 0,
1744     MyGame::Example::AnyAmbiguousAliases any_ambiguous_type = MyGame::Example::AnyAmbiguousAliases::NONE,
1745     flatbuffers::Offset<void> any_ambiguous = 0,
1746     flatbuffers::Offset<flatbuffers::Vector<MyGame::Example::Color>> vector_of_enums = 0,
1747     MyGame::Example::Race signed_enum = MyGame::Example::Race::None) {
1748   MonsterBuilder builder_(_fbb);
1749   builder_.add_non_owning_reference(non_owning_reference);
1750   builder_.add_co_owning_reference(co_owning_reference);
1751   builder_.add_single_weak_reference(single_weak_reference);
1752   builder_.add_testhashu64_fnv1a(testhashu64_fnv1a);
1753   builder_.add_testhashs64_fnv1a(testhashs64_fnv1a);
1754   builder_.add_testhashu64_fnv1(testhashu64_fnv1);
1755   builder_.add_testhashs64_fnv1(testhashs64_fnv1);
1756   builder_.add_vector_of_enums(vector_of_enums);
1757   builder_.add_any_ambiguous(any_ambiguous);
1758   builder_.add_any_unique(any_unique);
1759   builder_.add_vector_of_non_owning_references(vector_of_non_owning_references);
1760   builder_.add_vector_of_co_owning_references(vector_of_co_owning_references);
1761   builder_.add_vector_of_strong_referrables(vector_of_strong_referrables);
1762   builder_.add_vector_of_weak_references(vector_of_weak_references);
1763   builder_.add_vector_of_referrables(vector_of_referrables);
1764   builder_.add_parent_namespace_test(parent_namespace_test);
1765   builder_.add_vector_of_doubles(vector_of_doubles);
1766   builder_.add_vector_of_longs(vector_of_longs);
1767   builder_.add_test5(test5);
1768   builder_.add_flex(flex);
1769   builder_.add_testarrayofsortedstruct(testarrayofsortedstruct);
1770   builder_.add_testarrayofstring2(testarrayofstring2);
1771   builder_.add_testf3(testf3);
1772   builder_.add_testf2(testf2);
1773   builder_.add_testf(testf);
1774   builder_.add_testarrayofbools(testarrayofbools);
1775   builder_.add_testhashu32_fnv1a(testhashu32_fnv1a);
1776   builder_.add_testhashs32_fnv1a(testhashs32_fnv1a);
1777   builder_.add_testhashu32_fnv1(testhashu32_fnv1);
1778   builder_.add_testhashs32_fnv1(testhashs32_fnv1);
1779   builder_.add_testempty(testempty);
1780   builder_.add_testnestedflatbuffer(testnestedflatbuffer);
1781   builder_.add_enemy(enemy);
1782   builder_.add_testarrayoftables(testarrayoftables);
1783   builder_.add_testarrayofstring(testarrayofstring);
1784   builder_.add_test4(test4);
1785   builder_.add_test(test);
1786   builder_.add_inventory(inventory);
1787   builder_.add_name(name);
1788   builder_.add_pos(pos);
1789   builder_.add_hp(hp);
1790   builder_.add_mana(mana);
1791   builder_.add_signed_enum(signed_enum);
1792   builder_.add_any_ambiguous_type(any_ambiguous_type);
1793   builder_.add_any_unique_type(any_unique_type);
1794   builder_.add_testbool(testbool);
1795   builder_.add_test_type(test_type);
1796   builder_.add_color(color);
1797   return builder_.Finish();
1798 }
1799 
1800 struct Monster::Traits {
1801   using type = Monster;
1802   static auto constexpr Create = CreateMonster;
1803 };
1804 
1805 inline flatbuffers::Offset<Monster> CreateMonsterDirect(
1806     flatbuffers::FlatBufferBuilder &_fbb,
1807     const MyGame::Example::Vec3 *pos = 0,
1808     int16_t mana = 150,
1809     int16_t hp = 100,
1810     const char *name = nullptr,
1811     const std::vector<uint8_t> *inventory = nullptr,
1812     MyGame::Example::Color color = MyGame::Example::Color::Blue,
1813     MyGame::Example::Any test_type = MyGame::Example::Any::NONE,
1814     flatbuffers::Offset<void> test = 0,
1815     const std::vector<MyGame::Example::Test> *test4 = nullptr,
1816     const std::vector<flatbuffers::Offset<flatbuffers::String>> *testarrayofstring = nullptr,
1817     std::vector<flatbuffers::Offset<MyGame::Example::Monster>> *testarrayoftables = nullptr,
1818     flatbuffers::Offset<MyGame::Example::Monster> enemy = 0,
1819     const std::vector<uint8_t> *testnestedflatbuffer = nullptr,
1820     flatbuffers::Offset<MyGame::Example::Stat> testempty = 0,
1821     bool testbool = false,
1822     int32_t testhashs32_fnv1 = 0,
1823     uint32_t testhashu32_fnv1 = 0,
1824     int64_t testhashs64_fnv1 = 0,
1825     uint64_t testhashu64_fnv1 = 0,
1826     int32_t testhashs32_fnv1a = 0,
1827     uint32_t testhashu32_fnv1a = 0,
1828     int64_t testhashs64_fnv1a = 0,
1829     uint64_t testhashu64_fnv1a = 0,
1830     const std::vector<uint8_t> *testarrayofbools = nullptr,
1831     float testf = 3.14159f,
1832     float testf2 = 3.0f,
1833     float testf3 = 0.0f,
1834     const std::vector<flatbuffers::Offset<flatbuffers::String>> *testarrayofstring2 = nullptr,
1835     std::vector<MyGame::Example::Ability> *testarrayofsortedstruct = nullptr,
1836     const std::vector<uint8_t> *flex = nullptr,
1837     const std::vector<MyGame::Example::Test> *test5 = nullptr,
1838     const std::vector<int64_t> *vector_of_longs = nullptr,
1839     const std::vector<double> *vector_of_doubles = nullptr,
1840     flatbuffers::Offset<MyGame::InParentNamespace> parent_namespace_test = 0,
1841     std::vector<flatbuffers::Offset<MyGame::Example::Referrable>> *vector_of_referrables = nullptr,
1842     uint64_t single_weak_reference = 0,
1843     const std::vector<uint64_t> *vector_of_weak_references = nullptr,
1844     std::vector<flatbuffers::Offset<MyGame::Example::Referrable>> *vector_of_strong_referrables = nullptr,
1845     uint64_t co_owning_reference = 0,
1846     const std::vector<uint64_t> *vector_of_co_owning_references = nullptr,
1847     uint64_t non_owning_reference = 0,
1848     const std::vector<uint64_t> *vector_of_non_owning_references = nullptr,
1849     MyGame::Example::AnyUniqueAliases any_unique_type = MyGame::Example::AnyUniqueAliases::NONE,
1850     flatbuffers::Offset<void> any_unique = 0,
1851     MyGame::Example::AnyAmbiguousAliases any_ambiguous_type = MyGame::Example::AnyAmbiguousAliases::NONE,
1852     flatbuffers::Offset<void> any_ambiguous = 0,
1853     const std::vector<MyGame::Example::Color> *vector_of_enums = nullptr,
1854     MyGame::Example::Race signed_enum = MyGame::Example::Race::None) {
1855   auto name__ = name ? _fbb.CreateString(name) : 0;
1856   auto inventory__ = inventory ? _fbb.CreateVector<uint8_t>(*inventory) : 0;
1857   auto test4__ = test4 ? _fbb.CreateVectorOfStructs<MyGame::Example::Test>(*test4) : 0;
1858   auto testarrayofstring__ = testarrayofstring ? _fbb.CreateVector<flatbuffers::Offset<flatbuffers::String>>(*testarrayofstring) : 0;
1859   auto testarrayoftables__ = testarrayoftables ? _fbb.CreateVectorOfSortedTables<MyGame::Example::Monster>(testarrayoftables) : 0;
1860   auto testnestedflatbuffer__ = testnestedflatbuffer ? _fbb.CreateVector<uint8_t>(*testnestedflatbuffer) : 0;
1861   auto testarrayofbools__ = testarrayofbools ? _fbb.CreateVector<uint8_t>(*testarrayofbools) : 0;
1862   auto testarrayofstring2__ = testarrayofstring2 ? _fbb.CreateVector<flatbuffers::Offset<flatbuffers::String>>(*testarrayofstring2) : 0;
1863   auto testarrayofsortedstruct__ = testarrayofsortedstruct ? _fbb.CreateVectorOfSortedStructs<MyGame::Example::Ability>(testarrayofsortedstruct) : 0;
1864   auto flex__ = flex ? _fbb.CreateVector<uint8_t>(*flex) : 0;
1865   auto test5__ = test5 ? _fbb.CreateVectorOfStructs<MyGame::Example::Test>(*test5) : 0;
1866   auto vector_of_longs__ = vector_of_longs ? _fbb.CreateVector<int64_t>(*vector_of_longs) : 0;
1867   auto vector_of_doubles__ = vector_of_doubles ? _fbb.CreateVector<double>(*vector_of_doubles) : 0;
1868   auto vector_of_referrables__ = vector_of_referrables ? _fbb.CreateVectorOfSortedTables<MyGame::Example::Referrable>(vector_of_referrables) : 0;
1869   auto vector_of_weak_references__ = vector_of_weak_references ? _fbb.CreateVector<uint64_t>(*vector_of_weak_references) : 0;
1870   auto vector_of_strong_referrables__ = vector_of_strong_referrables ? _fbb.CreateVectorOfSortedTables<MyGame::Example::Referrable>(vector_of_strong_referrables) : 0;
1871   auto vector_of_co_owning_references__ = vector_of_co_owning_references ? _fbb.CreateVector<uint64_t>(*vector_of_co_owning_references) : 0;
1872   auto vector_of_non_owning_references__ = vector_of_non_owning_references ? _fbb.CreateVector<uint64_t>(*vector_of_non_owning_references) : 0;
1873   auto vector_of_enums__ = vector_of_enums ? _fbb.CreateVector<MyGame::Example::Color>(*vector_of_enums) : 0;
1874   return MyGame::Example::CreateMonster(
1875       _fbb,
1876       pos,
1877       mana,
1878       hp,
1879       name__,
1880       inventory__,
1881       color,
1882       test_type,
1883       test,
1884       test4__,
1885       testarrayofstring__,
1886       testarrayoftables__,
1887       enemy,
1888       testnestedflatbuffer__,
1889       testempty,
1890       testbool,
1891       testhashs32_fnv1,
1892       testhashu32_fnv1,
1893       testhashs64_fnv1,
1894       testhashu64_fnv1,
1895       testhashs32_fnv1a,
1896       testhashu32_fnv1a,
1897       testhashs64_fnv1a,
1898       testhashu64_fnv1a,
1899       testarrayofbools__,
1900       testf,
1901       testf2,
1902       testf3,
1903       testarrayofstring2__,
1904       testarrayofsortedstruct__,
1905       flex__,
1906       test5__,
1907       vector_of_longs__,
1908       vector_of_doubles__,
1909       parent_namespace_test,
1910       vector_of_referrables__,
1911       single_weak_reference,
1912       vector_of_weak_references__,
1913       vector_of_strong_referrables__,
1914       co_owning_reference,
1915       vector_of_co_owning_references__,
1916       non_owning_reference,
1917       vector_of_non_owning_references__,
1918       any_unique_type,
1919       any_unique,
1920       any_ambiguous_type,
1921       any_ambiguous,
1922       vector_of_enums__,
1923       signed_enum);
1924 }
1925 
1926 flatbuffers::Offset<Monster> CreateMonster(flatbuffers::FlatBufferBuilder &_fbb, const MonsterT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr);
1927 
1928 struct TypeAliasesT : public flatbuffers::NativeTable {
1929   typedef TypeAliases TableType;
1930   int8_t i8;
1931   uint8_t u8;
1932   int16_t i16;
1933   uint16_t u16;
1934   int32_t i32;
1935   uint32_t u32;
1936   int64_t i64;
1937   uint64_t u64;
1938   float f32;
1939   double f64;
1940   std::vector<int8_t> v8;
1941   std::vector<double> vf64;
1942   TypeAliasesT()
1943       : i8(0),
1944         u8(0),
1945         i16(0),
1946         u16(0),
1947         i32(0),
1948         u32(0),
1949         i64(0),
1950         u64(0),
1951         f32(0.0f),
1952         f64(0.0) {
1953   }
1954 };
1955 
1956 struct TypeAliases FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
1957   typedef TypeAliasesT NativeTableType;
1958   typedef TypeAliasesBuilder Builder;
1959   struct Traits;
1960   static const flatbuffers::TypeTable *MiniReflectTypeTable() {
1961     return TypeAliasesTypeTable();
1962   }
1963   enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
1964     VT_I8 = 4,
1965     VT_U8 = 6,
1966     VT_I16 = 8,
1967     VT_U16 = 10,
1968     VT_I32 = 12,
1969     VT_U32 = 14,
1970     VT_I64 = 16,
1971     VT_U64 = 18,
1972     VT_F32 = 20,
1973     VT_F64 = 22,
1974     VT_V8 = 24,
1975     VT_VF64 = 26
1976   };
1977   int8_t i8() const {
1978     return GetField<int8_t>(VT_I8, 0);
1979   }
1980   bool mutate_i8(int8_t _i8) {
1981     return SetField<int8_t>(VT_I8, _i8, 0);
1982   }
1983   uint8_t u8() const {
1984     return GetField<uint8_t>(VT_U8, 0);
1985   }
1986   bool mutate_u8(uint8_t _u8) {
1987     return SetField<uint8_t>(VT_U8, _u8, 0);
1988   }
1989   int16_t i16() const {
1990     return GetField<int16_t>(VT_I16, 0);
1991   }
1992   bool mutate_i16(int16_t _i16) {
1993     return SetField<int16_t>(VT_I16, _i16, 0);
1994   }
1995   uint16_t u16() const {
1996     return GetField<uint16_t>(VT_U16, 0);
1997   }
1998   bool mutate_u16(uint16_t _u16) {
1999     return SetField<uint16_t>(VT_U16, _u16, 0);
2000   }
2001   int32_t i32() const {
2002     return GetField<int32_t>(VT_I32, 0);
2003   }
2004   bool mutate_i32(int32_t _i32) {
2005     return SetField<int32_t>(VT_I32, _i32, 0);
2006   }
2007   uint32_t u32() const {
2008     return GetField<uint32_t>(VT_U32, 0);
2009   }
2010   bool mutate_u32(uint32_t _u32) {
2011     return SetField<uint32_t>(VT_U32, _u32, 0);
2012   }
2013   int64_t i64() const {
2014     return GetField<int64_t>(VT_I64, 0);
2015   }
2016   bool mutate_i64(int64_t _i64) {
2017     return SetField<int64_t>(VT_I64, _i64, 0);
2018   }
2019   uint64_t u64() const {
2020     return GetField<uint64_t>(VT_U64, 0);
2021   }
2022   bool mutate_u64(uint64_t _u64) {
2023     return SetField<uint64_t>(VT_U64, _u64, 0);
2024   }
2025   float f32() const {
2026     return GetField<float>(VT_F32, 0.0f);
2027   }
2028   bool mutate_f32(float _f32) {
2029     return SetField<float>(VT_F32, _f32, 0.0f);
2030   }
2031   double f64() const {
2032     return GetField<double>(VT_F64, 0.0);
2033   }
2034   bool mutate_f64(double _f64) {
2035     return SetField<double>(VT_F64, _f64, 0.0);
2036   }
2037   const flatbuffers::Vector<int8_t> *v8() const {
2038     return GetPointer<const flatbuffers::Vector<int8_t> *>(VT_V8);
2039   }
2040   flatbuffers::Vector<int8_t> *mutable_v8() {
2041     return GetPointer<flatbuffers::Vector<int8_t> *>(VT_V8);
2042   }
2043   const flatbuffers::Vector<double> *vf64() const {
2044     return GetPointer<const flatbuffers::Vector<double> *>(VT_VF64);
2045   }
2046   flatbuffers::Vector<double> *mutable_vf64() {
2047     return GetPointer<flatbuffers::Vector<double> *>(VT_VF64);
2048   }
2049   bool Verify(flatbuffers::Verifier &verifier) const {
2050     return VerifyTableStart(verifier) &&
2051            VerifyField<int8_t>(verifier, VT_I8) &&
2052            VerifyField<uint8_t>(verifier, VT_U8) &&
2053            VerifyField<int16_t>(verifier, VT_I16) &&
2054            VerifyField<uint16_t>(verifier, VT_U16) &&
2055            VerifyField<int32_t>(verifier, VT_I32) &&
2056            VerifyField<uint32_t>(verifier, VT_U32) &&
2057            VerifyField<int64_t>(verifier, VT_I64) &&
2058            VerifyField<uint64_t>(verifier, VT_U64) &&
2059            VerifyField<float>(verifier, VT_F32) &&
2060            VerifyField<double>(verifier, VT_F64) &&
2061            VerifyOffset(verifier, VT_V8) &&
2062            verifier.VerifyVector(v8()) &&
2063            VerifyOffset(verifier, VT_VF64) &&
2064            verifier.VerifyVector(vf64()) &&
2065            verifier.EndTable();
2066   }
2067   TypeAliasesT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const;
2068   void UnPackTo(TypeAliasesT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const;
2069   static flatbuffers::Offset<TypeAliases> Pack(flatbuffers::FlatBufferBuilder &_fbb, const TypeAliasesT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr);
2070 };
2071 
2072 struct TypeAliasesBuilder {
2073   typedef TypeAliases Table;
2074   flatbuffers::FlatBufferBuilder &fbb_;
2075   flatbuffers::uoffset_t start_;
2076   void add_i8(int8_t i8) {
2077     fbb_.AddElement<int8_t>(TypeAliases::VT_I8, i8, 0);
2078   }
2079   void add_u8(uint8_t u8) {
2080     fbb_.AddElement<uint8_t>(TypeAliases::VT_U8, u8, 0);
2081   }
2082   void add_i16(int16_t i16) {
2083     fbb_.AddElement<int16_t>(TypeAliases::VT_I16, i16, 0);
2084   }
2085   void add_u16(uint16_t u16) {
2086     fbb_.AddElement<uint16_t>(TypeAliases::VT_U16, u16, 0);
2087   }
2088   void add_i32(int32_t i32) {
2089     fbb_.AddElement<int32_t>(TypeAliases::VT_I32, i32, 0);
2090   }
2091   void add_u32(uint32_t u32) {
2092     fbb_.AddElement<uint32_t>(TypeAliases::VT_U32, u32, 0);
2093   }
2094   void add_i64(int64_t i64) {
2095     fbb_.AddElement<int64_t>(TypeAliases::VT_I64, i64, 0);
2096   }
2097   void add_u64(uint64_t u64) {
2098     fbb_.AddElement<uint64_t>(TypeAliases::VT_U64, u64, 0);
2099   }
2100   void add_f32(float f32) {
2101     fbb_.AddElement<float>(TypeAliases::VT_F32, f32, 0.0f);
2102   }
2103   void add_f64(double f64) {
2104     fbb_.AddElement<double>(TypeAliases::VT_F64, f64, 0.0);
2105   }
2106   void add_v8(flatbuffers::Offset<flatbuffers::Vector<int8_t>> v8) {
2107     fbb_.AddOffset(TypeAliases::VT_V8, v8);
2108   }
2109   void add_vf64(flatbuffers::Offset<flatbuffers::Vector<double>> vf64) {
2110     fbb_.AddOffset(TypeAliases::VT_VF64, vf64);
2111   }
2112   explicit TypeAliasesBuilder(flatbuffers::FlatBufferBuilder &_fbb)
2113         : fbb_(_fbb) {
2114     start_ = fbb_.StartTable();
2115   }
2116   TypeAliasesBuilder &operator=(const TypeAliasesBuilder &);
2117   flatbuffers::Offset<TypeAliases> Finish() {
2118     const auto end = fbb_.EndTable(start_);
2119     auto o = flatbuffers::Offset<TypeAliases>(end);
2120     return o;
2121   }
2122 };
2123 
2124 inline flatbuffers::Offset<TypeAliases> CreateTypeAliases(
2125     flatbuffers::FlatBufferBuilder &_fbb,
2126     int8_t i8 = 0,
2127     uint8_t u8 = 0,
2128     int16_t i16 = 0,
2129     uint16_t u16 = 0,
2130     int32_t i32 = 0,
2131     uint32_t u32 = 0,
2132     int64_t i64 = 0,
2133     uint64_t u64 = 0,
2134     float f32 = 0.0f,
2135     double f64 = 0.0,
2136     flatbuffers::Offset<flatbuffers::Vector<int8_t>> v8 = 0,
2137     flatbuffers::Offset<flatbuffers::Vector<double>> vf64 = 0) {
2138   TypeAliasesBuilder builder_(_fbb);
2139   builder_.add_f64(f64);
2140   builder_.add_u64(u64);
2141   builder_.add_i64(i64);
2142   builder_.add_vf64(vf64);
2143   builder_.add_v8(v8);
2144   builder_.add_f32(f32);
2145   builder_.add_u32(u32);
2146   builder_.add_i32(i32);
2147   builder_.add_u16(u16);
2148   builder_.add_i16(i16);
2149   builder_.add_u8(u8);
2150   builder_.add_i8(i8);
2151   return builder_.Finish();
2152 }
2153 
2154 struct TypeAliases::Traits {
2155   using type = TypeAliases;
2156   static auto constexpr Create = CreateTypeAliases;
2157 };
2158 
2159 inline flatbuffers::Offset<TypeAliases> CreateTypeAliasesDirect(
2160     flatbuffers::FlatBufferBuilder &_fbb,
2161     int8_t i8 = 0,
2162     uint8_t u8 = 0,
2163     int16_t i16 = 0,
2164     uint16_t u16 = 0,
2165     int32_t i32 = 0,
2166     uint32_t u32 = 0,
2167     int64_t i64 = 0,
2168     uint64_t u64 = 0,
2169     float f32 = 0.0f,
2170     double f64 = 0.0,
2171     const std::vector<int8_t> *v8 = nullptr,
2172     const std::vector<double> *vf64 = nullptr) {
2173   auto v8__ = v8 ? _fbb.CreateVector<int8_t>(*v8) : 0;
2174   auto vf64__ = vf64 ? _fbb.CreateVector<double>(*vf64) : 0;
2175   return MyGame::Example::CreateTypeAliases(
2176       _fbb,
2177       i8,
2178       u8,
2179       i16,
2180       u16,
2181       i32,
2182       u32,
2183       i64,
2184       u64,
2185       f32,
2186       f64,
2187       v8__,
2188       vf64__);
2189 }
2190 
2191 flatbuffers::Offset<TypeAliases> CreateTypeAliases(flatbuffers::FlatBufferBuilder &_fbb, const TypeAliasesT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr);
2192 
2193 }  // namespace Example
2194 
2195 inline InParentNamespaceT *InParentNamespace::UnPack(const flatbuffers::resolver_function_t *_resolver) const {
2196   std::unique_ptr<MyGame::InParentNamespaceT> _o = std::unique_ptr<MyGame::InParentNamespaceT>(new InParentNamespaceT());
2197   UnPackTo(_o.get(), _resolver);
2198   return _o.release();
2199 }
2200 
2201 inline void InParentNamespace::UnPackTo(InParentNamespaceT *_o, const flatbuffers::resolver_function_t *_resolver) const {
2202   (void)_o;
2203   (void)_resolver;
2204 }
2205 
2206 inline flatbuffers::Offset<InParentNamespace> InParentNamespace::Pack(flatbuffers::FlatBufferBuilder &_fbb, const InParentNamespaceT* _o, const flatbuffers::rehasher_function_t *_rehasher) {
2207   return CreateInParentNamespace(_fbb, _o, _rehasher);
2208 }
2209 
2210 inline flatbuffers::Offset<InParentNamespace> CreateInParentNamespace(flatbuffers::FlatBufferBuilder &_fbb, const InParentNamespaceT *_o, const flatbuffers::rehasher_function_t *_rehasher) {
2211   (void)_rehasher;
2212   (void)_o;
2213   struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const InParentNamespaceT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va;
2214   return MyGame::CreateInParentNamespace(
2215       _fbb);
2216 }
2217 
2218 namespace Example2 {
2219 
2220 inline MonsterT *Monster::UnPack(const flatbuffers::resolver_function_t *_resolver) const {
2221   std::unique_ptr<MyGame::Example2::MonsterT> _o = std::unique_ptr<MyGame::Example2::MonsterT>(new MonsterT());
2222   UnPackTo(_o.get(), _resolver);
2223   return _o.release();
2224 }
2225 
2226 inline void Monster::UnPackTo(MonsterT *_o, const flatbuffers::resolver_function_t *_resolver) const {
2227   (void)_o;
2228   (void)_resolver;
2229 }
2230 
2231 inline flatbuffers::Offset<Monster> Monster::Pack(flatbuffers::FlatBufferBuilder &_fbb, const MonsterT* _o, const flatbuffers::rehasher_function_t *_rehasher) {
2232   return CreateMonster(_fbb, _o, _rehasher);
2233 }
2234 
2235 inline flatbuffers::Offset<Monster> CreateMonster(flatbuffers::FlatBufferBuilder &_fbb, const MonsterT *_o, const flatbuffers::rehasher_function_t *_rehasher) {
2236   (void)_rehasher;
2237   (void)_o;
2238   struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const MonsterT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va;
2239   return MyGame::Example2::CreateMonster(
2240       _fbb);
2241 }
2242 
2243 }  // namespace Example2
2244 
2245 namespace Example {
2246 
2247 inline TestSimpleTableWithEnumT *TestSimpleTableWithEnum::UnPack(const flatbuffers::resolver_function_t *_resolver) const {
2248   std::unique_ptr<MyGame::Example::TestSimpleTableWithEnumT> _o = std::unique_ptr<MyGame::Example::TestSimpleTableWithEnumT>(new TestSimpleTableWithEnumT());
2249   UnPackTo(_o.get(), _resolver);
2250   return _o.release();
2251 }
2252 
2253 inline void TestSimpleTableWithEnum::UnPackTo(TestSimpleTableWithEnumT *_o, const flatbuffers::resolver_function_t *_resolver) const {
2254   (void)_o;
2255   (void)_resolver;
2256   { auto _e = color(); _o->color = _e; }
2257 }
2258 
2259 inline flatbuffers::Offset<TestSimpleTableWithEnum> TestSimpleTableWithEnum::Pack(flatbuffers::FlatBufferBuilder &_fbb, const TestSimpleTableWithEnumT* _o, const flatbuffers::rehasher_function_t *_rehasher) {
2260   return CreateTestSimpleTableWithEnum(_fbb, _o, _rehasher);
2261 }
2262 
2263 inline flatbuffers::Offset<TestSimpleTableWithEnum> CreateTestSimpleTableWithEnum(flatbuffers::FlatBufferBuilder &_fbb, const TestSimpleTableWithEnumT *_o, const flatbuffers::rehasher_function_t *_rehasher) {
2264   (void)_rehasher;
2265   (void)_o;
2266   struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const TestSimpleTableWithEnumT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va;
2267   auto _color = _o->color;
2268   return MyGame::Example::CreateTestSimpleTableWithEnum(
2269       _fbb,
2270       _color);
2271 }
2272 
2273 inline StatT *Stat::UnPack(const flatbuffers::resolver_function_t *_resolver) const {
2274   std::unique_ptr<MyGame::Example::StatT> _o = std::unique_ptr<MyGame::Example::StatT>(new StatT());
2275   UnPackTo(_o.get(), _resolver);
2276   return _o.release();
2277 }
2278 
2279 inline void Stat::UnPackTo(StatT *_o, const flatbuffers::resolver_function_t *_resolver) const {
2280   (void)_o;
2281   (void)_resolver;
2282   { auto _e = id(); if (_e) _o->id = _e->str(); }
2283   { auto _e = val(); _o->val = _e; }
2284   { auto _e = count(); _o->count = _e; }
2285 }
2286 
2287 inline flatbuffers::Offset<Stat> Stat::Pack(flatbuffers::FlatBufferBuilder &_fbb, const StatT* _o, const flatbuffers::rehasher_function_t *_rehasher) {
2288   return CreateStat(_fbb, _o, _rehasher);
2289 }
2290 
2291 inline flatbuffers::Offset<Stat> CreateStat(flatbuffers::FlatBufferBuilder &_fbb, const StatT *_o, const flatbuffers::rehasher_function_t *_rehasher) {
2292   (void)_rehasher;
2293   (void)_o;
2294   struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const StatT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va;
2295   auto _id = _o->id.empty() ? 0 : _fbb.CreateString(_o->id);
2296   auto _val = _o->val;
2297   auto _count = _o->count;
2298   return MyGame::Example::CreateStat(
2299       _fbb,
2300       _id,
2301       _val,
2302       _count);
2303 }
2304 
2305 inline ReferrableT *Referrable::UnPack(const flatbuffers::resolver_function_t *_resolver) const {
2306   std::unique_ptr<MyGame::Example::ReferrableT> _o = std::unique_ptr<MyGame::Example::ReferrableT>(new ReferrableT());
2307   UnPackTo(_o.get(), _resolver);
2308   return _o.release();
2309 }
2310 
2311 inline void Referrable::UnPackTo(ReferrableT *_o, const flatbuffers::resolver_function_t *_resolver) const {
2312   (void)_o;
2313   (void)_resolver;
2314   { auto _e = id(); _o->id = _e; }
2315 }
2316 
2317 inline flatbuffers::Offset<Referrable> Referrable::Pack(flatbuffers::FlatBufferBuilder &_fbb, const ReferrableT* _o, const flatbuffers::rehasher_function_t *_rehasher) {
2318   return CreateReferrable(_fbb, _o, _rehasher);
2319 }
2320 
2321 inline flatbuffers::Offset<Referrable> CreateReferrable(flatbuffers::FlatBufferBuilder &_fbb, const ReferrableT *_o, const flatbuffers::rehasher_function_t *_rehasher) {
2322   (void)_rehasher;
2323   (void)_o;
2324   struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const ReferrableT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va;
2325   auto _id = _o->id;
2326   return MyGame::Example::CreateReferrable(
2327       _fbb,
2328       _id);
2329 }
2330 
2331 inline MonsterT *Monster::UnPack(const flatbuffers::resolver_function_t *_resolver) const {
2332   std::unique_ptr<MyGame::Example::MonsterT> _o = std::unique_ptr<MyGame::Example::MonsterT>(new MonsterT());
2333   UnPackTo(_o.get(), _resolver);
2334   return _o.release();
2335 }
2336 
2337 inline void Monster::UnPackTo(MonsterT *_o, const flatbuffers::resolver_function_t *_resolver) const {
2338   (void)_o;
2339   (void)_resolver;
2340   { auto _e = pos(); if (_e) _o->pos = std::unique_ptr<MyGame::Example::Vec3>(new MyGame::Example::Vec3(*_e)); }
2341   { auto _e = mana(); _o->mana = _e; }
2342   { auto _e = hp(); _o->hp = _e; }
2343   { auto _e = name(); if (_e) _o->name = _e->str(); }
2344   { auto _e = inventory(); if (_e) { _o->inventory.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->inventory[_i] = _e->Get(_i); } } }
2345   { auto _e = color(); _o->color = _e; }
2346   { auto _e = test_type(); _o->test.type = _e; }
2347   { auto _e = test(); if (_e) _o->test.value = MyGame::Example::AnyUnion::UnPack(_e, test_type(), _resolver); }
2348   { auto _e = test4(); if (_e) { _o->test4.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->test4[_i] = *_e->Get(_i); } } }
2349   { auto _e = testarrayofstring(); if (_e) { _o->testarrayofstring.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->testarrayofstring[_i] = _e->Get(_i)->str(); } } }
2350   { auto _e = testarrayoftables(); if (_e) { _o->testarrayoftables.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->testarrayoftables[_i] = std::unique_ptr<MyGame::Example::MonsterT>(_e->Get(_i)->UnPack(_resolver)); } } }
2351   { auto _e = enemy(); if (_e) _o->enemy = std::unique_ptr<MyGame::Example::MonsterT>(_e->UnPack(_resolver)); }
2352   { auto _e = testnestedflatbuffer(); if (_e) { _o->testnestedflatbuffer.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->testnestedflatbuffer[_i] = _e->Get(_i); } } }
2353   { auto _e = testempty(); if (_e) _o->testempty = std::unique_ptr<MyGame::Example::StatT>(_e->UnPack(_resolver)); }
2354   { auto _e = testbool(); _o->testbool = _e; }
2355   { auto _e = testhashs32_fnv1(); _o->testhashs32_fnv1 = _e; }
2356   { auto _e = testhashu32_fnv1(); _o->testhashu32_fnv1 = _e; }
2357   { auto _e = testhashs64_fnv1(); _o->testhashs64_fnv1 = _e; }
2358   { auto _e = testhashu64_fnv1(); _o->testhashu64_fnv1 = _e; }
2359   { auto _e = testhashs32_fnv1a(); _o->testhashs32_fnv1a = _e; }
2360   { auto _e = testhashu32_fnv1a(); //scalar resolver, naked
2361 if (_resolver) (*_resolver)(reinterpret_cast<void **>(&_o->testhashu32_fnv1a), static_cast<flatbuffers::hash_value_t>(_e)); else _o->testhashu32_fnv1a = nullptr; }
2362   { auto _e = testhashs64_fnv1a(); _o->testhashs64_fnv1a = _e; }
2363   { auto _e = testhashu64_fnv1a(); _o->testhashu64_fnv1a = _e; }
2364   { auto _e = testarrayofbools(); if (_e) { _o->testarrayofbools.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->testarrayofbools[_i] = _e->Get(_i) != 0; } } }
2365   { auto _e = testf(); _o->testf = _e; }
2366   { auto _e = testf2(); _o->testf2 = _e; }
2367   { auto _e = testf3(); _o->testf3 = _e; }
2368   { auto _e = testarrayofstring2(); if (_e) { _o->testarrayofstring2.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->testarrayofstring2[_i] = _e->Get(_i)->str(); } } }
2369   { auto _e = testarrayofsortedstruct(); if (_e) { _o->testarrayofsortedstruct.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->testarrayofsortedstruct[_i] = *_e->Get(_i); } } }
2370   { auto _e = flex(); if (_e) { _o->flex.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->flex[_i] = _e->Get(_i); } } }
2371   { auto _e = test5(); if (_e) { _o->test5.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->test5[_i] = *_e->Get(_i); } } }
2372   { auto _e = vector_of_longs(); if (_e) { _o->vector_of_longs.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->vector_of_longs[_i] = _e->Get(_i); } } }
2373   { auto _e = vector_of_doubles(); if (_e) { _o->vector_of_doubles.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->vector_of_doubles[_i] = _e->Get(_i); } } }
2374   { auto _e = parent_namespace_test(); if (_e) _o->parent_namespace_test = std::unique_ptr<MyGame::InParentNamespaceT>(_e->UnPack(_resolver)); }
2375   { auto _e = vector_of_referrables(); if (_e) { _o->vector_of_referrables.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->vector_of_referrables[_i] = std::unique_ptr<MyGame::Example::ReferrableT>(_e->Get(_i)->UnPack(_resolver)); } } }
2376   { auto _e = single_weak_reference(); //scalar resolver, naked
2377 if (_resolver) (*_resolver)(reinterpret_cast<void **>(&_o->single_weak_reference), static_cast<flatbuffers::hash_value_t>(_e)); else _o->single_weak_reference = nullptr; }
2378   { auto _e = vector_of_weak_references(); if (_e) { _o->vector_of_weak_references.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { //vector resolver, naked
2379 if (_resolver) (*_resolver)(reinterpret_cast<void **>(&_o->vector_of_weak_references[_i]), static_cast<flatbuffers::hash_value_t>(_e->Get(_i))); else _o->vector_of_weak_references[_i] = nullptr; } } }
2380   { auto _e = vector_of_strong_referrables(); if (_e) { _o->vector_of_strong_referrables.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->vector_of_strong_referrables[_i] = std::unique_ptr<MyGame::Example::ReferrableT>(_e->Get(_i)->UnPack(_resolver)); } } }
2381   { auto _e = co_owning_reference(); //scalar resolver, naked
2382 if (_resolver) (*_resolver)(reinterpret_cast<void **>(&_o->co_owning_reference), static_cast<flatbuffers::hash_value_t>(_e)); else _o->co_owning_reference = nullptr; }
2383   { auto _e = vector_of_co_owning_references(); if (_e) { _o->vector_of_co_owning_references.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { //vector resolver, default_ptr_type
2384 if (_resolver) (*_resolver)(reinterpret_cast<void **>(&_o->vector_of_co_owning_references[_i]), static_cast<flatbuffers::hash_value_t>(_e->Get(_i)));/* else do nothing */; } } }
2385   { auto _e = non_owning_reference(); //scalar resolver, naked
2386 if (_resolver) (*_resolver)(reinterpret_cast<void **>(&_o->non_owning_reference), static_cast<flatbuffers::hash_value_t>(_e)); else _o->non_owning_reference = nullptr; }
2387   { auto _e = vector_of_non_owning_references(); if (_e) { _o->vector_of_non_owning_references.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { //vector resolver, naked
2388 if (_resolver) (*_resolver)(reinterpret_cast<void **>(&_o->vector_of_non_owning_references[_i]), static_cast<flatbuffers::hash_value_t>(_e->Get(_i))); else _o->vector_of_non_owning_references[_i] = nullptr; } } }
2389   { auto _e = any_unique_type(); _o->any_unique.type = _e; }
2390   { auto _e = any_unique(); if (_e) _o->any_unique.value = MyGame::Example::AnyUniqueAliasesUnion::UnPack(_e, any_unique_type(), _resolver); }
2391   { auto _e = any_ambiguous_type(); _o->any_ambiguous.type = _e; }
2392   { auto _e = any_ambiguous(); if (_e) _o->any_ambiguous.value = MyGame::Example::AnyAmbiguousAliasesUnion::UnPack(_e, any_ambiguous_type(), _resolver); }
2393   { auto _e = vector_of_enums(); if (_e) { _o->vector_of_enums.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->vector_of_enums[_i] = static_cast<MyGame::Example::Color>(_e->Get(_i)); } } }
2394   { auto _e = signed_enum(); _o->signed_enum = _e; }
2395 }
2396 
2397 inline flatbuffers::Offset<Monster> Monster::Pack(flatbuffers::FlatBufferBuilder &_fbb, const MonsterT* _o, const flatbuffers::rehasher_function_t *_rehasher) {
2398   return CreateMonster(_fbb, _o, _rehasher);
2399 }
2400 
2401 inline flatbuffers::Offset<Monster> CreateMonster(flatbuffers::FlatBufferBuilder &_fbb, const MonsterT *_o, const flatbuffers::rehasher_function_t *_rehasher) {
2402   (void)_rehasher;
2403   (void)_o;
2404   struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const MonsterT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va;
2405   auto _pos = _o->pos ? _o->pos.get() : 0;
2406   auto _mana = _o->mana;
2407   auto _hp = _o->hp;
2408   auto _name = _fbb.CreateString(_o->name);
2409   auto _inventory = _o->inventory.size() ? _fbb.CreateVector(_o->inventory) : 0;
2410   auto _color = _o->color;
2411   auto _test_type = _o->test.type;
2412   auto _test = _o->test.Pack(_fbb);
2413   auto _test4 = _o->test4.size() ? _fbb.CreateVectorOfStructs(_o->test4) : 0;
2414   auto _testarrayofstring = _o->testarrayofstring.size() ? _fbb.CreateVectorOfStrings(_o->testarrayofstring) : 0;
2415   auto _testarrayoftables = _o->testarrayoftables.size() ? _fbb.CreateVector<flatbuffers::Offset<MyGame::Example::Monster>> (_o->testarrayoftables.size(), [](size_t i, _VectorArgs *__va) { return CreateMonster(*__va->__fbb, __va->__o->testarrayoftables[i].get(), __va->__rehasher); }, &_va ) : 0;
2416   auto _enemy = _o->enemy ? CreateMonster(_fbb, _o->enemy.get(), _rehasher) : 0;
2417   auto _testnestedflatbuffer = _o->testnestedflatbuffer.size() ? _fbb.CreateVector(_o->testnestedflatbuffer) : 0;
2418   auto _testempty = _o->testempty ? CreateStat(_fbb, _o->testempty.get(), _rehasher) : 0;
2419   auto _testbool = _o->testbool;
2420   auto _testhashs32_fnv1 = _o->testhashs32_fnv1;
2421   auto _testhashu32_fnv1 = _o->testhashu32_fnv1;
2422   auto _testhashs64_fnv1 = _o->testhashs64_fnv1;
2423   auto _testhashu64_fnv1 = _o->testhashu64_fnv1;
2424   auto _testhashs32_fnv1a = _o->testhashs32_fnv1a;
2425   auto _testhashu32_fnv1a = _rehasher ? static_cast<uint32_t>((*_rehasher)(_o->testhashu32_fnv1a)) : 0;
2426   auto _testhashs64_fnv1a = _o->testhashs64_fnv1a;
2427   auto _testhashu64_fnv1a = _o->testhashu64_fnv1a;
2428   auto _testarrayofbools = _o->testarrayofbools.size() ? _fbb.CreateVector(_o->testarrayofbools) : 0;
2429   auto _testf = _o->testf;
2430   auto _testf2 = _o->testf2;
2431   auto _testf3 = _o->testf3;
2432   auto _testarrayofstring2 = _o->testarrayofstring2.size() ? _fbb.CreateVectorOfStrings(_o->testarrayofstring2) : 0;
2433   auto _testarrayofsortedstruct = _o->testarrayofsortedstruct.size() ? _fbb.CreateVectorOfStructs(_o->testarrayofsortedstruct) : 0;
2434   auto _flex = _o->flex.size() ? _fbb.CreateVector(_o->flex) : 0;
2435   auto _test5 = _o->test5.size() ? _fbb.CreateVectorOfStructs(_o->test5) : 0;
2436   auto _vector_of_longs = _o->vector_of_longs.size() ? _fbb.CreateVector(_o->vector_of_longs) : 0;
2437   auto _vector_of_doubles = _o->vector_of_doubles.size() ? _fbb.CreateVector(_o->vector_of_doubles) : 0;
2438   auto _parent_namespace_test = _o->parent_namespace_test ? CreateInParentNamespace(_fbb, _o->parent_namespace_test.get(), _rehasher) : 0;
2439   auto _vector_of_referrables = _o->vector_of_referrables.size() ? _fbb.CreateVector<flatbuffers::Offset<MyGame::Example::Referrable>> (_o->vector_of_referrables.size(), [](size_t i, _VectorArgs *__va) { return CreateReferrable(*__va->__fbb, __va->__o->vector_of_referrables[i].get(), __va->__rehasher); }, &_va ) : 0;
2440   auto _single_weak_reference = _rehasher ? static_cast<uint64_t>((*_rehasher)(_o->single_weak_reference)) : 0;
2441   auto _vector_of_weak_references = _o->vector_of_weak_references.size() ? _fbb.CreateVector<uint64_t>(_o->vector_of_weak_references.size(), [](size_t i, _VectorArgs *__va) { return __va->__rehasher ? static_cast<uint64_t>((*__va->__rehasher)(__va->__o->vector_of_weak_references[i])) : 0; }, &_va ) : 0;
2442   auto _vector_of_strong_referrables = _o->vector_of_strong_referrables.size() ? _fbb.CreateVector<flatbuffers::Offset<MyGame::Example::Referrable>> (_o->vector_of_strong_referrables.size(), [](size_t i, _VectorArgs *__va) { return CreateReferrable(*__va->__fbb, __va->__o->vector_of_strong_referrables[i].get(), __va->__rehasher); }, &_va ) : 0;
2443   auto _co_owning_reference = _rehasher ? static_cast<uint64_t>((*_rehasher)(_o->co_owning_reference)) : 0;
2444   auto _vector_of_co_owning_references = _o->vector_of_co_owning_references.size() ? _fbb.CreateVector<uint64_t>(_o->vector_of_co_owning_references.size(), [](size_t i, _VectorArgs *__va) { return __va->__rehasher ? static_cast<uint64_t>((*__va->__rehasher)(__va->__o->vector_of_co_owning_references[i].get())) : 0; }, &_va ) : 0;
2445   auto _non_owning_reference = _rehasher ? static_cast<uint64_t>((*_rehasher)(_o->non_owning_reference)) : 0;
2446   auto _vector_of_non_owning_references = _o->vector_of_non_owning_references.size() ? _fbb.CreateVector<uint64_t>(_o->vector_of_non_owning_references.size(), [](size_t i, _VectorArgs *__va) { return __va->__rehasher ? static_cast<uint64_t>((*__va->__rehasher)(__va->__o->vector_of_non_owning_references[i])) : 0; }, &_va ) : 0;
2447   auto _any_unique_type = _o->any_unique.type;
2448   auto _any_unique = _o->any_unique.Pack(_fbb);
2449   auto _any_ambiguous_type = _o->any_ambiguous.type;
2450   auto _any_ambiguous = _o->any_ambiguous.Pack(_fbb);
2451   auto _vector_of_enums = _o->vector_of_enums.size() ? _fbb.CreateVector(_o->vector_of_enums) : 0;
2452   auto _signed_enum = _o->signed_enum;
2453   return MyGame::Example::CreateMonster(
2454       _fbb,
2455       _pos,
2456       _mana,
2457       _hp,
2458       _name,
2459       _inventory,
2460       _color,
2461       _test_type,
2462       _test,
2463       _test4,
2464       _testarrayofstring,
2465       _testarrayoftables,
2466       _enemy,
2467       _testnestedflatbuffer,
2468       _testempty,
2469       _testbool,
2470       _testhashs32_fnv1,
2471       _testhashu32_fnv1,
2472       _testhashs64_fnv1,
2473       _testhashu64_fnv1,
2474       _testhashs32_fnv1a,
2475       _testhashu32_fnv1a,
2476       _testhashs64_fnv1a,
2477       _testhashu64_fnv1a,
2478       _testarrayofbools,
2479       _testf,
2480       _testf2,
2481       _testf3,
2482       _testarrayofstring2,
2483       _testarrayofsortedstruct,
2484       _flex,
2485       _test5,
2486       _vector_of_longs,
2487       _vector_of_doubles,
2488       _parent_namespace_test,
2489       _vector_of_referrables,
2490       _single_weak_reference,
2491       _vector_of_weak_references,
2492       _vector_of_strong_referrables,
2493       _co_owning_reference,
2494       _vector_of_co_owning_references,
2495       _non_owning_reference,
2496       _vector_of_non_owning_references,
2497       _any_unique_type,
2498       _any_unique,
2499       _any_ambiguous_type,
2500       _any_ambiguous,
2501       _vector_of_enums,
2502       _signed_enum);
2503 }
2504 
2505 inline TypeAliasesT *TypeAliases::UnPack(const flatbuffers::resolver_function_t *_resolver) const {
2506   std::unique_ptr<MyGame::Example::TypeAliasesT> _o = std::unique_ptr<MyGame::Example::TypeAliasesT>(new TypeAliasesT());
2507   UnPackTo(_o.get(), _resolver);
2508   return _o.release();
2509 }
2510 
2511 inline void TypeAliases::UnPackTo(TypeAliasesT *_o, const flatbuffers::resolver_function_t *_resolver) const {
2512   (void)_o;
2513   (void)_resolver;
2514   { auto _e = i8(); _o->i8 = _e; }
2515   { auto _e = u8(); _o->u8 = _e; }
2516   { auto _e = i16(); _o->i16 = _e; }
2517   { auto _e = u16(); _o->u16 = _e; }
2518   { auto _e = i32(); _o->i32 = _e; }
2519   { auto _e = u32(); _o->u32 = _e; }
2520   { auto _e = i64(); _o->i64 = _e; }
2521   { auto _e = u64(); _o->u64 = _e; }
2522   { auto _e = f32(); _o->f32 = _e; }
2523   { auto _e = f64(); _o->f64 = _e; }
2524   { auto _e = v8(); if (_e) { _o->v8.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->v8[_i] = _e->Get(_i); } } }
2525   { auto _e = vf64(); if (_e) { _o->vf64.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->vf64[_i] = _e->Get(_i); } } }
2526 }
2527 
2528 inline flatbuffers::Offset<TypeAliases> TypeAliases::Pack(flatbuffers::FlatBufferBuilder &_fbb, const TypeAliasesT* _o, const flatbuffers::rehasher_function_t *_rehasher) {
2529   return CreateTypeAliases(_fbb, _o, _rehasher);
2530 }
2531 
2532 inline flatbuffers::Offset<TypeAliases> CreateTypeAliases(flatbuffers::FlatBufferBuilder &_fbb, const TypeAliasesT *_o, const flatbuffers::rehasher_function_t *_rehasher) {
2533   (void)_rehasher;
2534   (void)_o;
2535   struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const TypeAliasesT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va;
2536   auto _i8 = _o->i8;
2537   auto _u8 = _o->u8;
2538   auto _i16 = _o->i16;
2539   auto _u16 = _o->u16;
2540   auto _i32 = _o->i32;
2541   auto _u32 = _o->u32;
2542   auto _i64 = _o->i64;
2543   auto _u64 = _o->u64;
2544   auto _f32 = _o->f32;
2545   auto _f64 = _o->f64;
2546   auto _v8 = _o->v8.size() ? _fbb.CreateVector(_o->v8) : 0;
2547   auto _vf64 = _o->vf64.size() ? _fbb.CreateVector(_o->vf64) : 0;
2548   return MyGame::Example::CreateTypeAliases(
2549       _fbb,
2550       _i8,
2551       _u8,
2552       _i16,
2553       _u16,
2554       _i32,
2555       _u32,
2556       _i64,
2557       _u64,
2558       _f32,
2559       _f64,
2560       _v8,
2561       _vf64);
2562 }
2563 
2564 inline bool VerifyAny(flatbuffers::Verifier &verifier, const void *obj, Any type) {
2565   switch (type) {
2566     case Any::NONE: {
2567       return true;
2568     }
2569     case Any::Monster: {
2570       auto ptr = reinterpret_cast<const MyGame::Example::Monster *>(obj);
2571       return verifier.VerifyTable(ptr);
2572     }
2573     case Any::TestSimpleTableWithEnum: {
2574       auto ptr = reinterpret_cast<const MyGame::Example::TestSimpleTableWithEnum *>(obj);
2575       return verifier.VerifyTable(ptr);
2576     }
2577     case Any::MyGame_Example2_Monster: {
2578       auto ptr = reinterpret_cast<const MyGame::Example2::Monster *>(obj);
2579       return verifier.VerifyTable(ptr);
2580     }
2581     default: return true;
2582   }
2583 }
2584 
2585 inline bool VerifyAnyVector(flatbuffers::Verifier &verifier, const flatbuffers::Vector<flatbuffers::Offset<void>> *values, const flatbuffers::Vector<uint8_t> *types) {
2586   if (!values || !types) return !values && !types;
2587   if (values->size() != types->size()) return false;
2588   for (flatbuffers::uoffset_t i = 0; i < values->size(); ++i) {
2589     if (!VerifyAny(
2590         verifier,  values->Get(i), types->GetEnum<Any>(i))) {
2591       return false;
2592     }
2593   }
2594   return true;
2595 }
2596 
2597 inline void *AnyUnion::UnPack(const void *obj, Any type, const flatbuffers::resolver_function_t *resolver) {
2598   switch (type) {
2599     case Any::Monster: {
2600       auto ptr = reinterpret_cast<const MyGame::Example::Monster *>(obj);
2601       return ptr->UnPack(resolver);
2602     }
2603     case Any::TestSimpleTableWithEnum: {
2604       auto ptr = reinterpret_cast<const MyGame::Example::TestSimpleTableWithEnum *>(obj);
2605       return ptr->UnPack(resolver);
2606     }
2607     case Any::MyGame_Example2_Monster: {
2608       auto ptr = reinterpret_cast<const MyGame::Example2::Monster *>(obj);
2609       return ptr->UnPack(resolver);
2610     }
2611     default: return nullptr;
2612   }
2613 }
2614 
2615 inline flatbuffers::Offset<void> AnyUnion::Pack(flatbuffers::FlatBufferBuilder &_fbb, const flatbuffers::rehasher_function_t *_rehasher) const {
2616   switch (type) {
2617     case Any::Monster: {
2618       auto ptr = reinterpret_cast<const MyGame::Example::MonsterT *>(value);
2619       return CreateMonster(_fbb, ptr, _rehasher).Union();
2620     }
2621     case Any::TestSimpleTableWithEnum: {
2622       auto ptr = reinterpret_cast<const MyGame::Example::TestSimpleTableWithEnumT *>(value);
2623       return CreateTestSimpleTableWithEnum(_fbb, ptr, _rehasher).Union();
2624     }
2625     case Any::MyGame_Example2_Monster: {
2626       auto ptr = reinterpret_cast<const MyGame::Example2::MonsterT *>(value);
2627       return CreateMonster(_fbb, ptr, _rehasher).Union();
2628     }
2629     default: return 0;
2630   }
2631 }
2632 
2633 inline AnyUnion::AnyUnion(const AnyUnion &u) : type(u.type), value(nullptr) {
2634   switch (type) {
2635     case Any::Monster: {
2636       FLATBUFFERS_ASSERT(false);  // MyGame::Example::MonsterT not copyable.
2637       break;
2638     }
2639     case Any::TestSimpleTableWithEnum: {
2640       value = new MyGame::Example::TestSimpleTableWithEnumT(*reinterpret_cast<MyGame::Example::TestSimpleTableWithEnumT *>(u.value));
2641       break;
2642     }
2643     case Any::MyGame_Example2_Monster: {
2644       value = new MyGame::Example2::MonsterT(*reinterpret_cast<MyGame::Example2::MonsterT *>(u.value));
2645       break;
2646     }
2647     default:
2648       break;
2649   }
2650 }
2651 
2652 inline void AnyUnion::Reset() {
2653   switch (type) {
2654     case Any::Monster: {
2655       auto ptr = reinterpret_cast<MyGame::Example::MonsterT *>(value);
2656       delete ptr;
2657       break;
2658     }
2659     case Any::TestSimpleTableWithEnum: {
2660       auto ptr = reinterpret_cast<MyGame::Example::TestSimpleTableWithEnumT *>(value);
2661       delete ptr;
2662       break;
2663     }
2664     case Any::MyGame_Example2_Monster: {
2665       auto ptr = reinterpret_cast<MyGame::Example2::MonsterT *>(value);
2666       delete ptr;
2667       break;
2668     }
2669     default: break;
2670   }
2671   value = nullptr;
2672   type = Any::NONE;
2673 }
2674 
2675 inline bool VerifyAnyUniqueAliases(flatbuffers::Verifier &verifier, const void *obj, AnyUniqueAliases type) {
2676   switch (type) {
2677     case AnyUniqueAliases::NONE: {
2678       return true;
2679     }
2680     case AnyUniqueAliases::M: {
2681       auto ptr = reinterpret_cast<const MyGame::Example::Monster *>(obj);
2682       return verifier.VerifyTable(ptr);
2683     }
2684     case AnyUniqueAliases::TS: {
2685       auto ptr = reinterpret_cast<const MyGame::Example::TestSimpleTableWithEnum *>(obj);
2686       return verifier.VerifyTable(ptr);
2687     }
2688     case AnyUniqueAliases::M2: {
2689       auto ptr = reinterpret_cast<const MyGame::Example2::Monster *>(obj);
2690       return verifier.VerifyTable(ptr);
2691     }
2692     default: return true;
2693   }
2694 }
2695 
2696 inline bool VerifyAnyUniqueAliasesVector(flatbuffers::Verifier &verifier, const flatbuffers::Vector<flatbuffers::Offset<void>> *values, const flatbuffers::Vector<uint8_t> *types) {
2697   if (!values || !types) return !values && !types;
2698   if (values->size() != types->size()) return false;
2699   for (flatbuffers::uoffset_t i = 0; i < values->size(); ++i) {
2700     if (!VerifyAnyUniqueAliases(
2701         verifier,  values->Get(i), types->GetEnum<AnyUniqueAliases>(i))) {
2702       return false;
2703     }
2704   }
2705   return true;
2706 }
2707 
2708 inline void *AnyUniqueAliasesUnion::UnPack(const void *obj, AnyUniqueAliases type, const flatbuffers::resolver_function_t *resolver) {
2709   switch (type) {
2710     case AnyUniqueAliases::M: {
2711       auto ptr = reinterpret_cast<const MyGame::Example::Monster *>(obj);
2712       return ptr->UnPack(resolver);
2713     }
2714     case AnyUniqueAliases::TS: {
2715       auto ptr = reinterpret_cast<const MyGame::Example::TestSimpleTableWithEnum *>(obj);
2716       return ptr->UnPack(resolver);
2717     }
2718     case AnyUniqueAliases::M2: {
2719       auto ptr = reinterpret_cast<const MyGame::Example2::Monster *>(obj);
2720       return ptr->UnPack(resolver);
2721     }
2722     default: return nullptr;
2723   }
2724 }
2725 
2726 inline flatbuffers::Offset<void> AnyUniqueAliasesUnion::Pack(flatbuffers::FlatBufferBuilder &_fbb, const flatbuffers::rehasher_function_t *_rehasher) const {
2727   switch (type) {
2728     case AnyUniqueAliases::M: {
2729       auto ptr = reinterpret_cast<const MyGame::Example::MonsterT *>(value);
2730       return CreateMonster(_fbb, ptr, _rehasher).Union();
2731     }
2732     case AnyUniqueAliases::TS: {
2733       auto ptr = reinterpret_cast<const MyGame::Example::TestSimpleTableWithEnumT *>(value);
2734       return CreateTestSimpleTableWithEnum(_fbb, ptr, _rehasher).Union();
2735     }
2736     case AnyUniqueAliases::M2: {
2737       auto ptr = reinterpret_cast<const MyGame::Example2::MonsterT *>(value);
2738       return CreateMonster(_fbb, ptr, _rehasher).Union();
2739     }
2740     default: return 0;
2741   }
2742 }
2743 
2744 inline AnyUniqueAliasesUnion::AnyUniqueAliasesUnion(const AnyUniqueAliasesUnion &u) : type(u.type), value(nullptr) {
2745   switch (type) {
2746     case AnyUniqueAliases::M: {
2747       FLATBUFFERS_ASSERT(false);  // MyGame::Example::MonsterT not copyable.
2748       break;
2749     }
2750     case AnyUniqueAliases::TS: {
2751       value = new MyGame::Example::TestSimpleTableWithEnumT(*reinterpret_cast<MyGame::Example::TestSimpleTableWithEnumT *>(u.value));
2752       break;
2753     }
2754     case AnyUniqueAliases::M2: {
2755       value = new MyGame::Example2::MonsterT(*reinterpret_cast<MyGame::Example2::MonsterT *>(u.value));
2756       break;
2757     }
2758     default:
2759       break;
2760   }
2761 }
2762 
2763 inline void AnyUniqueAliasesUnion::Reset() {
2764   switch (type) {
2765     case AnyUniqueAliases::M: {
2766       auto ptr = reinterpret_cast<MyGame::Example::MonsterT *>(value);
2767       delete ptr;
2768       break;
2769     }
2770     case AnyUniqueAliases::TS: {
2771       auto ptr = reinterpret_cast<MyGame::Example::TestSimpleTableWithEnumT *>(value);
2772       delete ptr;
2773       break;
2774     }
2775     case AnyUniqueAliases::M2: {
2776       auto ptr = reinterpret_cast<MyGame::Example2::MonsterT *>(value);
2777       delete ptr;
2778       break;
2779     }
2780     default: break;
2781   }
2782   value = nullptr;
2783   type = AnyUniqueAliases::NONE;
2784 }
2785 
2786 inline bool VerifyAnyAmbiguousAliases(flatbuffers::Verifier &verifier, const void *obj, AnyAmbiguousAliases type) {
2787   switch (type) {
2788     case AnyAmbiguousAliases::NONE: {
2789       return true;
2790     }
2791     case AnyAmbiguousAliases::M1: {
2792       auto ptr = reinterpret_cast<const MyGame::Example::Monster *>(obj);
2793       return verifier.VerifyTable(ptr);
2794     }
2795     case AnyAmbiguousAliases::M2: {
2796       auto ptr = reinterpret_cast<const MyGame::Example::Monster *>(obj);
2797       return verifier.VerifyTable(ptr);
2798     }
2799     case AnyAmbiguousAliases::M3: {
2800       auto ptr = reinterpret_cast<const MyGame::Example::Monster *>(obj);
2801       return verifier.VerifyTable(ptr);
2802     }
2803     default: return true;
2804   }
2805 }
2806 
2807 inline bool VerifyAnyAmbiguousAliasesVector(flatbuffers::Verifier &verifier, const flatbuffers::Vector<flatbuffers::Offset<void>> *values, const flatbuffers::Vector<uint8_t> *types) {
2808   if (!values || !types) return !values && !types;
2809   if (values->size() != types->size()) return false;
2810   for (flatbuffers::uoffset_t i = 0; i < values->size(); ++i) {
2811     if (!VerifyAnyAmbiguousAliases(
2812         verifier,  values->Get(i), types->GetEnum<AnyAmbiguousAliases>(i))) {
2813       return false;
2814     }
2815   }
2816   return true;
2817 }
2818 
2819 inline void *AnyAmbiguousAliasesUnion::UnPack(const void *obj, AnyAmbiguousAliases type, const flatbuffers::resolver_function_t *resolver) {
2820   switch (type) {
2821     case AnyAmbiguousAliases::M1: {
2822       auto ptr = reinterpret_cast<const MyGame::Example::Monster *>(obj);
2823       return ptr->UnPack(resolver);
2824     }
2825     case AnyAmbiguousAliases::M2: {
2826       auto ptr = reinterpret_cast<const MyGame::Example::Monster *>(obj);
2827       return ptr->UnPack(resolver);
2828     }
2829     case AnyAmbiguousAliases::M3: {
2830       auto ptr = reinterpret_cast<const MyGame::Example::Monster *>(obj);
2831       return ptr->UnPack(resolver);
2832     }
2833     default: return nullptr;
2834   }
2835 }
2836 
2837 inline flatbuffers::Offset<void> AnyAmbiguousAliasesUnion::Pack(flatbuffers::FlatBufferBuilder &_fbb, const flatbuffers::rehasher_function_t *_rehasher) const {
2838   switch (type) {
2839     case AnyAmbiguousAliases::M1: {
2840       auto ptr = reinterpret_cast<const MyGame::Example::MonsterT *>(value);
2841       return CreateMonster(_fbb, ptr, _rehasher).Union();
2842     }
2843     case AnyAmbiguousAliases::M2: {
2844       auto ptr = reinterpret_cast<const MyGame::Example::MonsterT *>(value);
2845       return CreateMonster(_fbb, ptr, _rehasher).Union();
2846     }
2847     case AnyAmbiguousAliases::M3: {
2848       auto ptr = reinterpret_cast<const MyGame::Example::MonsterT *>(value);
2849       return CreateMonster(_fbb, ptr, _rehasher).Union();
2850     }
2851     default: return 0;
2852   }
2853 }
2854 
2855 inline AnyAmbiguousAliasesUnion::AnyAmbiguousAliasesUnion(const AnyAmbiguousAliasesUnion &u) : type(u.type), value(nullptr) {
2856   switch (type) {
2857     case AnyAmbiguousAliases::M1: {
2858       FLATBUFFERS_ASSERT(false);  // MyGame::Example::MonsterT not copyable.
2859       break;
2860     }
2861     case AnyAmbiguousAliases::M2: {
2862       FLATBUFFERS_ASSERT(false);  // MyGame::Example::MonsterT not copyable.
2863       break;
2864     }
2865     case AnyAmbiguousAliases::M3: {
2866       FLATBUFFERS_ASSERT(false);  // MyGame::Example::MonsterT not copyable.
2867       break;
2868     }
2869     default:
2870       break;
2871   }
2872 }
2873 
2874 inline void AnyAmbiguousAliasesUnion::Reset() {
2875   switch (type) {
2876     case AnyAmbiguousAliases::M1: {
2877       auto ptr = reinterpret_cast<MyGame::Example::MonsterT *>(value);
2878       delete ptr;
2879       break;
2880     }
2881     case AnyAmbiguousAliases::M2: {
2882       auto ptr = reinterpret_cast<MyGame::Example::MonsterT *>(value);
2883       delete ptr;
2884       break;
2885     }
2886     case AnyAmbiguousAliases::M3: {
2887       auto ptr = reinterpret_cast<MyGame::Example::MonsterT *>(value);
2888       delete ptr;
2889       break;
2890     }
2891     default: break;
2892   }
2893   value = nullptr;
2894   type = AnyAmbiguousAliases::NONE;
2895 }
2896 
2897 inline const flatbuffers::TypeTable *ColorTypeTable() {
2898   static const flatbuffers::TypeCode type_codes[] = {
2899     { flatbuffers::ET_UCHAR, 0, 0 },
2900     { flatbuffers::ET_UCHAR, 0, 0 },
2901     { flatbuffers::ET_UCHAR, 0, 0 }
2902   };
2903   static const flatbuffers::TypeFunction type_refs[] = {
2904     MyGame::Example::ColorTypeTable
2905   };
2906   static const int64_t values[] = { 1, 2, 8 };
2907   static const char * const names[] = {
2908     "Red",
2909     "Green",
2910     "Blue"
2911   };
2912   static const flatbuffers::TypeTable tt = {
2913     flatbuffers::ST_ENUM, 3, type_codes, type_refs, values, names
2914   };
2915   return &tt;
2916 }
2917 
2918 inline const flatbuffers::TypeTable *RaceTypeTable() {
2919   static const flatbuffers::TypeCode type_codes[] = {
2920     { flatbuffers::ET_CHAR, 0, 0 },
2921     { flatbuffers::ET_CHAR, 0, 0 },
2922     { flatbuffers::ET_CHAR, 0, 0 },
2923     { flatbuffers::ET_CHAR, 0, 0 }
2924   };
2925   static const flatbuffers::TypeFunction type_refs[] = {
2926     MyGame::Example::RaceTypeTable
2927   };
2928   static const int64_t values[] = { -1, 0, 1, 2 };
2929   static const char * const names[] = {
2930     "None",
2931     "Human",
2932     "Dwarf",
2933     "Elf"
2934   };
2935   static const flatbuffers::TypeTable tt = {
2936     flatbuffers::ST_ENUM, 4, type_codes, type_refs, values, names
2937   };
2938   return &tt;
2939 }
2940 
2941 inline const flatbuffers::TypeTable *AnyTypeTable() {
2942   static const flatbuffers::TypeCode type_codes[] = {
2943     { flatbuffers::ET_SEQUENCE, 0, -1 },
2944     { flatbuffers::ET_SEQUENCE, 0, 0 },
2945     { flatbuffers::ET_SEQUENCE, 0, 1 },
2946     { flatbuffers::ET_SEQUENCE, 0, 2 }
2947   };
2948   static const flatbuffers::TypeFunction type_refs[] = {
2949     MyGame::Example::MonsterTypeTable,
2950     MyGame::Example::TestSimpleTableWithEnumTypeTable,
2951     MyGame::Example2::MonsterTypeTable
2952   };
2953   static const char * const names[] = {
2954     "NONE",
2955     "Monster",
2956     "TestSimpleTableWithEnum",
2957     "MyGame_Example2_Monster"
2958   };
2959   static const flatbuffers::TypeTable tt = {
2960     flatbuffers::ST_UNION, 4, type_codes, type_refs, nullptr, names
2961   };
2962   return &tt;
2963 }
2964 
2965 inline const flatbuffers::TypeTable *AnyUniqueAliasesTypeTable() {
2966   static const flatbuffers::TypeCode type_codes[] = {
2967     { flatbuffers::ET_SEQUENCE, 0, -1 },
2968     { flatbuffers::ET_SEQUENCE, 0, 0 },
2969     { flatbuffers::ET_SEQUENCE, 0, 1 },
2970     { flatbuffers::ET_SEQUENCE, 0, 2 }
2971   };
2972   static const flatbuffers::TypeFunction type_refs[] = {
2973     MyGame::Example::MonsterTypeTable,
2974     MyGame::Example::TestSimpleTableWithEnumTypeTable,
2975     MyGame::Example2::MonsterTypeTable
2976   };
2977   static const char * const names[] = {
2978     "NONE",
2979     "M",
2980     "TS",
2981     "M2"
2982   };
2983   static const flatbuffers::TypeTable tt = {
2984     flatbuffers::ST_UNION, 4, type_codes, type_refs, nullptr, names
2985   };
2986   return &tt;
2987 }
2988 
2989 inline const flatbuffers::TypeTable *AnyAmbiguousAliasesTypeTable() {
2990   static const flatbuffers::TypeCode type_codes[] = {
2991     { flatbuffers::ET_SEQUENCE, 0, -1 },
2992     { flatbuffers::ET_SEQUENCE, 0, 0 },
2993     { flatbuffers::ET_SEQUENCE, 0, 0 },
2994     { flatbuffers::ET_SEQUENCE, 0, 0 }
2995   };
2996   static const flatbuffers::TypeFunction type_refs[] = {
2997     MyGame::Example::MonsterTypeTable
2998   };
2999   static const char * const names[] = {
3000     "NONE",
3001     "M1",
3002     "M2",
3003     "M3"
3004   };
3005   static const flatbuffers::TypeTable tt = {
3006     flatbuffers::ST_UNION, 4, type_codes, type_refs, nullptr, names
3007   };
3008   return &tt;
3009 }
3010 
3011 }  // namespace Example
3012 
3013 inline const flatbuffers::TypeTable *InParentNamespaceTypeTable() {
3014   static const flatbuffers::TypeTable tt = {
3015     flatbuffers::ST_TABLE, 0, nullptr, nullptr, nullptr, nullptr
3016   };
3017   return &tt;
3018 }
3019 
3020 namespace Example2 {
3021 
3022 inline const flatbuffers::TypeTable *MonsterTypeTable() {
3023   static const flatbuffers::TypeTable tt = {
3024     flatbuffers::ST_TABLE, 0, nullptr, nullptr, nullptr, nullptr
3025   };
3026   return &tt;
3027 }
3028 
3029 }  // namespace Example2
3030 
3031 namespace Example {
3032 
3033 inline const flatbuffers::TypeTable *TestTypeTable() {
3034   static const flatbuffers::TypeCode type_codes[] = {
3035     { flatbuffers::ET_SHORT, 0, -1 },
3036     { flatbuffers::ET_CHAR, 0, -1 }
3037   };
3038   static const int64_t values[] = { 0, 2, 4 };
3039   static const char * const names[] = {
3040     "a",
3041     "b"
3042   };
3043   static const flatbuffers::TypeTable tt = {
3044     flatbuffers::ST_STRUCT, 2, type_codes, nullptr, values, names
3045   };
3046   return &tt;
3047 }
3048 
3049 inline const flatbuffers::TypeTable *TestSimpleTableWithEnumTypeTable() {
3050   static const flatbuffers::TypeCode type_codes[] = {
3051     { flatbuffers::ET_UCHAR, 0, 0 }
3052   };
3053   static const flatbuffers::TypeFunction type_refs[] = {
3054     MyGame::Example::ColorTypeTable
3055   };
3056   static const char * const names[] = {
3057     "color"
3058   };
3059   static const flatbuffers::TypeTable tt = {
3060     flatbuffers::ST_TABLE, 1, type_codes, type_refs, nullptr, names
3061   };
3062   return &tt;
3063 }
3064 
3065 inline const flatbuffers::TypeTable *Vec3TypeTable() {
3066   static const flatbuffers::TypeCode type_codes[] = {
3067     { flatbuffers::ET_FLOAT, 0, -1 },
3068     { flatbuffers::ET_FLOAT, 0, -1 },
3069     { flatbuffers::ET_FLOAT, 0, -1 },
3070     { flatbuffers::ET_DOUBLE, 0, -1 },
3071     { flatbuffers::ET_UCHAR, 0, 0 },
3072     { flatbuffers::ET_SEQUENCE, 0, 1 }
3073   };
3074   static const flatbuffers::TypeFunction type_refs[] = {
3075     MyGame::Example::ColorTypeTable,
3076     MyGame::Example::TestTypeTable
3077   };
3078   static const int64_t values[] = { 0, 4, 8, 16, 24, 26, 32 };
3079   static const char * const names[] = {
3080     "x",
3081     "y",
3082     "z",
3083     "test1",
3084     "test2",
3085     "test3"
3086   };
3087   static const flatbuffers::TypeTable tt = {
3088     flatbuffers::ST_STRUCT, 6, type_codes, type_refs, values, names
3089   };
3090   return &tt;
3091 }
3092 
3093 inline const flatbuffers::TypeTable *AbilityTypeTable() {
3094   static const flatbuffers::TypeCode type_codes[] = {
3095     { flatbuffers::ET_UINT, 0, -1 },
3096     { flatbuffers::ET_UINT, 0, -1 }
3097   };
3098   static const int64_t values[] = { 0, 4, 8 };
3099   static const char * const names[] = {
3100     "id",
3101     "distance"
3102   };
3103   static const flatbuffers::TypeTable tt = {
3104     flatbuffers::ST_STRUCT, 2, type_codes, nullptr, values, names
3105   };
3106   return &tt;
3107 }
3108 
3109 inline const flatbuffers::TypeTable *StatTypeTable() {
3110   static const flatbuffers::TypeCode type_codes[] = {
3111     { flatbuffers::ET_STRING, 0, -1 },
3112     { flatbuffers::ET_LONG, 0, -1 },
3113     { flatbuffers::ET_USHORT, 0, -1 }
3114   };
3115   static const char * const names[] = {
3116     "id",
3117     "val",
3118     "count"
3119   };
3120   static const flatbuffers::TypeTable tt = {
3121     flatbuffers::ST_TABLE, 3, type_codes, nullptr, nullptr, names
3122   };
3123   return &tt;
3124 }
3125 
3126 inline const flatbuffers::TypeTable *ReferrableTypeTable() {
3127   static const flatbuffers::TypeCode type_codes[] = {
3128     { flatbuffers::ET_ULONG, 0, -1 }
3129   };
3130   static const char * const names[] = {
3131     "id"
3132   };
3133   static const flatbuffers::TypeTable tt = {
3134     flatbuffers::ST_TABLE, 1, type_codes, nullptr, nullptr, names
3135   };
3136   return &tt;
3137 }
3138 
3139 inline const flatbuffers::TypeTable *MonsterTypeTable() {
3140   static const flatbuffers::TypeCode type_codes[] = {
3141     { flatbuffers::ET_SEQUENCE, 0, 0 },
3142     { flatbuffers::ET_SHORT, 0, -1 },
3143     { flatbuffers::ET_SHORT, 0, -1 },
3144     { flatbuffers::ET_STRING, 0, -1 },
3145     { flatbuffers::ET_BOOL, 0, -1 },
3146     { flatbuffers::ET_UCHAR, 1, -1 },
3147     { flatbuffers::ET_UCHAR, 0, 1 },
3148     { flatbuffers::ET_UTYPE, 0, 2 },
3149     { flatbuffers::ET_SEQUENCE, 0, 2 },
3150     { flatbuffers::ET_SEQUENCE, 1, 3 },
3151     { flatbuffers::ET_STRING, 1, -1 },
3152     { flatbuffers::ET_SEQUENCE, 1, 4 },
3153     { flatbuffers::ET_SEQUENCE, 0, 4 },
3154     { flatbuffers::ET_UCHAR, 1, -1 },
3155     { flatbuffers::ET_SEQUENCE, 0, 5 },
3156     { flatbuffers::ET_BOOL, 0, -1 },
3157     { flatbuffers::ET_INT, 0, -1 },
3158     { flatbuffers::ET_UINT, 0, -1 },
3159     { flatbuffers::ET_LONG, 0, -1 },
3160     { flatbuffers::ET_ULONG, 0, -1 },
3161     { flatbuffers::ET_INT, 0, -1 },
3162     { flatbuffers::ET_UINT, 0, -1 },
3163     { flatbuffers::ET_LONG, 0, -1 },
3164     { flatbuffers::ET_ULONG, 0, -1 },
3165     { flatbuffers::ET_BOOL, 1, -1 },
3166     { flatbuffers::ET_FLOAT, 0, -1 },
3167     { flatbuffers::ET_FLOAT, 0, -1 },
3168     { flatbuffers::ET_FLOAT, 0, -1 },
3169     { flatbuffers::ET_STRING, 1, -1 },
3170     { flatbuffers::ET_SEQUENCE, 1, 6 },
3171     { flatbuffers::ET_UCHAR, 1, -1 },
3172     { flatbuffers::ET_SEQUENCE, 1, 3 },
3173     { flatbuffers::ET_LONG, 1, -1 },
3174     { flatbuffers::ET_DOUBLE, 1, -1 },
3175     { flatbuffers::ET_SEQUENCE, 0, 7 },
3176     { flatbuffers::ET_SEQUENCE, 1, 8 },
3177     { flatbuffers::ET_ULONG, 0, -1 },
3178     { flatbuffers::ET_ULONG, 1, -1 },
3179     { flatbuffers::ET_SEQUENCE, 1, 8 },
3180     { flatbuffers::ET_ULONG, 0, -1 },
3181     { flatbuffers::ET_ULONG, 1, -1 },
3182     { flatbuffers::ET_ULONG, 0, -1 },
3183     { flatbuffers::ET_ULONG, 1, -1 },
3184     { flatbuffers::ET_UTYPE, 0, 9 },
3185     { flatbuffers::ET_SEQUENCE, 0, 9 },
3186     { flatbuffers::ET_UTYPE, 0, 10 },
3187     { flatbuffers::ET_SEQUENCE, 0, 10 },
3188     { flatbuffers::ET_UCHAR, 1, 1 },
3189     { flatbuffers::ET_CHAR, 0, 11 }
3190   };
3191   static const flatbuffers::TypeFunction type_refs[] = {
3192     MyGame::Example::Vec3TypeTable,
3193     MyGame::Example::ColorTypeTable,
3194     MyGame::Example::AnyTypeTable,
3195     MyGame::Example::TestTypeTable,
3196     MyGame::Example::MonsterTypeTable,
3197     MyGame::Example::StatTypeTable,
3198     MyGame::Example::AbilityTypeTable,
3199     MyGame::InParentNamespaceTypeTable,
3200     MyGame::Example::ReferrableTypeTable,
3201     MyGame::Example::AnyUniqueAliasesTypeTable,
3202     MyGame::Example::AnyAmbiguousAliasesTypeTable,
3203     MyGame::Example::RaceTypeTable
3204   };
3205   static const char * const names[] = {
3206     "pos",
3207     "mana",
3208     "hp",
3209     "name",
3210     "friendly",
3211     "inventory",
3212     "color",
3213     "test_type",
3214     "test",
3215     "test4",
3216     "testarrayofstring",
3217     "testarrayoftables",
3218     "enemy",
3219     "testnestedflatbuffer",
3220     "testempty",
3221     "testbool",
3222     "testhashs32_fnv1",
3223     "testhashu32_fnv1",
3224     "testhashs64_fnv1",
3225     "testhashu64_fnv1",
3226     "testhashs32_fnv1a",
3227     "testhashu32_fnv1a",
3228     "testhashs64_fnv1a",
3229     "testhashu64_fnv1a",
3230     "testarrayofbools",
3231     "testf",
3232     "testf2",
3233     "testf3",
3234     "testarrayofstring2",
3235     "testarrayofsortedstruct",
3236     "flex",
3237     "test5",
3238     "vector_of_longs",
3239     "vector_of_doubles",
3240     "parent_namespace_test",
3241     "vector_of_referrables",
3242     "single_weak_reference",
3243     "vector_of_weak_references",
3244     "vector_of_strong_referrables",
3245     "co_owning_reference",
3246     "vector_of_co_owning_references",
3247     "non_owning_reference",
3248     "vector_of_non_owning_references",
3249     "any_unique_type",
3250     "any_unique",
3251     "any_ambiguous_type",
3252     "any_ambiguous",
3253     "vector_of_enums",
3254     "signed_enum"
3255   };
3256   static const flatbuffers::TypeTable tt = {
3257     flatbuffers::ST_TABLE, 49, type_codes, type_refs, nullptr, names
3258   };
3259   return &tt;
3260 }
3261 
3262 inline const flatbuffers::TypeTable *TypeAliasesTypeTable() {
3263   static const flatbuffers::TypeCode type_codes[] = {
3264     { flatbuffers::ET_CHAR, 0, -1 },
3265     { flatbuffers::ET_UCHAR, 0, -1 },
3266     { flatbuffers::ET_SHORT, 0, -1 },
3267     { flatbuffers::ET_USHORT, 0, -1 },
3268     { flatbuffers::ET_INT, 0, -1 },
3269     { flatbuffers::ET_UINT, 0, -1 },
3270     { flatbuffers::ET_LONG, 0, -1 },
3271     { flatbuffers::ET_ULONG, 0, -1 },
3272     { flatbuffers::ET_FLOAT, 0, -1 },
3273     { flatbuffers::ET_DOUBLE, 0, -1 },
3274     { flatbuffers::ET_CHAR, 1, -1 },
3275     { flatbuffers::ET_DOUBLE, 1, -1 }
3276   };
3277   static const char * const names[] = {
3278     "i8",
3279     "u8",
3280     "i16",
3281     "u16",
3282     "i32",
3283     "u32",
3284     "i64",
3285     "u64",
3286     "f32",
3287     "f64",
3288     "v8",
3289     "vf64"
3290   };
3291   static const flatbuffers::TypeTable tt = {
3292     flatbuffers::ST_TABLE, 12, type_codes, nullptr, nullptr, names
3293   };
3294   return &tt;
3295 }
3296 
3297 inline const MyGame::Example::Monster *GetMonster(const void *buf) {
3298   return flatbuffers::GetRoot<MyGame::Example::Monster>(buf);
3299 }
3300 
3301 inline const MyGame::Example::Monster *GetSizePrefixedMonster(const void *buf) {
3302   return flatbuffers::GetSizePrefixedRoot<MyGame::Example::Monster>(buf);
3303 }
3304 
3305 inline Monster *GetMutableMonster(void *buf) {
3306   return flatbuffers::GetMutableRoot<Monster>(buf);
3307 }
3308 
3309 inline const char *MonsterIdentifier() {
3310   return "MONS";
3311 }
3312 
3313 inline bool MonsterBufferHasIdentifier(const void *buf) {
3314   return flatbuffers::BufferHasIdentifier(
3315       buf, MonsterIdentifier());
3316 }
3317 
3318 inline bool VerifyMonsterBuffer(
3319     flatbuffers::Verifier &verifier) {
3320   return verifier.VerifyBuffer<MyGame::Example::Monster>(MonsterIdentifier());
3321 }
3322 
3323 inline bool VerifySizePrefixedMonsterBuffer(
3324     flatbuffers::Verifier &verifier) {
3325   return verifier.VerifySizePrefixedBuffer<MyGame::Example::Monster>(MonsterIdentifier());
3326 }
3327 
3328 inline const char *MonsterExtension() {
3329   return "mon";
3330 }
3331 
3332 inline void FinishMonsterBuffer(
3333     flatbuffers::FlatBufferBuilder &fbb,
3334     flatbuffers::Offset<MyGame::Example::Monster> root) {
3335   fbb.Finish(root, MonsterIdentifier());
3336 }
3337 
3338 inline void FinishSizePrefixedMonsterBuffer(
3339     flatbuffers::FlatBufferBuilder &fbb,
3340     flatbuffers::Offset<MyGame::Example::Monster> root) {
3341   fbb.FinishSizePrefixed(root, MonsterIdentifier());
3342 }
3343 
3344 inline std::unique_ptr<MyGame::Example::MonsterT> UnPackMonster(
3345     const void *buf,
3346     const flatbuffers::resolver_function_t *res = nullptr) {
3347   return std::unique_ptr<MyGame::Example::MonsterT>(GetMonster(buf)->UnPack(res));
3348 }
3349 
3350 inline std::unique_ptr<MyGame::Example::MonsterT> UnPackSizePrefixedMonster(
3351     const void *buf,
3352     const flatbuffers::resolver_function_t *res = nullptr) {
3353   return std::unique_ptr<MyGame::Example::MonsterT>(GetSizePrefixedMonster(buf)->UnPack(res));
3354 }
3355 
3356 }  // namespace Example
3357 }  // namespace MyGame
3358 
3359 #endif  // FLATBUFFERS_GENERATED_MONSTERTEST_MYGAME_EXAMPLE_H_
3360