summaryrefslogtreecommitdiff
path: root/tests/monster_test_generated.h
blob: f02a4dbd2906b64eb55568e63daa328eb1976cc1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
// automatically generated by the FlatBuffers compiler, do not modify


#ifndef FLATBUFFERS_GENERATED_MONSTERTEST_MYGAME_EXAMPLE_H_
#define FLATBUFFERS_GENERATED_MONSTERTEST_MYGAME_EXAMPLE_H_

#include "flatbuffers/flatbuffers.h"
#include "flatbuffers/flexbuffers.h"

namespace MyGame {

struct InParentNamespace;
struct InParentNamespaceT;

namespace Example2 {

struct Monster;
struct MonsterT;

}  // namespace Example2

namespace Example {

struct Test;

struct TestSimpleTableWithEnum;
struct TestSimpleTableWithEnumT;

struct Vec3;

struct Ability;

struct Stat;
struct StatT;

struct Monster;
struct MonsterT;

struct TypeAliases;
struct TypeAliasesT;

enum Color {
  Color_Red = 1,
  Color_Green = 2,
  Color_Blue = 8,
  Color_NONE = 0,
  Color_ANY = 11
};

inline Color (&EnumValuesColor())[3] {
  static Color values[] = {
    Color_Red,
    Color_Green,
    Color_Blue
  };
  return values;
}

inline const char **EnumNamesColor() {
  static const char *names[] = {
    "Red",
    "Green",
    "",
    "",
    "",
    "",
    "",
    "Blue",
    nullptr
  };
  return names;
}

inline const char *EnumNameColor(Color e) {
  const size_t index = static_cast<int>(e) - static_cast<int>(Color_Red);
  return EnumNamesColor()[index];
}

enum Any {
  Any_NONE = 0,
  Any_Monster = 1,
  Any_TestSimpleTableWithEnum = 2,
  Any_MyGame_Example2_Monster = 3,
  Any_MIN = Any_NONE,
  Any_MAX = Any_MyGame_Example2_Monster
};

inline Any (&EnumValuesAny())[4] {
  static Any values[] = {
    Any_NONE,
    Any_Monster,
    Any_TestSimpleTableWithEnum,
    Any_MyGame_Example2_Monster
  };
  return values;
}

inline const char **EnumNamesAny() {
  static const char *names[] = {
    "NONE",
    "Monster",
    "TestSimpleTableWithEnum",
    "MyGame_Example2_Monster",
    nullptr
  };
  return names;
}

inline const char *EnumNameAny(Any e) {
  const size_t index = static_cast<int>(e);
  return EnumNamesAny()[index];
}

template<typename T> struct AnyTraits {
  static const Any enum_value = Any_NONE;
};

template<> struct AnyTraits<Monster> {
  static const Any enum_value = Any_Monster;
};

template<> struct AnyTraits<TestSimpleTableWithEnum> {
  static const Any enum_value = Any_TestSimpleTableWithEnum;
};

template<> struct AnyTraits<MyGame::Example2::Monster> {
  static const Any enum_value = Any_MyGame_Example2_Monster;
};

struct AnyUnion {
  Any type;
  void *value;

  AnyUnion() : type(Any_NONE), value(nullptr) {}
  AnyUnion(AnyUnion&& u) FLATBUFFERS_NOEXCEPT :
    type(Any_NONE), value(nullptr)
    { std::swap(type, u.type); std::swap(value, u.value); }
  AnyUnion(const AnyUnion &) FLATBUFFERS_NOEXCEPT;
  AnyUnion &operator=(const AnyUnion &u) FLATBUFFERS_NOEXCEPT
    { AnyUnion t(u); std::swap(type, t.type); std::swap(value, t.value); return *this; }
  AnyUnion &operator=(AnyUnion &&u) FLATBUFFERS_NOEXCEPT
    { std::swap(type, u.type); std::swap(value, u.value); return *this; }
  ~AnyUnion() { Reset(); }

  void Reset();

#ifndef FLATBUFFERS_CPP98_STL
  template <typename T>
  void Set(T&& val) {
    Reset();
    type = AnyTraits<typename T::TableType>::enum_value;
    if (type != Any_NONE) {
      value = new T(std::forward<T>(val));
    }
  }
#endif  // FLATBUFFERS_CPP98_STL

  static void *UnPack(const void *obj, Any type, const flatbuffers::resolver_function_t *resolver);
  flatbuffers::Offset<void> Pack(flatbuffers::FlatBufferBuilder &_fbb, const flatbuffers::rehasher_function_t *_rehasher = nullptr) const;

