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