  MonsterT *AsMonster() {
    return type == Any_Monster ?
      reinterpret_cast<MonsterT *>(value) : nullptr;
  }
  const MonsterT *AsMonster() const {
    return type == Any_Monster ?
      reinterpret_cast<const MonsterT *>(value) : nullptr;
  }
  TestSimpleTableWithEnumT *AsTestSimpleTableWithEnum() {
    return type == Any_TestSimpleTableWithEnum ?
      reinterpret_cast<TestSimpleTableWithEnumT *>(value) : nullptr;
  }
  const TestSimpleTableWithEnumT *AsTestSimpleTableWithEnum() const {
    return type == Any_TestSimpleTableWithEnum ?
      reinterpret_cast<const TestSimpleTableWithEnumT *>(value) : nullptr;
  }
  MyGame::Example2::MonsterT *AsMyGame_Example2_Monster() {
    return type == Any_MyGame_Example2_Monster ?
      reinterpret_cast<MyGame::Example2::MonsterT *>(value) : nullptr;
  }
  const MyGame::Example2::MonsterT *AsMyGame_Example2_Monster() const {
    return type == Any_MyGame_Example2_Monster ?
      reinterpret_cast<const MyGame::Example2::MonsterT *>(value) : nullptr;
  }
};

bool VerifyAny(flatbuffers::Verifier &verifier, const void *obj, Any type);
bool VerifyAnyVector(flatbuffers::Verifier &verifier, const flatbuffers::Vector<flatbuffers::Offset<void>> *values, const flatbuffers::Vector<uint8_t> *types);

MANUALLY_ALIGNED_STRUCT(2) Test FLATBUFFERS_FINAL_CLASS {
 private:
  int16_t a_;
  int8_t b_;
  int8_t padding0__;

 public:
  Test() {
    memset(this, 0, sizeof(Test));
  }
  Test(const Test &_o) {
    memcpy(this, &_o, sizeof(Test));
  }
  Test(int16_t _a, int8_t _b)
      : a_(flatbuffers::EndianScalar(_a)),
        b_(flatbuffers::EndianScalar(_b)),
        padding0__(0) {
    (void)padding0__;
  }
  int16_t a() const {
    return flatbuffers::EndianScalar(a_);
  }
  void mutate_a(int16_t _a) {
    flatbuffers::WriteScalar(&a_, _a);
  }
  int8_t b() const {
    return flatbuffers::EndianScalar(b_);
  }
  void mutate_b(int8_t _b) {
    flatbuffers::WriteScalar(&b_, _b);
  }
};
STRUCT_END(Test, 4);

MANUALLY_ALIGNED_STRUCT(16) Vec3 FLATBUFFERS_FINAL_CLASS {
 private:
  float x_;
  float y_;
  float z_;
  int32_t padding0__;
  double test1_;
  int8_t test2_;
  int8_t padding1__;
  Test test3_;
  int16_t padding2__;

 public:
  Vec3() {
    memset(this, 0, sizeof(Vec3));
  }
  Vec3(const Vec3 &_o) {
    memcpy(this, &_o, sizeof(Vec3));
  }
  Vec3(float _x, float _y, float _z, double _test1, Color _test2, const Test &_test3)
      : x_(flatbuffers::EndianScalar(_x)),
        y_(flatbuffers::EndianScalar(_y)),
        z_(flatbuffers::EndianScalar(_z)),
        padding0__(0),
        test1_(flatbuffers::EndianScalar(_test1)),
        test2_(flatbuffers::EndianScalar(static_cast<int8_t>(_test2))),
        padding1__(0),
        test3_(_test3),
        padding2__(0) {
    (void)padding0__;
    (void)padding1__;
    (void)padding2__;
  }
  float x() const {
    return flatbuffers::EndianScalar(x_);
  }
  void mutate_x(float _x) {
    flatbuffers::WriteScalar(&x_, _x);
  }
  float y() const {
    return flatbuffers::EndianScalar(y_);
  }
  void mutate_y(float _y) {
    flatbuffers::WriteScalar(&y_, _y);
  }
  float z() const {
    return flatbuffers::EndianScalar(z_);
  }
  void mutate_z(float _z) {
    flatbuffers::WriteScalar(&z_, _z);
  }
  double test1() const {
    return flatbuffers::EndianScalar(test1_);
  }
  void mutate_test1(double _test1) {
    flatbuffers::WriteScalar(&test1_, _test1);
  }
  Color test2() const {
    return static_cast<Color>(flatbuffers::EndianScalar(test2_));
  }
  void mutate_test2(Color _test2) {
    flatbuffers::WriteScalar(&test2_, static_cast<int8_t>(_test2));
  }
  const Test &test3() const {
    return test3_;
  }
  Test &mutable_test3() {
    return test3_;
  }
};
STRUCT_END(Vec3, 32);

MANUALLY_ALIGNED_STRUCT(4) Ability FLATBUFFERS_FINAL_CLASS {
 private:
  uint32_t id_;
  uint32_t distance_;

 public:
  Ability() {
    memset(this, 0, sizeof(Ability));
  }
  Ability(const Ability &_o) {
    memcpy(this, &_o, sizeof(Ability));
  }
  Ability(uint32_t _id, uint32_t _distance)
      : id_(flatbuffers::EndianScalar(_id)),
        distance_(flatbuffers::EndianScalar(_distance)) {
  }
  uint32_t id() const {
    return flatbuffers::EndianScalar(id_);
  }
  void mutate_id(uint32_t _id) {
    flatbuffers::WriteScalar(&id_, _id);
  }
  bool KeyCompareLessThan(const Ability *o) const {
    return id() < o->id();
  }
  int KeyCompareWithValue(uint32_t val) const {
    const auto key = id();
    return static_cast<int>(key > val) - static_cast<int>(key < val);
  }
  uint32_t distance() const {
    return flatbuffers::EndianScalar(distance_);
  }
  void mutate_distance(uint32_t _distance) {
    flatbuffers::WriteScalar(&distance_, _distance);
  }
};
STRUCT_END(Ability, 8);

}  // namespace Example

struct InParentNamespaceT : public flatbuffers::NativeTable {
  typedef InParentNamespace TableType;
  InParentNamespaceT() {
  }
};

struct InParentNamespace FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
  typedef InParentNamespaceT NativeTableType;
  bool Verify(flatbuffers::Verifier &verifier) const {
    return VerifyTableStart(verifier) &&
           verifier.EndTable();
  }
  InParentNamespaceT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const;
  void UnPackTo(InParentNamespaceT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const;
  static flatbuffers::Offset<InParentNamespace> Pack(flatbuffers::FlatBufferBuilder &_fbb, const InParentNamespaceT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr);
};

struct InParentNamespaceBuilder {
  flatbuffers::FlatBufferBuilder &fbb_;
  flatbuffers::uoffset_t start_;
  InParentNamespaceBuilder(flatbuffers::FlatBufferBuilder &_fbb)
        : fbb_(_fbb) {
    start_ = fbb_.StartTable();
  }
  InParentNamespaceBuilder &operator=(const InParentNamespaceBuilder &);
  flatbuffers::Offset<InParentNamespace> Finish() {
    const auto end = fbb_.EndTable(start_);
    auto o = flatbuffers::Offset<InParentNamespace>(end);
    return o;
  }
};

inline flatbuffers::Offset<InParentNamespace> CreateInParentNamespace(
    flatbuffers::FlatBufferBuilder &_fbb) {
  InParentNamespaceBuilder builder_(_fbb);
  return builder_.Finish();
}

flatbuffers::Offset<InParentNamespace> CreateInParentNamespace(flatbuffers::FlatBufferBuilder &_fbb, const InParentNamespaceT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr);

namespace Example2 {

struct MonsterT : public flatbuffers::NativeTable {
  typedef Monster TableType;
  MonsterT() {
  }
};

struct Monster FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
  typedef MonsterT NativeTableType;
  bool Verify(flatbuffers::Verifier &verifier) const {
    return VerifyTableStart(verifier) &&
           verifier.EndTable();
  }
  MonsterT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const;
  void UnPackTo(MonsterT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const;
  static flatbuffers::Offset<Monster> Pack(flatbuffers::FlatBufferBuilder &_fbb, const MonsterT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr);
};

struct MonsterBuilder {
  flatbuffers::FlatBufferBuilder &fbb_;
  flatbuffers::uoffset_t start_;
  MonsterBuilder(flatbuffers::FlatBufferBuilder &_fbb)
        : fbb_(_fbb) {
    start_ = fbb_.StartTable();
  }
  MonsterBuilder &operator=(const MonsterBuilder &);
  flatbuffers::Offset<Monster> Finish() {
    const auto end = fbb_.EndTable(start_);
    auto o = flatbuffers::Offset<Monster>(end);
    return o;
  }
};

inline flatbuffers::Offset<Monster> CreateMonster(
    flatbuffers::FlatBufferBuilder &_fbb) {
  MonsterBuilder builder_(_fbb);
  return builder_.Finish();
}

flatbuffers::Offset<Monster> CreateMonster(flatbuffers::FlatBufferBuilder &_fbb, const MonsterT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr);

}  // namespace Example2

namespace Example {

struct TestSimpleTableWithEnumT : public flatbuffers::NativeTable {
  typedef TestSimpleTableWithEnum TableType;
  Color color;
  TestSimpleTableWithEnumT()
      : color(Color_Green) {
  }
};

struct TestSimpleTableWithEnum FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
  typedef TestSimpleTableWithEnumT NativeTableType;
  enum {
    VT_COLOR = 4
  };
  Color color() const {
    return static_cast<Color>(GetField<int8_t>(VT_COLOR, 2));
  }
  bool mutate_color(Color _color) {
    return SetField<int8_t>(VT_COLOR, static_cast<int8_t>(_color), 2);
  }
  bool Verify(flatbuffers::Verifier &verifier) const {
    return VerifyTableStart(verifier) &&
           VerifyField<int8_t>(verifier, VT_COLOR) &&
           verifier.EndTable();
  }
  TestSimpleTableWithEnumT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const;
  void UnPackTo(TestSimpleTableWithEnumT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const;
  static flatbuffers::Offset<TestSimpleTableWithEnum> Pack(flatbuffers::FlatBufferBuilder &_fbb, const TestSimpleTableWithEnumT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr);
};

struct TestSimpleTableWithEnumBuilder {
  flatbuffers::FlatBufferBuilder &fbb_;
  flatbuffers::uoffset_t start_;
  void add_color(Color color) {
    fbb_.AddElement<int8_t>(TestSimpleTableWithEnum::VT_COLOR, static_cast<int8_t>(color), 2);
  }
  TestSimpleTableWithEnumBuilder(flatbuffers::FlatBufferBuilder &_fbb)
        : fbb_(_fbb) {
    start_ = fbb_.StartTable();
  }
  TestSimpleTableWithEnumBuilder &operator=(const TestSimpleTableWithEnumBuilder &);
  flatbuffers::Offset<TestSimpleTableWithEnum> Finish() {
    const auto end = fbb_.EndTable(start_);
    auto o = flatbuffers::Offset<TestSimpleTableWithEnum>(end);
    return o;
  }
};

inline flatbuffers::Offset<TestSimpleTableWithEnum> CreateTestSimpleTableWithEnum(
    flatbuffers::FlatBufferBuilder &_fbb,
    Color color = Color_Green) {
  TestSimpleTableWithEnumBuilder builder_(_fbb);
  builder_.add_color(color);
  return builder_.Finish();
}

flatbuffers::Offset<TestSimpleTableWithEnum> CreateTestSimpleTableWithEnum(flatbuffers::FlatBufferBuilder &_fbb, const TestSimpleTableWithEnumT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr);

struct StatT : public flatbuffers::NativeTable {
  typedef Stat TableType;
  std::string id;
  int64_t val;
  uint16_t count;
  StatT()
      : val(0),
        count(0) {
  }
};

struct Stat FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
  typedef StatT NativeTableType;
  enum {
    VT_ID = 4,
    VT_VAL = 6,
    VT_COUNT = 8
  };
  const flatbuffers::String *id() const {
    return GetPointer<const flatbuffers::String *>(VT_ID);
  }
  flatbuffers::String *mutable_id() {
    return GetPointer<flatbuffers::String *>(VT_ID);
  }
  int64_t val() const {
    return GetField<int64_t>(VT_VAL, 0);
  }
  bool mutate_val(int64_t _val) {
    return SetField<int64_t>(VT_VAL, _val, 0);
  }
  uint16_t count() const {
    return GetField<uint16_t>(VT_COUNT, 0);
  }
  bool mutate_count(uint16_t _count) {
    return SetField<uint16_t>(VT_COUNT, _count, 0);
  }
  bool Verify(flatbuffers::Verifier &verifier) const {
    return VerifyTableStart(verifier) &&
           VerifyOffset(verifier, VT_ID) &&
           verifier.Verify(id()) &&
           VerifyField<int64_t>(verifier, VT_VAL) &&
           VerifyField<uint16_t>(verifier, VT_COUNT) &&
           verifier.EndTable();
  }
  StatT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const;
  void UnPackTo(StatT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const;
  static flatbuffers::Offset<Stat> Pack(flatbuffers::FlatBufferBuilder &_fbb, const StatT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr);
};

struct StatBuilder {
  flatbuffers::FlatBufferBuilder &fbb_;
  flatbuffers::uoffset_t start_;
  void add_id(flatbuffers::Offset<flatbuffers::String> id) {
    fbb_.AddOffset(Stat::VT_ID, id);
  }
  void add_val(int64_t val) {
    fbb_.AddElement<int64_t>(Stat::VT_VAL, val, 0);
  }
  void add_count(uint16_t count) {
    fbb_.AddElement<uint16_t>(Stat::VT_COUNT, count, 0);
  }
  StatBuilder(flatbuffers::FlatBufferBuilder &_fbb)
        : fbb_(_fbb) {
    start_ = fbb_.StartTable();
  }
  StatBuilder &operator=(const StatBuilder &);
  flatbuffers::Offset<Stat> Finish() {
    const auto end = fbb_.EndTable(start_);
    auto o = flatbuffers::Offset<Stat>(end);
    return o;
  }
};

inline flatbuffers::Offset<Stat> CreateStat(
    flatbuffers::FlatBufferBuilder &_fbb,
    flatbuffers::Offset<flatbuffers::String> id = 0,
    int64_t val = 0,
    uint16_t count = 0) {
  StatBuilder builder_(_fbb);
  builder_.add_val(val);
  builder_.add_id(id);
  builder_.add_count(count);
  return builder_.Finish();
}

inline flatbuffers::Offset<Stat> CreateStatDirect(
    flatbuffers::FlatBufferBuilder &_fbb,
    const char *id = nullptr,
    int64_t val = 0,
    uint16_t count = 0) {
  return MyGame::Example::CreateStat(
      _fbb,
      id ? _fbb.CreateString(id) : 0,
      val,
      count);
}

flatbuffers::Offset<Stat> CreateStat(flatbuffers::FlatBufferBuilder &_fbb, const StatT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr);

struct MonsterT : public flatbuffers::NativeTable {
  typedef Monster TableType;
  flatbuffers::unique_ptr<Vec3> pos;
  int16_t mana;
  int16_t hp;
  std::string name;
  std::vector<uint8_t> inventory;
  Color color;
  AnyUnion test;
  std::vector<Test> test4;
  std::vector<std::string> testarrayofstring;
  std::vector<flatbuffers::unique_ptr<MonsterT>> testarrayoftables;
  flatbuffers::unique_ptr<MonsterT> enemy;
  std::vector<uint8_t> testnestedflatbuffer;
  flatbuffers::unique_ptr<StatT> testempty;
  bool testbool;
  int32_t testhashs32_fnv1;
  uint32_t testhashu32_fnv1;
  int64_t testhashs64_fnv1;
  uint64_t testhashu64_fnv1;
  int32_t testhashs32_fnv1a;
  Stat *testhashu32_fnv1a;
  int64_t testhashs64_fnv1a;
  uint64_t testhashu64_fnv1a;
  std::vector<bool> testarrayofbools;
  float testf;
  float testf2;
  float testf3;
  std::vector<std::string> testarrayofstring2;
  std::vector<Ability> testarrayofsortedstruct;
  std::vector<uint8_t> flex;
  std::vector<Test> test5;
  std::vector<int64_t> vector_of_longs;
  std::vector<double> vector_of_doubles;
  flatbuffers::unique_ptr<MyGame::InParentNamespaceT> parent_namespace_test;
  MonsterT()
      : mana(150),
        hp(100),
        color(Color_Blue),
        testbool(false),
        testhashs32_fnv1(0),
        testhashu32_fnv1(0),
        testhashs64_fnv1(0),
        testhashu64_fnv1(0),
        testhashs32_fnv1a(0),
        testhashu32_fnv1a(0),
        testhashs64_fnv1a(0),
        testhashu64_fnv1a(0),
        testf(3.14159f),
        testf2(3.0f),
        testf3(0.0f) {
  }
};

/// an example documentation comment: monster object
struct Monster FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
  typedef MonsterT NativeTableType;
  enum {
    VT_POS = 4,
    VT_MANA = 6,
    VT_HP = 8,
    VT_NAME = 10,
    VT_INVENTORY = 14,
    VT_COLOR = 16,
    VT_TEST_TYPE = 18,
    VT_TEST = 20,
    VT_TEST4 = 22,
    VT_TESTARRAYOFSTRING = 24,
    VT_TESTARRAYOFTABLES = 26,
    VT_ENEMY = 28,
    VT_TESTNESTEDFLATBUFFER = 30,
    VT_TESTEMPTY = 32,
    VT_TESTBOOL = 34,
    VT_TESTHASHS32_FNV1 = 36,
    VT_TESTHASHU32_FNV1 = 38,
    VT_TESTHASHS64_FNV1 = 40,
    VT_TESTHASHU64_FNV1 = 42,
    VT_TESTHASHS32_FNV1A = 44,
    VT_TESTHASHU32_FNV1A = 46,
    VT_TESTHASHS64_FNV1A = 48,
    VT_TESTHASHU64_FNV1A = 50,
    VT_TESTARRAYOFBOOLS = 52,
    VT_TESTF = 54,
    VT_TESTF2 = 56,
    VT_TESTF3 = 58,
    VT_TESTARRAYOFSTRING2 = 60,
    VT_TESTARRAYOFSORTEDSTRUCT = 62,
    VT_FLEX = 64,
    VT_TEST5 = 66,
    VT_VECTOR_OF_LONGS = 68,
    VT_VECTOR_OF_DOUBLES = 70,
    VT_PARENT_NAMESPACE_TEST = 72
  };
  const Vec3 *pos() const {
    return GetStruct<const Vec3 *>(VT_POS);
  }
  Vec3 *mutable_pos() {
    return GetStruct<Vec3 *>(VT_POS);
  }
  int16_t mana() const {
    return GetField<int16_t>(VT_MANA, 150);
  }
  bool mutate_mana(int16_t _mana) {
    return SetField<int16_t>(VT_MANA, _mana, 150);
  }
  int16_t hp() const {
    return GetField<int16_t>(VT_HP, 100);
  }
  bool mutate_hp(int16_t _hp) {
    return SetField<int16_t>(VT_HP, _hp, 100);
  }
  const flatbuffers::String *name() const {
    return GetPointer<const flatbuffers::String *>(VT_NAME);
  }
  flatbuffers::String *mutable_name() {
    return GetPointer<flatbuffers::String *>(VT_NAME);
  }
  bool KeyCompareLessThan(const Monster *o) const {
    return *name() < *o->name();
  }
  int KeyCompareWithValue(const char *val) const {
    return strcmp(name()->c_str(), val);
  }
  const flatbuffers::Vector<uint8_t> *inventory() const {
    return GetPointer<const flatbuffers::Vector<uint8_t> *>(VT_INVENTORY);
  }
  flatbuffers::Vector<uint8_t> *mutable_inventory() {
    return GetPointer<flatbuffers::Vector<uint8_t> *>(VT_INVENTORY);
  }
  Color color() const {
    return static_cast<Color>(GetField<int8_t>(VT_COLOR, 8));
  }
  bool mutate_color(Color _color) {
    return SetField<int8_t>(VT_COLOR, static_cast<int8_t>(_color), 8);
  }
  Any test_type() const {
    return static_cast<Any>(GetField<uint8_t>(VT_TEST_TYPE, 0));
  }
  bool mutate_test_type(Any _test_type) {
    return SetField<uint8_t>(VT_TEST_TYPE, static_cast<uint8_t>(_test_type), 0);
  }
  const void *test() const {
    return GetPointer<const void *>(VT_TEST);
  }
  template<typename T> const T *test_as() const;
  const Monster *test_as_Monster() const {
    return test_type() == Any_Monster ? static_cast<const Monster *>(test()) : nullptr;
  }
  const TestSimpleTableWithEnum *test_as_TestSimpleTableWithEnum() const {
    return test_type() == Any_TestSimpleTableWithEnum ? static_cast<const TestSimpleTableWithEnum *>(test()) : nullptr;
  }
  const MyGame::Example2::Monster *test_as_MyGame_Example2_Monster() const {
    return test_type() == Any_MyGame_Example2_Monster ? static_cast<const MyGame::Example2::Monster *>(test()) : nullptr;
  }
  void *mutable_test() {
    return GetPointer<void *>(VT_TEST);
  }
  const flatbuffers::Vector<const Test *> *test4() const {
    return GetPointer<const flatbuffers::Vector<const Test *> *>(VT_TEST4);
  }
  flatbuffers::Vector<const Test *> *mutable_test4() {
    return GetPointer<flatbuffers::Vector<const Test *> *>(VT_TEST4);
  }
  const flatbuffers::Vector<flatbuffers::Offset<flatbuffers::String>> *testarrayofstring() const {
    return GetPointer<const flatbuffers::Vector<flatbuffers::Offset<flatbuffers::String>> *>(VT_TESTARRAYOFSTRING);
  }
  flatbuffers::Vector<flatbuffers::Offset<flatbuffers::String>> *mutable_testarrayofstring() {
    return GetPointer<flatbuffers::Vector<flatbuffers::Offset<flatbuffers::String>> *>(VT_TESTARRAYOFSTRING);
  }
  /// an example documentation comment: this will end up in the generated code
  /// multiline too
  const flatbuffers::Vector<flatbuffers::Offset<Monster>> *testarrayoftables() const {
    return GetPointer<const flatbuffers::Vector<flatbuffers::Offset<Monster>> *>(VT_TESTARRAYOFTABLES);
  }
  flatbuffers::Vector<flatbuffers::Offset<Monster>> *mutable_testarrayoftables() {
    return GetPointer<flatbuffers::Vector<flatbuffers::Offset<Monster>> *>(VT_TESTARRAYOFTABLES);
  }
  const Monster *enemy() const {
    return GetPointer<const Monster *>(VT_ENEMY);
  }
  Monster *mutable_enemy() {
    return GetPointer<Monster *>(VT_ENEMY);
  }
  const flatbuffers::Vector<uint8_t> *testnestedflatbuffer() const {
    return GetPointer<const flatbuffers::Vector<uint8_t> *>(VT_TESTNESTEDFLATBUFFER);
  }
  flatbuffers::Vector<uint8_t> *mutable_testnestedflatbuffer() {
    return GetPointer<flatbuffers::Vector<uint8_t> *>(VT_TESTNESTEDFLATBUFFER);
  }
  const MyGame::Example::Monster *testnestedflatbuffer_nested_root() const {
    auto data = testnestedflatbuffer()->Data();
    return flatbuffers::GetRoot<MyGame::Example::Monster>(data);
  }
  const Stat *testempty() const {
    return GetPointer<const Stat *>(VT_TESTEMPTY);
  }
  Stat *mutable_testempty() {
    return GetPointer<Stat *>(VT_TESTEMPTY);
  }
  bool testbool() const {
    return GetField<uint8_t>(VT_TESTBOOL, 0) != 0;
  }
  bool mutate_testbool(bool _testbool) {
    return SetField<uint8_t>(VT_TESTBOOL, static_cast<uint8_t>(_testbool), 0);
  }
  int32_t testhashs32_fnv1() const {
    return GetField<int32_t>(VT_TESTHASHS32_FNV1, 0);
  }
  bool mutate_testhashs32_fnv1(int32_t _testhashs32_fnv1) {
    return SetField<int32_t>(VT_TESTHASHS32_FNV1, _testhashs32_fnv1, 0);
  }
  uint32_t testhashu32_fnv1() const {
    return GetField<uint32_t>(VT_TESTHASHU32_FNV1, 0);
  }
  bool mutate_testhashu32_fnv1(uint32_t _testhashu32_fnv1) {
    return SetField<uint32_t>(VT_TESTHASHU32_FNV1, _testhashu32_fnv1, 0);
  }
  int64_t testhashs64_fnv1() const {
    return GetField<int64_t>(VT_TESTHASHS64_FNV1, 0);
  }
  bool mutate_testhashs64_fnv1(int64_t _testhashs64_fnv1) {
    return SetField<int64_t>(VT_TESTHASHS64_FNV1, _testhashs64_fnv1, 0);
  }
  uint64_t testhashu64_fnv1() const {
    return GetField<uint64_t>(VT_TESTHASHU64_FNV1, 0);
  }
  bool mutate_testhashu64_fnv1(uint64_t _testhashu64_fnv1) {
    return SetField<uint64_t>(VT_TESTHASHU64_FNV1, _testhashu64_fnv1, 0);
  }
  int32_t testhashs32_fnv1a() const {
    return GetField<int32_t>(VT_TESTHASHS32_FNV1A, 0);
  }
  bool mutate_testhashs32_fnv1a(int32_t _testhashs32_fnv1a) {
    return SetField<int32_t>(VT_TESTHASHS32_FNV1A, _testhashs32_fnv1a, 0);
  }
  uint32_t testhashu32_fnv1a() const {
    return GetField<uint32_t>(VT_TESTHASHU32_FNV1A, 0);
  }
  bool mutate_testhashu32_fnv1a(uint32_t _testhashu32_fnv1a) {
    return SetField<uint32_t>(VT_TESTHASHU32_FNV1A, _testhashu32_fnv1a, 0);
  }
  int64_t testhashs64_fnv1a() const {
    return GetField<int64_t>(VT_TESTHASHS64_FNV1A, 0);
  }
  bool mutate_testhashs64_fnv1a(int64_t _testhashs64_fnv1a) {
    return SetField<int64_t>(VT_TESTHASHS64_FNV1A, _testhashs64_fnv1a, 0);
  }
  uint64_t testhashu64_fnv1a() const {
    return GetField<uint64_t>(VT_TESTHASHU64_FNV1A, 0);
  }
  bool mutate_testhashu64_fnv1a(uint64_t _testhashu64_fnv1a) {
    return SetField<uint64_t>(VT_TESTHASHU64_FNV1A, _testhashu64_fnv1a, 0);
  }
  const flatbuffers::Vector<uint8_t> *testarrayofbools() const {
    return GetPointer<const flatbuffers::Vector<uint8_t> *>(VT_TESTARRAYOFBOOLS);
  }
  flatbuffers::Vector<uint8_t> *mutable_testarrayofbools() {
    return GetPointer<flatbuffers::Vector<uint8_t> *>(VT_TESTARRAYOFBOOLS);
  }
  float testf() const {
    return GetField<float>(VT_TESTF, 3.14159f);
  }
  bool mutate_testf(float _testf) {
    return SetField<float>(VT_TESTF, _testf, 3.14159f);
  }
  float testf2() const {
    return GetField<float>(VT_TESTF2, 3.0f);
  }
  bool mutate_testf2(float _testf2) {
    return SetField<float>(VT_TESTF2, _testf2, 3.0f);
  }
  float testf3() const {
    return GetField<float>(VT_TESTF3, 0.0f);
  }
  bool mutate_testf3(float _testf3) {
    return SetField<float>(VT_TESTF3, _testf3, 0.0f);
  }
  const flatbuffers::Vector<flatbuffers::Offset<flatbuffers::String>> *testarrayofstring2() const {
    return GetPointer<const flatbuffers::Vector<flatbuffers::Offset<flatbuffers::String>> *>(VT_TESTARRAYOFSTRING2);
  }
  flatbuffers::Vector<flatbuffers::Offset<flatbuffers::String>> *mutable_testarrayofstring2() {
    return GetPointer<flatbuffers::Vector<flatbuffers::Offset<flatbuffers::String>> *>(VT_TESTARRAYOFSTRING2);
  }
  const flatbuffers::Vector<const Ability *> *testarrayofsortedstruct() const {
    return GetPointer<const flatbuffers::Vector<const Ability *> *>(VT_TESTARRAYOFSORTEDSTRUCT);
  }
  flatbuffers::Vector<const Ability *> *mutable_testarrayofsortedstruct() {
    return GetPointer<flatbuffers::Vector<const Ability *> *>(VT_TESTARRAYOFSORTEDSTRUCT);
  }
  const flatbuffers::Vector<uint8_t> *flex() const {
    return GetPointer<const flatbuffers::Vector<uint8_t> *>(VT_FLEX);
  }
  flatbuffers::Vector<uint8_t> *mutable_flex() {
    return GetPointer<flatbuffers::Vector<uint8_t> *>(VT_FLEX);
  }
  flexbuffers::Reference flex_flexbuffer_root() const {
    auto v = flex();
    return flexbuffers::GetRoot(v->Data(), v->size());
  }
  const flatbuffers::Vector<const Test *> *test5() const {
    return GetPointer<const flatbuffers::Vector<const Test *> *>(VT_TEST5);
  }
  flatbuffers::Vector<const Test *> *mutable_test5() {
    return GetPointer<flatbuffers::Vector<const Test *> *>(VT_TEST5);
  }
  const flatbuffers::Vector<int64_t> *vector_of_longs() const {
    return GetPointer<const flatbuffers::Vector<int64_t> *>(VT_VECTOR_OF_LONGS);
  }
  flatbuffers::Vector<int64_t> *mutable_vector_of_longs() {
    return GetPointer<flatbuffers::Vector<int64_t> *>(VT_VECTOR_OF_LONGS);
  }
  const flatbuffers::Vector<double> *vector_of_doubles() const {
    return GetPointer<const flatbuffers::Vector<double> *>(VT_VECTOR_OF_DOUBLES);
  }
  flatbuffers::Vector<double> *mutable_vector_of_doubles() {
    return GetPointer<flatbuffers::Vector<double> *>(VT_VECTOR_OF_DOUBLES);
  }
  const MyGame::InParentNamespace *parent_namespace_test() const {
    return GetPointer<const MyGame::InParentNamespace *>(VT_PARENT_NAMESPACE_TEST);
  }
  MyGame::InParentNamespace *mutable_parent_namespace_test() {
    return GetPointer<MyGame::InParentNamespace *>(VT_PARENT_NAMESPACE_TEST);
  }
  bool Verify(flatbuffers::Verifier &verifier) const {
    return VerifyTableStart(verifier) &&
           VerifyField<Vec3>(verifier, VT_POS) &&
           VerifyField<int16_t>(verifier, VT_MANA) &&
           VerifyField<int16_t>(verifier, VT_HP) &&
           VerifyOffsetRequired(verifier, VT_NAME) &&
           verifier.Verify(name()) &&
           VerifyOffset(verifier, VT_INVENTORY) &&
           verifier.Verify(inventory()) &&
           VerifyField<int8_t>(verifier, VT_COLOR) &&
           VerifyField<uint8_t>(verifier, VT_TEST_TYPE) &&
           VerifyOffset(verifier, VT_TEST) &&
           VerifyAny(verifier, test(), test_type()) &&
           VerifyOffset(verifier, VT_TEST4) &&
           verifier.Verify(test4()) &&
           VerifyOffset(verifier, VT_TESTARRAYOFSTRING) &&
           verifier.Verify(testarrayofstring()) &&
           verifier.VerifyVectorOfStrings(testarrayofstring()) &&
           VerifyOffset(verifier, VT_TESTARRAYOFTABLES) &&
           verifier.Verify(testarrayoftables()) &&
           verifier.VerifyVectorOfTables(testarrayoftables()) &&
           VerifyOffset(verifier, VT_ENEMY) &&
           verifier.VerifyTable(enemy()) &&
           VerifyOffset(verifier, VT_TESTNESTEDFLATBUFFER) &&
           verifier.Verify(testnestedflatbuffer()) &&
           VerifyOffset(verifier, VT_TESTEMPTY) &&
           verifier.VerifyTable(testempty()) &&
           VerifyField<uint8_t>(verifier, VT_TESTBOOL) &&
           VerifyField<int32_t>(verifier, VT_TESTHASHS32_FNV1) &&
           VerifyField<uint32_t>(verifier, VT_TESTHASHU32_FNV1) &&
           VerifyField<int64_t>(verifier, VT_TESTHASHS64_FNV1) &&
           VerifyField<uint64_t>(verifier, VT_TESTHASHU64_FNV1) &&
           VerifyField<int32_t>(verifier, VT_TESTHASHS32_FNV1A) &&
           VerifyField<uint32_t>(verifier, VT_TESTHASHU32_FNV1A) &&
           VerifyField<int64_t>(verifier, VT_TESTHASHS64_FNV1A) &&
           VerifyField<uint64_t>(verifier, VT_TESTHASHU64_FNV1A) &&
           VerifyOffset(verifier, VT_TESTARRAYOFBOOLS) &&
           verifier.Verify(testarrayofbools()) &&
           VerifyField<float>(verifier, VT_TESTF) &&
           VerifyField<float>(verifier, VT_TESTF2) &&
           VerifyField<float>(verifier, VT_TESTF3) &&
           VerifyOffset(verifier, VT_TESTARRAYOFSTRING2) &&
           verifier.Verify(testarrayofstring2()) &&
           verifier.VerifyVectorOfStrings(testarrayofstring2()) &&
           VerifyOffset(verifier, VT_TESTARRAYOFSORTEDSTRUCT) &&
           verifier.Verify(testarrayofsortedstruct()) &&
           VerifyOffset(verifier, VT_FLEX) &&
           verifier.Verify(flex()) &&
           VerifyOffset(verifier, VT_TEST5) &&
           verifier.Verify(test5()) &&
           VerifyOffset(verifier, VT_VECTOR_OF_LONGS) &&
           verifier.Verify(vector_of_longs()) &&
           VerifyOffset(verifier, VT_VECTOR_OF_DOUBLES) &&
           verifier.Verify(vector_of_doubles()) &&
           VerifyOffset(verifier, VT_PARENT_NAMESPACE_TEST) &&
           verifier.VerifyTable(parent_namespace_test()) &&
           verifier.EndTable();
  }
  MonsterT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const;
  void UnPackTo(MonsterT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const;
  static flatbuffers::Offset<Monster> Pack(flatbuffers::FlatBufferBuilder &_fbb, const MonsterT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr);
};

template<> inline const Monster *Monster::test_as<Monster>() const {
  return test_as_Monster();
}

template<> inline const TestSimpleTableWithEnum *Monster::test_as<TestSimpleTableWithEnum>() const {
  return test_as_TestSimpleTableWithEnum();
}

template<> inline const MyGame::Example2::Monster *Monster::test_as<MyGame::Example2::Monster>() const {
  return test_as_MyGame_Example2_Monster();
}

struct MonsterBuilder {
  flatbuffers::FlatBufferBuilder &fbb_;
  flatbuffers::uoffset_t start_;
  void add_pos(const Vec3 *pos) {
    fbb_.AddStruct(Monster::VT_POS, pos);
  }
  void add_mana(int16_t mana) {
    fbb_.AddElement<int16_t>(Monster::VT_MANA, mana, 150);
  }
  void add_hp(int16_t hp) {
    fbb_.AddElement<int16_t>(Monster::VT_HP, hp, 100);
  }
  void add_name(flatbuffers::Offset<flatbuffers::String> name) {
    fbb_.AddOffset(Monster::VT_NAME, name);
  }
  void add_inventory(flatbuffers::Offset<flatbuffers::Vector<uint8_t>> inventory) {
    fbb_.AddOffset(Monster::VT_INVENTORY, inventory);
  }
  void add_color(Color color) {
    fbb_.AddElement<int8_t>(Monster::VT_COLOR, static_cast<int8_t>(color), 8);
  }
  void add_test_type(Any test_type) {
    fbb_.AddElement<uint8_t>(Monster::VT_TEST_TYPE, static_cast<uint8_t>(test_type), 0);
  }
  void add_test(flatbuffers::Offset<void> test) {
    fbb_.AddOffset(Monster::VT_TEST, test);
  }
  void add_test4(flatbuffers::Offset<flatbuffers::Vector<const Test *>> test4) {
    fbb_.AddOffset(Monster::VT_TEST4, test4);
  }
  void add_testarrayofstring(flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<flatbuffers::String>>> testarrayofstring) {
    fbb_.AddOffset(Monster::VT_TESTARRAYOFSTRING, testarrayofstring);
  }
  void add_testarrayoftables(flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<Monster>>> testarrayoftables) {
    fbb_.AddOffset(Monster::VT_TESTARRAYOFTABLES, testarrayoftables);
  }
  void add_enemy(flatbuffers::Offset<Monster> enemy) {
    fbb_.AddOffset(Monster::VT_ENEMY, enemy);
  }
  void add_testnestedflatbuffer(flatbuffers::Offset<flatbuffers::Vector<uint8_t>> testnestedflatbuffer) {
    fbb_.AddOffset(Monster::VT_TESTNESTEDFLATBUFFER, testnestedflatbuffer);
  }
  void add_testempty(flatbuffers::Offset<Stat> testempty) {
    fbb_.AddOffset(Monster::VT_TESTEMPTY, testempty);
  }
  void add_testbool(bool testbool) {
    fbb_.AddElement<uint8_t>(Monster::VT_TESTBOOL, static_cast<uint8_t>(testbool), 0);
  }
  void add_testhashs32_fnv1(int32_t testhashs32_fnv1) {
    fbb_.AddElement<int32_t>(Monster::VT_TESTHASHS32_FNV1, testhashs32_fnv1, 0);
  }
  void add_testhashu32_fnv1(uint32_t testhashu32_fnv1) {
    fbb_.AddElement<uint32_t>(Monster::VT_TESTHASHU32_FNV1, testhashu32_fnv1, 0);
  }
  void add_testhashs64_fnv1(int64_t testhashs64_fnv1) {
    fbb_.AddElement<int64_t>(Monster::VT_TESTHASHS64_FNV1, testhashs64_fnv1, 0);
  }
  void add_testhashu64_fnv1(uint64_t testhashu64_fnv1) {
    fbb_.AddElement<uint64_t>(Monster::VT_TESTHASHU64_FNV1, testhashu64_fnv1, 0);
  }
  void add_testhashs32_fnv1a(int32_t testhashs32_fnv1a) {
    fbb_.AddElement<int32_t>(Monster::VT_TESTHASHS32_FNV1A, testhashs32_fnv1a, 0);
  }
  void add_testhashu32_fnv1a(uint32_t testhashu32_fnv1a) {
    fbb_.AddElement<uint32_t>(Monster::VT_TESTHASHU32_FNV1A, testhashu32_fnv1a, 0);
  }
  void add_testhashs64_fnv1a(int64_t testhashs64_fnv1a) {
    fbb_.AddElement<int64_t>(Monster::VT_TESTHASHS64_FNV1A, testhashs64_fnv1a, 0);
  }
  void add_testhashu64_fnv1a(uint64_t testhashu64_fnv1a) {
    fbb_.AddElement<uint64_t>(Monster::VT_TESTHASHU64_FNV1A, testhashu64_fnv1a, 0);
  }
  void add_testarrayofbools(flatbuffers::Offset<flatbuffers::Vector<uint8_t>> testarrayofbools) {
    fbb_.AddOffset(Monster::VT_TESTARRAYOFBOOLS, testarrayofbools);
  }
  void add_testf(float testf) {
    fbb_.AddElement<float>(Monster::VT_TESTF, testf, 3.14159f);
  }
  void add_testf2(float testf2) {
    fbb_.AddElement<float>(Monster::VT_TESTF2, testf2, 3.0f);
  }
  void add_testf3(float testf3) {
    fbb_.AddElement<float>(Monster::VT_TESTF3, testf3, 0.0f);
  }
  void add_testarrayofstring2(flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<flatbuffers::String>>> testarrayofstring2) {
    fbb_.AddOffset(Monster::VT_TESTARRAYOFSTRING2, testarrayofstring2);
  }
  void add_testarrayofsortedstruct(flatbuffers::Offset<flatbuffers::Vector<const Ability *>> testarrayofsortedstruct) {
    fbb_.AddOffset(Monster::VT_TESTARRAYOFSORTEDSTRUCT, testarrayofsortedstruct);
  }
  void add_flex(flatbuffers::Offset<flatbuffers::Vector<uint8_t>> flex) {
    fbb_.AddOffset(Monster::VT_FLEX, flex);
  }
  void add_test5(flatbuffers::Offset<flatbuffers::Vector<const Test *>> test5) {
    fbb_.AddOffset(Monster::VT_TEST5, test5);
  }
  void add_vector_of_longs(flatbuffers::Offset<flatbuffers::Vector<int64_t>> vector_of_longs) {
    fbb_.AddOffset(Monster::VT_VECTOR_OF_LONGS, vector_of_longs);
  }
  void add_vector_of_doubles(flatbuffers::Offset<flatbuffers::Vector<double>> vector_of_doubles) {
    fbb_.AddOffset(Monster::VT_VECTOR_OF_DOUBLES, vector_of_doubles);
  }
  void add_parent_namespace_test(flatbuffers::Offset<MyGame::InParentNamespace> parent_namespace_test) {
    fbb_.AddOffset(Monster::VT_PARENT_NAMESPACE_TEST, parent_namespace_test);
  }
  MonsterBuilder(flatbuffers::FlatBufferBuilder &_fbb)
        : fbb_(_fbb) {
    start_ = fbb_.StartTable();
  }
  MonsterBuilder &operator=(const MonsterBuilder &);
  flatbuffers::Offset<Monster> Finish() {
    const auto end = fbb_.EndTable(start_);
    auto o = flatbuffers::Offset<Monster>(end);
    fbb_.Required(o, Monster::VT_NAME);
    return o;
  }
};

inline flatbuffers::Offset<Monster> CreateMonster(
    flatbuffers::FlatBufferBuilder &_fbb,
    const Vec3 *pos = 0,
    int16_t mana = 150,
    int16_t hp = 100,
    flatbuffers::Offset<flatbuffers::String> name = 0,
    flatbuffers::Offset<flatbuffers::Vector<uint8_t>> inventory = 0,
    Color color = Color_Blue,
    Any test_type = Any_NONE,
    flatbuffers::Offset<void> test = 0,
    flatbuffers::Offset<flatbuffers::Vector<const Test *>> test4 = 0,
    flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<flatbuffers::String>>> testarrayofstring = 0,
    flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<Monster>>> testarrayoftables = 0,
    flatbuffers::Offset<Monster> enemy = 0,
    flatbuffers::Offset<flatbuffers::Vector<uint8_t>> testnestedflatbuffer = 0,
    flatbuffers::Offset<Stat> testempty = 0,
    bool testbool = false,
    int32_t testhashs32_fnv1 = 0,
    uint32_t testhashu32_fnv1 = 0,
    int64_t testhashs64_fnv1 = 0,
    uint64_t testhashu64_fnv1 = 0,
    int32_t testhashs32_fnv1a = 0,
    uint32_t testhashu32_fnv1a = 0,
    int64_t testhashs64_fnv1a = 0,
    uint64_t testhashu64_fnv1a = 0,
    flatbuffers::Offset<flatbuffers::Vector<uint8_t>> testarrayofbools = 0,
    float testf = 3.14159f,
    float testf2 = 3.0f,
    float testf3 = 0.0f,
    flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<flatbuffers::String>>> testarrayofstring2 = 0,
    flatbuffers::Offset<flatbuffers::Vector<const Ability *>> testarrayofsortedstruct = 0,
    flatbuffers::Offset<flatbuffers::Vector<uint8_t>> flex = 0,
    flatbuffers::Offset<flatbuffers::Vector<const Test *>> test5 = 0,
    flatbuffers::Offset<flatbuffers::Vector<int64_t>> vector_of_longs = 0,
    flatbuffers::Offset<flatbuffers::Vector<double>> vector_of_doubles = 0,
    flatbuffers::Offset<MyGame::InParentNamespace> parent_namespace_test = 0) {
  MonsterBuilder builder_(_fbb);
  builder_.add_testhashu64_fnv1a(testhashu64_fnv1a);
  builder_.add_testhashs64_fnv1a(testhashs64_fnv1a);
  builder_.add_testhashu64_fnv1(testhashu64_fnv1);
  builder_.add_testhashs64_fnv1(testhashs64_fnv1);
  builder_.add_parent_namespace_test(parent_namespace_test);
  builder_.add_vector_of_doubles(vector_of_doubles);
  builder_.add_vector_of_longs(vector_of_longs);
  builder_.add_test5(test5);
  builder_.add_flex(flex);
  builder_.add_testarrayofsortedstruct(testarrayofsortedstruct);
  builder_.add_testarrayofstring2(testarrayofstring2);
  builder_.add_testf3(testf3);
  builder_.add_testf2(testf2);
  builder_.add_testf(testf);
  builder_.add_testarrayofbools(testarrayofbools);
  builder_.add_testhashu32_fnv1a(testhashu32_fnv1a);
  builder_.add_testhashs32_fnv1a(testhashs32_fnv1a);
  builder_.add_testhashu32_fnv1(testhashu32_fnv1);
  builder_.add_testhashs32_fnv1(testhashs32_fnv1);
  builder_.add_testempty(testempty);
  builder_.add_testnestedflatbuffer(testnestedflatbuffer);
  builder_.add_enemy(enemy);
  builder_.add_testarrayoftables(testarrayoftables);
  builder_.add_testarrayofstring(testarrayofstring);
  builder_.add_test4(test4);
  builder_.add_test(test);
  builder_.add_inventory(inventory);
  builder_.add_name(name);
  builder_.add_pos(pos);
  builder_.add_hp(hp);
  builder_.add_mana(mana);
  builder_.add_testbool(testbool);
  builder_.add_test_type(test_type);
  builder_.add_color(color);
  return builder_.Finish();
}

inline flatbuffers::Offset<Monster> CreateMonsterDirect(
    flatbuffers::FlatBufferBuilder &_fbb,
    const Vec3 *pos = 0,
    int16_t mana = 150,
    int16_t hp = 100,
    const char *name = nullptr,
    const std::vector<uint8_t> *inventory = nullptr,
    Color color = Color_Blue,
    Any test_type = Any_NONE,
    flatbuffers::Offset<void> test = 0,
    const std::vector<const Test *> *test4 = nullptr,
    const std::vector<flatbuffers::Offset<flatbuffers::String>> *testarrayofstring = nullptr,
    const std::vector<flatbuffers::Offset<Monster>> *testarrayoftables = nullptr,
    flatbuffers::Offset<Monster> enemy = 0,
    const std::vector<uint8_t> *testnestedflatbuffer = nullptr,
    flatbuffers::Offset<Stat> testempty = 0,
    bool testbool = false,
    int32_t testhashs32_fnv1 = 0,
    uint32_t testhashu32_fnv1 = 0,
    int64_t testhashs64_fnv1 = 0,
    uint64_t testhashu64_fnv1 = 0,
    int32_t testhashs32_fnv1a = 0,
    uint32_t testhashu32_fnv1a = 0,
    int64_t testhashs64_fnv1a = 0,
    uint64_t testhashu64_fnv1a = 0,
    const std::vector<uint8_t> *testarrayofbools = nullptr,
    float testf = 3.14159f,
    float testf2 = 3.0f,
    float testf3 = 0.0f,
    const std::vector<flatbuffers::Offset<flatbuffers::String>> *testarrayofstring2 = nullptr,
    const std::vector<const Ability *> *testarrayofsortedstruct = nullptr,
    const std::vector<uint8_t> *flex = nullptr,
    const std::vector<const Test *> *test5 = nullptr,
    const std::vector<int64_t> *vector_of_longs = nullptr,
    const std::vector<double> *vector_of_doubles = nullptr,
    flatbuffers::Offset<MyGame::InParentNamespace> parent_namespace_test = 0) {
  return MyGame::Example::CreateMonster(
      _fbb,
      pos,
      mana,
      hp,
      name ? _fbb.CreateString(name) : 0,
      inventory ? _fbb.CreateVector<uint8_t>(*inventory) : 0,
      color,
      test_type,
      test,
      test4 ? _fbb.CreateVector<const Test *>(*test4) : 0,
      testarrayofstring ? _fbb.CreateVector<flatbuffers::Offset<flatbuffers::String>>(*testarrayofstring) : 0,
      testarrayoftables ? _fbb.CreateVector<flatbuffers::Offset<Monster>>(*testarrayoftables) : 0,
      enemy,
      testnestedflatbuffer ? _fbb.CreateVector<uint8_t>(*testnestedflatbuffer) : 0,
      testempty,
      testbool,
      testhashs32_fnv1,
      testhashu32_fnv1,
      testhashs64_fnv1,
      testhashu64_fnv1,
      testhashs32_fnv1a,
      testhashu32_fnv1a,
      testhashs64_fnv1a,
      testhashu64_fnv1a,
      testarrayofbools ? _fbb.CreateVector<uint8_t>(*testarrayofbools) : 0,
      testf,
      testf2,
      testf3,
      testarrayofstring2 ? _fbb.CreateVector<flatbuffers::Offset<flatbuffers::String>>(*testarrayofstring2) : 0,
      testarrayofsortedstruct ? _fbb.CreateVector<const Ability *>(*testarrayofsortedstruct) : 0,
      flex ? _fbb.CreateVector<uint8_t>(*flex) : 0,
      test5 ? _fbb.CreateVector<const Test *>(*test5) : 0,
      vector_of_longs ? _fbb.CreateVector<int64_t>(*vector_of_longs) : 0,
      vector_of_doubles ? _fbb.CreateVector<double>(*vector_of_doubles) : 0,
      parent_namespace_test);
}

flatbuffers::Offset<Monster> CreateMonster(flatbuffers::FlatBufferBuilder &_fbb, const MonsterT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr);

struct TypeAliasesT : public flatbuffers::NativeTable {
  typedef TypeAliases TableType;
  int8_t i8;
  uint8_t u8;
  int16_t i16;
  uint16_t u16;
  int32_t i32;
  uint32_t u32;
  int64_t i64;
  uint64_t u64;
  float f32;
  double f64;
  std::vector<int8_t> v8;
  std::vector<double> vf64;
  TypeAliasesT()
      : i8(0),
        u8(0),
        i16(0),
        u16(0),
        i32(0),
        u32(0),
        i64(0),
        u64(0),
        f32(0.0f),
        f64(0.0) {
  }
};

struct TypeAliases FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
  typedef TypeAliasesT NativeTableType;
  enum {
    VT_I8 = 4,
    VT_U8 = 6,
    VT_I16 = 8,
    VT_U16 = 10,
    VT_I32 = 12,
    VT_U32 = 14,
    VT_I64 = 16,
    VT_U64 = 18,
    VT_F32 = 20,
    VT_F64 = 22,
    VT_V8 = 24,
    VT_VF64 = 26
  };
  int8_t i8() const {
    return GetField<int8_t>(VT_I8, 0);
  }
  bool mutate_i8(int8_t _i8) {
    return SetField<int8_t>(VT_I8, _i8, 0);
  }
  uint8_t u8() const {
    return GetField<uint8_t>(VT_U8, 0);
  }
  bool mutate_u8(uint8_t _u8) {
    return SetField<uint8_t>(VT_U8, _u8, 0);
  }
  int16_t i16() const {
    return GetField<int16_t>(VT_I16, 0);
  }
  bool mutate_i16(int16_t _i16) {
    return SetField<int16_t>(VT_I16, _i16, 0);
  }
  uint16_t u16() const {
    return GetField<uint16_t>(VT_U16, 0);
  }
  bool mutate_u16(uint16_t _u16) {
    return SetField<uint16_t>(VT_U16, _u16, 0);
  }
  int32_t i32() const {
    return GetField<int32_t>(VT_I32, 0);
  }
  bool mutate_i32(int32_t _i32) {
    return SetField<int32_t>(VT_I32, _i32, 0);
  }
  uint32_t u32() const {
    return GetField<uint32_t>(VT_U32, 0);
  }
  bool mutate_u32(uint32_t _u32) {
    return SetField<uint32_t>(VT_U32, _u32, 0);
  }
  int64_t i64() const {
    return GetField<int64_t>(VT_I64, 0);
  }
  bool mutate_i64(int64_t _i64) {
    return SetField<int64_t>(VT_I64, _i64, 0);
  }
  uint64_t u64() const {
    return GetField<uint64_t>(VT_U64, 0);
  }
  bool mutate_u64(uint64_t _u64) {
    return SetField<uint64_t>(VT_U64, _u64, 0);
  }
  float f32() const {
    return GetField<float>(VT_F32, 0.0f);
  }
  bool mutate_f32(float _f32) {
    return SetField<float>(VT_F32, _f32, 0.0f);
  }
  double f64() const {
    return GetField<double>(VT_F64, 0.0);
  }
  bool mutate_f64(double _f64) {
    return SetField<double>(VT_F64, _f64, 0.0);
  }
  const flatbuffers::Vector<int8_t> *v8() const {
    return GetPointer<const flatbuffers::Vector<int8_t> *>(VT_V8);
  }
  flatbuffers::Vector<int8_t> *mutable_v8() {
    return GetPointer<flatbuffers::Vector<int8_t> *>(VT_V8);
  }
  const flatbuffers::Vector<double> *vf64() const {
    return GetPointer<const flatbuffers::Vector<double> *>(VT_VF64);
  }
  flatbuffers::Vector<double> *mutable_vf64() {
    return GetPointer<flatbuffers::Vector<double> *>(VT_VF64);
  }
  bool Verify(flatbuffers::Verifier &verifier) const {
    return VerifyTableStart(verifier) &&
           VerifyField<int8_t>(verifier, VT_I8) &&
           VerifyField<uint8_t>(verifier, VT_U8) &&
           VerifyField<int16_t>(verifier, VT_I16) &&
           VerifyField<uint16_t>(verifier, VT_U16) &&
           VerifyField<int32_t>(verifier, VT_I32) &&
           VerifyField<uint32_t>(verifier, VT_U32) &&
           VerifyField<int64_t>(verifier, VT_I64) &&
           VerifyField<uint64_t>(verifier, VT_U64) &&
           VerifyField<float>(verifier, VT_F32) &&
           VerifyField<double>(verifier, VT_F64) &&
           VerifyOffset(verifier, VT_V8) &&
           verifier.Verify(v8()) &&
           VerifyOffset(verifier, VT_VF64) &&
           verifier.Verify(vf64()) &&
           verifier.EndTable();
  }
  TypeAliasesT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const;
  void UnPackTo(TypeAliasesT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const;
  static flatbuffers::Offset<TypeAliases> Pack(flatbuffers::FlatBufferBuilder &_fbb, const TypeAliasesT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr);
};

struct TypeAliasesBuilder {
  flatbuffers::FlatBufferBuilder &fbb_;
  flatbuffers::uoffset_t start_;
  void add_i8(int8_t i8) {
    fbb_.AddElement<int8_t>(TypeAliases::VT_I8, i8, 0);
  }
  void add_u8(uint8_t u8) {
    fbb_.AddElement<uint8_t>(TypeAliases::VT_U8, u8, 0);
  }
  void add_i16(int16_t i16) {
    fbb_.AddElement<int16_t>(TypeAliases::VT_I16, i16, 0);
  }
  void add_u16(uint16_t u16) {
    fbb_.AddElement<uint16_t>(TypeAliases::VT_U16, u16, 0);
  }
  void add_i32(int32_t i32) {
    fbb_.AddElement<int32_t>(TypeAliases::VT_I32, i32, 0);
  }
  void add_u32(uint32_t u32) {
    fbb_.AddElement<uint32_t>(TypeAliases::VT_U32, u32, 0);
  }
  void add_i64(int64_t i64) {
    fbb_.AddElement<int64_t>(TypeAliases::VT_I64, i64, 0);
  }
  void add_u64(uint64_t u64) {
    fbb_.AddElement<uint64_t>(TypeAliases::VT_U64, u64, 0);
  }
  void add_f32(float f32) {
    fbb_.AddElement<float>(TypeAliases::VT_F32, f32, 0.0f);
  }
  void add_f64(double f64) {
    fbb_.AddElement<double>(TypeAliases::VT_F64, f64, 0.0);
  }
  void add_v8(flatbuffers::Offset<flatbuffers::Vector<int8_t>> v8) {
    fbb_.AddOffset(TypeAliases::VT_V8, v8);
  }
  void add_vf64(flatbuffers::Offset<flatbuffers::Vector<double>> vf64) {
    fbb_.AddOffset(TypeAliases::VT_VF64, vf64);
  }
  TypeAliasesBuilder(flatbuffers::FlatBufferBuilder &_fbb)
        : fbb_(_fbb) {
    start_ = fbb_.StartTable();
  }
  TypeAliasesBuilder &operator=(const TypeAliasesBuilder &);
  flatbuffers::Offset<TypeAliases> Finish() {
    const auto end = fbb_.EndTable(start_);
    auto o = flatbuffers::Offset<TypeAliases>(end);
    return o;
  }
};

inline flatbuffers::Offset<TypeAliases> CreateTypeAliases(
    flatbuffers::FlatBufferBuilder &_fbb,
    int8_t i8 = 0,
    uint8_t u8 = 0,
    int16_t i16 = 0,
    uint16_t u16 = 0,
    int32_t i32 = 0,
    uint32_t u32 = 0,
    int64_t i64 = 0,
    uint64_t u64 = 0,
    float f32 = 0.0f,
    double f64 = 0.0,
    flatbuffers::Offset<flatbuffers::Vector<int8_t>> v8 = 0,
    flatbuffers::Offset<flatbuffers::Vector<double>> vf64 = 0) {
  TypeAliasesBuilder builder_(_fbb);
  builder_.add_f64(f64);
  builder_.add_u64(u64);
  builder_.add_i64(i64);
  builder_.add_vf64(vf64);
  builder_.add_v8(v8);
  builder_.add_f32(f32);
  builder_.add_u32(u32);
  builder_.add_i32(i32);
  builder_.add_u16(u16);
  builder_.add_i16(i16);
  builder_.add_u8(u8);
  builder_.add_i8(i8);
  return builder_.Finish();
}

inline flatbuffers::Offset<TypeAliases> CreateTypeAliasesDirect(
    flatbuffers::FlatBufferBuilder &_fbb,
    int8_t i8 = 0,
    uint8_t u8 = 0,
    int16_t i16 = 0,
    uint16_t u16 = 0,
    int32_t i32 = 0,
    uint32_t u32 = 0,
    int64_t i64 = 0,
    uint64_t u64 = 0,
    float f32 = 0.0f,
    double f64 = 0.0,
    const std::vector<int8_t> *v8 = nullptr,
    const std::vector<double> *vf64 = nullptr) {
  return MyGame::Example::CreateTypeAliases(
      _fbb,
      i8,
      u8,
      i16,
      u16,
      i32,
      u32,
      i64,
      u64,
      f32,
      f64,
      v8 ? _fbb.CreateVector<int8_t>(*v8) : 0,
      vf64 ? _fbb.CreateVector<double>(*vf64) : 0);
}

flatbuffers::Offset<TypeAliases> CreateTypeAliases(flatbuffers::FlatBufferBuilder &_fbb, const TypeAliasesT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr);

}  // namespace Example

inline InParentNamespaceT *InParentNamespace::UnPack(const flatbuffers::resolver_function_t *_resolver) const {
  auto _o = new InParentNamespaceT();
  UnPackTo(_o, _resolver);
  return _o;
}

inline void InParentNamespace::UnPackTo(InParentNamespaceT *_o, const flatbuffers::resolver_function_t *_resolver) const {
  (void)_o;
  (void)_resolver;
}

inline flatbuffers::Offset<InParentNamespace> InParentNamespace::Pack(flatbuffers::FlatBufferBuilder &_fbb, const InParentNamespaceT* _o, const flatbuffers::rehasher_function_t *_rehasher) {
  return CreateInParentNamespace(_fbb, _o, _rehasher);
}

inline flatbuffers::Offset<InParentNamespace> CreateInParentNamespace(flatbuffers::FlatBufferBuilder &_fbb, const InParentNamespaceT *_o, const flatbuffers::rehasher_function_t *_rehasher) {
  (void)_rehasher;
  (void)_o;
  struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const InParentNamespaceT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va;
  return MyGame::CreateInParentNamespace(
      _fbb);
}

namespace Example2 {

inline MonsterT *Monster::UnPack(const flatbuffers::resolver_function_t *_resolver) const {
  auto _o = new MonsterT();
  UnPackTo(_o, _resolver);
  return _o;
}

inline void Monster::UnPackTo(MonsterT *_o, const flatbuffers::resolver_function_t *_resolver) const {
  (void)_o;
  (void)_resolver;
}

inline flatbuffers::Offset<Monster> Monster::Pack(flatbuffers::FlatBufferBuilder &_fbb, const MonsterT* _o, const flatbuffers::rehasher_function_t *_rehasher) {
  return CreateMonster(_fbb, _o, _rehasher);
}

inline flatbuffers::Offset<Monster> CreateMonster(flatbuffers::FlatBufferBuilder &_fbb, const MonsterT *_o, const flatbuffers::rehasher_function_t *_rehasher) {
  (void)_rehasher;
  (void)_o;
  struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const MonsterT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va;
  return MyGame::Example2::CreateMonster(
      _fbb);
}

}  // namespace Example2

namespace Example {

inline TestSimpleTableWithEnumT *TestSimpleTableWithEnum::UnPack(const flatbuffers::resolver_function_t *_resolver) const {
  auto _o = new TestSimpleTableWithEnumT();
  UnPackTo(_o, _resolver);
  return _o;
}

inline void TestSimpleTableWithEnum::UnPackTo(TestSimpleTableWithEnumT *_o, const flatbuffers::resolver_function_t *_resolver) const {
  (void)_o;
  (void)_resolver;
  { auto _e = color(); _o->color = _e; };
}

inline flatbuffers::Offset<TestSimpleTableWithEnum> TestSimpleTableWithEnum::Pack(flatbuffers::FlatBufferBuilder &_fbb, const TestSimpleTableWithEnumT* _o, const flatbuffers::rehasher_function_t *_rehasher) {
  return CreateTestSimpleTableWithEnum(_fbb, _o, _rehasher);
}

inline flatbuffers::Offset<TestSimpleTableWithEnum> CreateTestSimpleTableWithEnum(flatbuffers::FlatBufferBuilder &_fbb, const TestSimpleTableWithEnumT *_o, const flatbuffers::rehasher_function_t *_rehasher) {
  (void)_rehasher;
  (void)_o;
  struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const TestSimpleTableWithEnumT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va;
  auto _color = _o->color;
  return MyGame::Example::CreateTestSimpleTableWithEnum(
      _fbb,
      _color);
}

inline StatT *Stat::UnPack(const flatbuffers::resolver_function_t *_resolver) const {
  auto _o = new StatT();
  UnPackTo(_o, _resolver);
  return _o;
}

inline void Stat::UnPackTo(StatT *_o, const flatbuffers::resolver_function_t *_resolver) const {
  (void)_o;
  (void)_resolver;
  { auto _e = id(); if (_e) _o->id = _e->str(); };
  { auto _e = val(); _o->val = _e; };
  { auto _e = count(); _o->count = _e; };
}

inline flatbuffers::Offset<Stat> Stat::Pack(flatbuffers::FlatBufferBuilder &_fbb, const StatT* _o, const flatbuffers::rehasher_function_t *_rehasher) {
  return CreateStat(_fbb, _o, _rehasher);
}

inline flatbuffers::Offset<Stat> CreateStat(flatbuffers::FlatBufferBuilder &_fbb, const StatT *_o, const flatbuffers::rehasher_function_t *_rehasher) {
  (void)_rehasher;
  (void)_o;
  struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const StatT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va;
  auto _id = _o->id.empty() ? 0 : _fbb.CreateString(_o->id);
  auto _val = _o->val;
  auto _count = _o->count;
  return MyGame::Example::CreateStat(
      _fbb,
      _id,
      _val,
      _count);
}

inline MonsterT *Monster::UnPack(const flatbuffers::resolver_function_t *_resolver) const {
  auto _o = new MonsterT();
  UnPackTo(_o, _resolver);
  return _o;
}

inline void Monster::UnPackTo(MonsterT *_o, const flatbuffers::resolver_function_t *_resolver) const {
  (void)_o;
  (void)_resolver;
  { auto _e = pos(); if (_e) _o->pos = flatbuffers::unique_ptr<Vec3>(new Vec3(*_e)); };
  { auto _e = mana(); _o->mana = _e; };
  { auto _e = hp(); _o->hp = _e; };
  { auto _e = name(); if (_e) _o->name = _e->str(); };
  { 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); } } };
  { auto _e = color(); _o->color = _e; };
  { auto _e = test_type(); _o->test.type = _e; };
  { auto _e = test(); if (_e) _o->test.value = AnyUnion::UnPack(_e, test_type(), _resolver); };
  { 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); } } };
  { 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(); } } };
  { 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<MonsterT>(_e->Get(_i)->UnPack(_resolver)); } } };
  { auto _e = enemy(); if (_e) _o->enemy = flatbuffers::unique_ptr<MonsterT>(_e->UnPack(_resolver)); };
  { 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); } } };
  { auto _e = testempty(); if (_e) _o->testempty = flatbuffers::unique_ptr<StatT>(_e->UnPack(_resolver)); };
  { auto _e = testbool(); _o->testbool = _e; };
  { auto _e = testhashs32_fnv1(); _o->testhashs32_fnv1 = _e; };
  { auto _e = testhashu32_fnv1(); _o->testhashu32_fnv1 = _e; };
  { auto _e = testhashs64_fnv1(); _o->testhashs64_fnv1 = _e; };
  { auto _e = testhashu64_fnv1(); _o->testhashu64_fnv1 = _e; };
  { auto _e = testhashs32_fnv1a(); _o->testhashs32_fnv1a = _e; };
  { auto _e = testhashu32_fnv1a(); if (_resolver) (*_resolver)(reinterpret_cast<void **>(&_o->testhashu32_fnv1a), static_cast<flatbuffers::hash_value_t>(_e)); else _o->testhashu32_fnv1a = nullptr; };
  { auto _e = testhashs64_fnv1a(); _o->testhashs64_fnv1a = _e; };
  { auto _e = testhashu64_fnv1a(); _o->testhashu64_fnv1a = _e; };
  { 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; } } };
  { auto _e = testf(); _o->testf = _e; };
  { auto _e = testf2(); _o->testf2 = _e; };
  { auto _e = testf3(); _o->testf3 = _e; };
  { 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(); } } };
  { 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); } } };
  { 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); } } };
  { 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); } } };
  { 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); } } };
  { 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); } } };
  { auto _e = parent_namespace_test(); if (_e) _o->parent_namespace_test = flatbuffers::unique_ptr<MyGame::InParentNamespaceT>(_e->UnPack(_resolver)); };
}

inline flatbuffers::Offset<Monster> Monster::Pack(flatbuffers::FlatBufferBuilder &_fbb, const MonsterT* _o, const flatbuffers::rehasher_function_t *_rehasher) {
  return CreateMonster(_fbb, _o, _rehasher);
}

inline flatbuffers::Offset<Monster> CreateMonster(flatbuffers::FlatBufferBuilder &_fbb, const MonsterT *_o, const flatbuffers::rehasher_function_t *_rehasher) {
  (void)_rehasher;
  (void)_o;
  struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const MonsterT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va;
  auto _pos = _o->pos ? _o->pos.get() : 0;
  auto _mana = _o->mana;
  auto _hp = _o->hp;
  auto _name = _fbb.CreateString(_o->name);
  auto _inventory = _o->inventory.size() ? _fbb.CreateVector(_o->inventory) : 0;
  auto _color = _o->color;
  auto _test_type = _o->test.type;
  auto _test = _o->test.Pack(_fbb);
  auto _test4 = _o->test4.size() ? _fbb.CreateVectorOfStructs(_o->test4) : 0;
  auto _testarrayofstring = _o->testarrayofstring.size() ? _fbb.CreateVectorOfStrings(_o->testarrayofstring) : 0;
  auto _testarrayoftables = _o->testarrayoftables.size() ? _fbb.CreateVector<flatbuffers::Offset<Monster>> (_o->testarrayoftables.size(), [](size_t i, _VectorArgs *__va) { return CreateMonster(*__va->__fbb, __va->__o->testarrayoftables[i].get(), __va->__rehasher); }, &_va ) : 0;
  auto _enemy = _o->enemy ? CreateMonster(_fbb, _o->enemy.get(), _rehasher) : 0;
  auto _testnestedflatbuffer = _o->testnestedflatbuffer.size() ? _fbb.CreateVector(_o->testnestedflatbuffer) : 0;
  auto _testempty = _o->testempty ? CreateStat(_fbb, _o->testempty.get(), _rehasher) : 0;
  auto _testbool = _o->testbool;
  auto _testhashs32_fnv1 = _o->testhashs32_fnv1;
  auto _testhashu32_fnv1 = _o->testhashu32_fnv1;
  auto _testhashs64_fnv1 = _o->testhashs64_fnv1;
  auto _testhashu64_fnv1 = _o->testhashu64_fnv1;
  auto _testhashs32_fnv1a = _o->testhashs32_fnv1a;
  auto _testhashu32_fnv1a = _rehasher ? static_cast<uint32_t>((*_rehasher)(_o->testhashu32_fnv1a)) : 0;
  auto _testhashs64_fnv1a = _o->testhashs64_fnv1a;
  auto _testhashu64_fnv1a = _o->testhashu64_fnv1a;
  auto _testarrayofbools = _o->testarrayofbools.size() ? _fbb.CreateVector(_o->testarrayofbools) : 0;
  auto _testf = _o->testf;
  auto _testf2 = _o->testf2;
  auto _testf3 = _o->testf3;
  auto _testarrayofstring2 = _o->testarrayofstring2.size() ? _fbb.CreateVectorOfStrings(_o->testarrayofstring2) : 0;
  auto _testarrayofsortedstruct = _o->testarrayofsortedstruct.size() ? _fbb.CreateVectorOfStructs(_o->testarrayofsortedstruct) : 0;
  auto _flex = _o->flex.size() ? _fbb.CreateVector(_o->flex) : 0;
  auto _test5 = _o->test5.size() ? _fbb.CreateVectorOfStructs(_o->test5) : 0;
  auto _vector_of_longs = _o->vector_of_longs.size() ? _fbb.CreateVector(_o->vector_of_longs) : 0;
  auto _vector_of_doubles = _o->vector_of_doubles.size() ? _fbb.CreateVector(_o->vector_of_doubles) : 0;
  auto _parent_namespace_test = _o->parent_namespace_test ? CreateInParentNamespace(_fbb, _o->parent_namespace_test.get(), _rehasher) : 0;
  return MyGame::Example::CreateMonster(
      _fbb,
      _pos,
      _mana,
      _hp,
      _name,
      _inventory,
      _color,
      _test_type,
      _test,
      _test4,
      _testarrayofstring,
      _testarrayoftables,
      _enemy,
      _testnestedflatbuffer,
      _testempty,
      _testbool,
      _testhashs32_fnv1,
      _testhashu32_fnv1,
      _testhashs64_fnv1,
      _testhashu64_fnv1,
      _testhashs32_fnv1a,
      _testhashu32_fnv1a,
      _testhashs64_fnv1a,
      _testhashu64_fnv1a,
      _testarrayofbools,
      _testf,
      _testf2,
      _testf3,
      _testarrayofstring2,
      _testarrayofsortedstruct,
      _flex,
      _test5,
      _vector_of_longs,
      _vector_of_doubles,
      _parent_namespace_test);
}

inline TypeAliasesT *TypeAliases::UnPack(const flatbuffers::resolver_function_t *_resolver) const {
  auto _o = new TypeAliasesT();
  UnPackTo(_o, _resolver);
  return _o;
}

inline void TypeAliases::UnPackTo(TypeAliasesT *_o, const flatbuffers::resolver_function_t *_resolver) const {
  (void)_o;
  (void)_resolver;
  { auto _e = i8(); _o->i8 = _e; };
  { auto _e = u8(); _o->u8 = _e; };
  { auto _e = i16(); _o->i16 = _e; };
  { auto _e = u16(); _o->u16 = _e; };
  { auto _e = i32(); _o->i32 = _e; };
  { auto _e = u32(); _o->u32 = _e; };
  { auto _e = i64(); _o->i64 = _e; };
  { auto _e = u64(); _o->u64 = _e; };
  { auto _e = f32(); _o->f32 = _e; };
  { auto _e = f64(); _o->f64 = _e; };
  { 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); } } };
  { 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); } } };
}

inline flatbuffers::Offset<TypeAliases> TypeAliases::Pack(flatbuffers::FlatBufferBuilder &_fbb, const TypeAliasesT* _o, const flatbuffers::rehasher_function_t *_rehasher) {
  return CreateTypeAliases(_fbb, _o, _rehasher);
}

inline flatbuffers::Offset<TypeAliases> CreateTypeAliases(flatbuffers::FlatBufferBuilder &_fbb, const TypeAliasesT *_o, const flatbuffers::rehasher_function_t *_rehasher) {
  (void)_rehasher;
  (void)_o;
  struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const TypeAliasesT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va;
  auto _i8 = _o->i8;
  auto _u8 = _o->u8;
  auto _i16 = _o->i16;
  auto _u16 = _o->u16;
  auto _i32 = _o->i32;
  auto _u32 = _o->u32;
  auto _i64 = _o->i64;
  auto _u64 = _o->u64;
  auto _f32 = _o->f32;
  auto _f64 = _o->f64;
  auto _v8 = _o->v8.size() ? _fbb.CreateVector(_o->v8) : 0;
  auto _vf64 = _o->vf64.size() ? _fbb.CreateVector(_o->vf64) : 0;
  return MyGame::Example::CreateTypeAliases(
      _fbb,
      _i8,
      _u8,
      _i16,
      _u16,
      _i32,
      _u32,
      _i64,
      _u64,
      _f32,
      _f64,
      _v8,
      _vf64);
}

inline bool VerifyAny(flatbuffers::Verifier &verifier, const void *obj, Any type) {
  switch (type) {
    case Any_NONE: {
      return true;
    }
    case Any_Monster: {
      auto ptr = reinterpret_cast<const Monster *>(obj);
      return verifier.VerifyTable(ptr);
    }
    case Any_TestSimpleTableWithEnum: {
      auto ptr = reinterpret_cast<const TestSimpleTableWithEnum *>(obj);
      return verifier.VerifyTable(ptr);
    }
    case Any_MyGame_Example2_Monster: {
      auto ptr = reinterpret_cast<const MyGame::Example2::Monster *>(obj);
      return verifier.VerifyTable(ptr);
    }
    default: return false;
  }
}

inline bool VerifyAnyVector(flatbuffers::Verifier &verifier, const flatbuffers::Vector<flatbuffers::Offset<void>> *values, const flatbuffers::Vector<uint8_t> *types) {
  if (values->size() != types->size()) return false;
  for (flatbuffers::uoffset_t i = 0; i < values->size(); ++i) {
    if (!VerifyAny(
        verifier,  values->Get(i), types->GetEnum<Any>(i))) {
      return false;
    }
  }
  return true;
}

inline void *AnyUnion::UnPack(const void *obj, Any type, const flatbuffers::resolver_function_t *resolver) {
  switch (type) {
    case Any_Monster: {
      auto ptr = reinterpret_cast<const Monster *>(obj);
      return ptr->UnPack(resolver);
    }
    case Any_TestSimpleTableWithEnum: {
      auto ptr = reinterpret_cast<const TestSimpleTableWithEnum *>(obj);
      return ptr->UnPack(resolver);
    }
    case Any_MyGame_Example2_Monster: {
      auto ptr = reinterpret_cast<const MyGame::Example2::Monster *>(obj);
      return ptr->UnPack(resolver);
    }
    default: return nullptr;
  }
}

inline flatbuffers::Offset<void> AnyUnion::Pack(flatbuffers::FlatBufferBuilder &_fbb, const flatbuffers::rehasher_function_t *_rehasher) const {
  switch (type) {
    case Any_Monster: {
      auto ptr = reinterpret_cast<const MonsterT *>(value);
      return CreateMonster(_fbb, ptr, _rehasher).Union();
    }
    case Any_TestSimpleTableWithEnum: {
      auto ptr = reinterpret_cast<const TestSimpleTableWithEnumT *>(value);
      return CreateTestSimpleTableWithEnum(_fbb, ptr, _rehasher).Union();
    }
    case Any_MyGame_Example2_Monster: {
      auto ptr = reinterpret_cast<const MyGame::Example2::MonsterT *>(value);
      return CreateMonster(_fbb, ptr, _rehasher).Union();
    }
    default: return 0;
  }
}

inline AnyUnion::AnyUnion(const AnyUnion &u) FLATBUFFERS_NOEXCEPT : type(u.type), value(nullptr) {
  switch (type) {
    case Any_Monster: {
      assert(false);  // MonsterT not copyable.
      break;
    }
    case Any_TestSimpleTableWithEnum: {
      value = new TestSimpleTableWithEnumT(*reinterpret_cast<TestSimpleTableWithEnumT *>(u.value));
      break;
    }
    case Any_MyGame_Example2_Monster: {
      value = new MyGame::Example2::MonsterT(*reinterpret_cast<MyGame::Example2::MonsterT *>(u.value));
      break;
    }
    default:
      break;
  }
}

inline void AnyUnion::Reset() {
  switch (type) {
    case Any_Monster: {
      auto ptr = reinterpret_cast<MonsterT *>(value);
      delete ptr;
      break;
    }
    case Any_TestSimpleTableWithEnum: {
      auto ptr = reinterpret_cast<TestSimpleTableWithEnumT *>(value);
      delete ptr;
      break;
    }
    case Any_MyGame_Example2_Monster: {
      auto ptr = reinterpret_cast<MyGame::Example2::MonsterT *>(value);
      delete ptr;
      break;
    }
    default: break;
  }
  value = nullptr;
  type = Any_NONE;
}

}  // namespace Example

flatbuffers::TypeTable *InParentNamespaceTypeTable();

namespace Example2 {

flatbuffers::TypeTable *MonsterTypeTable();

}  // namespace Example2

namespace Example {

flatbuffers::TypeTable *TestTypeTable();

flatbuffers::TypeTable *TestSimpleTableWithEnumTypeTable();

flatbuffers::TypeTable *Vec3TypeTable();

flatbuffers::TypeTable *AbilityTypeTable();

flatbuffers::TypeTable *StatTypeTable();

flatbuffers::TypeTable *MonsterTypeTable();

flatbuffers::TypeTable *TypeAliasesTypeTable();

flatbuffers::TypeTable *ColorTypeTable() {
  static flatbuffers::TypeCode type_codes[] = {
    { flatbuffers::ET_CHAR, 0, 0 },
    { flatbuffers::ET_CHAR, 0, 0 },
    { flatbuffers::ET_CHAR, 0, 0 }
  };
  static flatbuffers::TypeFunction type_refs[] = {
    ColorTypeTable
  };
  static const int32_t values[] = { 1, 2, 8 };
  static const char *names[] = {
    "Red",
    "Green",
    "Blue"
  };
  static flatbuffers::TypeTable tt = {
    flatbuffers::ST_ENUM, 3, type_codes, type_refs, values, names
  };
  return &tt;
}

flatbuffers::TypeTable *AnyTypeTable() {
  static flatbuffers::TypeCode type_codes[] = {
    { flatbuffers::ET_SEQUENCE, 0, -1 },
    { flatbuffers::ET_SEQUENCE, 0, 0 },
    { flatbuffers::ET_SEQUENCE, 0, 1 },
    { flatbuffers::ET_SEQUENCE, 0, 2 }
  };
  static flatbuffers::TypeFunction type_refs[] = {
    MonsterTypeTable,
    TestSimpleTableWithEnumTypeTable,
    MyGame::Example2::MonsterTypeTable
  };
  static const char *names[] = {
    "NONE",
    "Monster",
    "TestSimpleTableWithEnum",
    "MyGame_Example2_Monster"
  };
  static flatbuffers::TypeTable tt = {
    flatbuffers::ST_UNION, 4, type_codes, type_refs, nullptr, names
  };
  return &tt;
}

}  // namespace Example

flatbuffers::TypeTable *InParentNamespaceTypeTable() {
  static flatbuffers::TypeTable tt = {
    flatbuffers::ST_TABLE, 0, nullptr, nullptr, nullptr, nullptr
  };
  return &tt;
}

namespace Example2 {

flatbuffers::TypeTable *MonsterTypeTable() {
  static flatbuffers::TypeTable tt = {
    flatbuffers::ST_TABLE, 0, nullptr, nullptr, nullptr, nullptr
  };
  return &tt;
}

}  // namespace Example2

namespace Example {

flatbuffers::TypeTable *TestTypeTable() {
  static flatbuffers::TypeCode type_codes[] = {
    { flatbuffers::ET_SHORT, 0, -1 },
    { flatbuffers::ET_CHAR, 0, -1 }
  };
  static const int32_t values[] = { 0, 2, 4 };
  static const char *names[] = {
    "a",
    "b"
  };
  static flatbuffers::TypeTable tt = {
    flatbuffers::ST_STRUCT, 2, type_codes, nullptr, values, names
  };
  return &tt;
}

flatbuffers::TypeTable *TestSimpleTableWithEnumTypeTable() {
  static flatbuffers::TypeCode type_codes[] = {
    { flatbuffers::ET_CHAR, 0, 0 }
  };
  static flatbuffers::TypeFunction type_refs[] = {
    ColorTypeTable
  };
  static const char *names[] = {
    "color"
  };
  static flatbuffers::TypeTable tt = {
    flatbuffers::ST_TABLE, 1, type_codes, type_refs, nullptr, names
  };
  return &tt;
}

flatbuffers::TypeTable *Vec3TypeTable() {
  static flatbuffers::TypeCode type_codes[] = {
    { flatbuffers::ET_FLOAT, 0, -1 },
    { flatbuffers::ET_FLOAT, 0, -1 },
    { flatbuffers::ET_FLOAT, 0, -1 },
    { flatbuffers::ET_DOUBLE, 0, -1 },
    { flatbuffers::ET_CHAR, 0, 0 },
    { flatbuffers::ET_SEQUENCE, 0, 1 }
  };
  static flatbuffers::TypeFunction type_refs[] = {
    ColorTypeTable,
    TestTypeTable
  };
  static const int32_t values[] = { 0, 4, 8, 16, 24, 26, 32 };
  static const char *names[] = {
    "x",
    "y",
    "z",
    "test1",
    "test2",
    "test3"
  };
  static flatbuffers::TypeTable tt = {
    flatbuffers::ST_STRUCT, 6, type_codes, type_refs, values, names
  };
  return &tt;
}

flatbuffers::TypeTable *AbilityTypeTable() {
  static flatbuffers::TypeCode type_codes[] = {
    { flatbuffers::ET_UINT, 0, -1 },
    { flatbuffers::ET_UINT, 0, -1 }
  };
  static const int32_t values[] = { 0, 4, 8 };
  static const char *names[] = {
    "id",
    "distance"
  };
  static flatbuffers::TypeTable tt = {
    flatbuffers::ST_STRUCT, 2, type_codes, nullptr, values, names
  };
  return &tt;
}

flatbuffers::TypeTable *StatTypeTable() {
  static flatbuffers::TypeCode type_codes[] = {
    { flatbuffers::ET_STRING, 0, -1 },
    { flatbuffers::ET_LONG, 0, -1 },
    { flatbuffers::ET_USHORT, 0, -1 }
  };
  static const char *names[] = {
    "id",
    "val",
    "count"
  };
  static flatbuffers::TypeTable tt = {
    flatbuffers::ST_TABLE, 3, type_codes, nullptr, nullptr, names
  };
  return &tt;
}

flatbuffers::TypeTable *MonsterTypeTable() {
  static flatbuffers::TypeCode type_codes[] = {
    { flatbuffers::ET_SEQUENCE, 0, 0 },
    { flatbuffers::ET_SHORT, 0, -1 },
    { flatbuffers::ET_SHORT, 0, -1 },
    { flatbuffers::ET_STRING, 0, -1 },
    { flatbuffers::ET_BOOL, 0, -1 },
    { flatbuffers::ET_UCHAR, 1, -1 },
    { flatbuffers::ET_CHAR, 0, 1 },
    { flatbuffers::ET_UTYPE, 0, 2 },
    { flatbuffers::ET_SEQUENCE, 0, 2 },
    { flatbuffers::ET_SEQUENCE, 1, 3 },
    { flatbuffers::ET_STRING, 1, -1 },
    { flatbuffers::ET_SEQUENCE, 1, 4 },
    { flatbuffers::ET_SEQUENCE, 0, 4 },
    { flatbuffers::ET_UCHAR, 1, -1 },
    { flatbuffers::ET_SEQUENCE, 0, 5 },
    { flatbuffers::ET_BOOL, 0, -1 },
    { flatbuffers::ET_INT, 0, -1 },
    { flatbuffers::ET_UINT, 0, -1 },
    { flatbuffers::ET_LONG, 0, -1 },
    { flatbuffers::ET_ULONG, 0, -1 },
    { flatbuffers::ET_INT, 0, -1 },
    { flatbuffers::ET_UINT, 0, -1 },
    { flatbuffers::ET_LONG, 0, -1 },
    { flatbuffers::ET_ULONG, 0, -1 },
    { flatbuffers::ET_BOOL, 1, -1 },
    { flatbuffers::ET_FLOAT, 0, -1 },
    { flatbuffers::ET_FLOAT, 0, -1 },
    { flatbuffers::ET_FLOAT, 0, -1 },
    { flatbuffers::ET_STRING, 1, -1 },
    { flatbuffers::ET_SEQUENCE, 1, 6 },
    { flatbuffers::ET_UCHAR, 1, -1 },
    { flatbuffers::ET_SEQUENCE, 1, 3 },
    { flatbuffers::ET_LONG, 1, -1 },
    { flatbuffers::ET_DOUBLE, 1, -1 },
    { flatbuffers::ET_SEQUENCE, 0, 7 }
  };
  static flatbuffers::TypeFunction type_refs[] = {
    Vec3TypeTable,
    ColorTypeTable,
    AnyTypeTable,
    TestTypeTable,
    MonsterTypeTable,
    StatTypeTable,
    AbilityTypeTable,
    MyGame::InParentNamespaceTypeTable
  };
  static const char *names[] = {
    "pos",
    "mana",
    "hp",
    "name",
    "friendly",
    "inventory",
    "color",
    "test_type",
    "test",
    "test4",
    "testarrayofstring",
    "testarrayoftables",
    "enemy",
    "testnestedflatbuffer",
    "testempty",
    "testbool",
    "testhashs32_fnv1",
    "testhashu32_fnv1",
    "testhashs64_fnv1",
    "testhashu64_fnv1",
    "testhashs32_fnv1a",
    "testhashu32_fnv1a",
    "testhashs64_fnv1a",
    "testhashu64_fnv1a",
    "testarrayofbools",
    "testf",
    "testf2",
    "testf3",
    "testarrayofstring2",
    "testarrayofsortedstruct",
    "flex",
    "test5",
    "vector_of_longs",
    "vector_of_doubles",
    "parent_namespace_test"
  };
  static flatbuffers::TypeTable tt = {
    flatbuffers::ST_TABLE, 35, type_codes, type_refs, nullptr, names
  };
  return &tt;
}

flatbuffers::TypeTable *TypeAliasesTypeTable() {
  static flatbuffers::TypeCode type_codes[] = {
    { flatbuffers::ET_CHAR, 0, -1 },
    { flatbuffers::ET_UCHAR, 0, -1 },
    { flatbuffers::ET_SHORT, 0, -1 },
    { flatbuffers::ET_USHORT, 0, -1 },
    { flatbuffers::ET_INT, 0, -1 },
    { flatbuffers::ET_UINT, 0, -1 },
    { flatbuffers::ET_LONG, 0, -1 },
    { flatbuffers::ET_ULONG, 0, -1 },
    { flatbuffers::ET_FLOAT, 0, -1 },
    { flatbuffers::ET_DOUBLE, 0, -1 },
    { flatbuffers::ET_CHAR, 1, -1 },
    { flatbuffers::ET_DOUBLE, 1, -1 }
  };
  static const char *names[] = {
    "i8",
    "u8",
    "i16",
    "u16",
    "i32",
    "u32",
    "i64",
    "u64",
    "f32",
    "f64",
    "v8",
    "vf64"
  };
  static flatbuffers::TypeTable tt = {
    flatbuffers::ST_TABLE, 12, type_codes, nullptr, nullptr, names
  };
  return &tt;
}

inline const MyGame::Example::Monster *GetMonster(const void *buf) {
  return flatbuffers::GetRoot<MyGame::Example::Monster>(buf);
}

inline Monster *GetMutableMonster(void *buf) {
  return flatbuffers::GetMutableRoot<Monster>(buf);
}

inline const char *MonsterIdentifier() {
  return "MONS";
}

inline bool MonsterBufferHasIdentifier(const void *buf) {
  return flatbuffers::BufferHasIdentifier(
      buf, MonsterIdentifier());
}

inline bool VerifyMonsterBuffer(
    flatbuffers::Verifier &verifier) {
  return verifier.VerifyBuffer<MyGame::Example::Monster>(MonsterIdentifier());
}

inline const char *MonsterExtension() {
  return "mon";
}

inline void FinishMonsterBuffer(
    flatbuffers::FlatBufferBuilder &fbb,
    flatbuffers::Offset<MyGame::Example::Monster> root) {
  fbb.Finish(root, MonsterIdentifier());
}

inline flatbuffers::unique_ptr<MonsterT> UnPackMonster(
    const void *buf,
    const flatbuffers::resolver_function_t *res = nullptr) {
  return flatbuffers::unique_ptr<MonsterT>(GetMonster(buf)->UnPack(res));
}

}  // namespace Example
}  // namespace MyGame

#endif  // FLATBUFFERS_GENERATED_MONSTERTEST_MYGAME_EXAMPLE_H_