• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // automatically generated by the FlatBuffers compiler, do not modify
2 
3 
4 #ifndef FLATBUFFERS_GENERATED_MONSTEREXTRA_MYGAME_H_
5 #define FLATBUFFERS_GENERATED_MONSTEREXTRA_MYGAME_H_
6 
7 #include "flatbuffers/flatbuffers.h"
8 
9 // Ensure the included flatbuffers.h is the same version as when this file was
10 // generated, otherwise it may not be compatible.
11 static_assert(FLATBUFFERS_VERSION_MAJOR == 2 &&
12               FLATBUFFERS_VERSION_MINOR == 0 &&
13               FLATBUFFERS_VERSION_REVISION == 7,
14              "Non-compatible flatbuffers version included");
15 
16 namespace MyGame {
17 
18 struct MonsterExtra;
19 struct MonsterExtraBuilder;
20 struct MonsterExtraT;
21 
22 bool operator==(const MonsterExtraT &lhs, const MonsterExtraT &rhs);
23 bool operator!=(const MonsterExtraT &lhs, const MonsterExtraT &rhs);
24 
25 inline const flatbuffers::TypeTable *MonsterExtraTypeTable();
26 
27 struct MonsterExtraT : public flatbuffers::NativeTable {
28   typedef MonsterExtra TableType;
29   double d0 = std::numeric_limits<double>::quiet_NaN();
30   double d1 = std::numeric_limits<double>::quiet_NaN();
31   double d2 = std::numeric_limits<double>::infinity();
32   double d3 = -std::numeric_limits<double>::infinity();
33   float f0 = std::numeric_limits<float>::quiet_NaN();
34   float f1 = std::numeric_limits<float>::quiet_NaN();
35   float f2 = std::numeric_limits<float>::infinity();
36   float f3 = -std::numeric_limits<float>::infinity();
37   std::vector<double> dvec{};
38   std::vector<float> fvec{};
39 };
40 
41 struct MonsterExtra FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
42   typedef MonsterExtraT NativeTableType;
43   typedef MonsterExtraBuilder Builder;
MiniReflectTypeTableFLATBUFFERS_FINAL_CLASS44   static const flatbuffers::TypeTable *MiniReflectTypeTable() {
45     return MonsterExtraTypeTable();
46   }
47   enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
48     VT_D0 = 4,
49     VT_D1 = 6,
50     VT_D2 = 8,
51     VT_D3 = 10,
52     VT_F0 = 12,
53     VT_F1 = 14,
54     VT_F2 = 16,
55     VT_F3 = 18,
56     VT_DVEC = 20,
57     VT_FVEC = 22
58   };
d0FLATBUFFERS_FINAL_CLASS59   double d0() const {
60     return GetField<double>(VT_D0, std::numeric_limits<double>::quiet_NaN());
61   }
62   bool mutate_d0(double _d0 = std::numeric_limits<double>::quiet_NaN()) {
63     return SetField<double>(VT_D0, _d0, std::numeric_limits<double>::quiet_NaN());
64   }
d1FLATBUFFERS_FINAL_CLASS65   double d1() const {
66     return GetField<double>(VT_D1, std::numeric_limits<double>::quiet_NaN());
67   }
68   bool mutate_d1(double _d1 = std::numeric_limits<double>::quiet_NaN()) {
69     return SetField<double>(VT_D1, _d1, std::numeric_limits<double>::quiet_NaN());
70   }
d2FLATBUFFERS_FINAL_CLASS71   double d2() const {
72     return GetField<double>(VT_D2, std::numeric_limits<double>::infinity());
73   }
74   bool mutate_d2(double _d2 = std::numeric_limits<double>::infinity()) {
75     return SetField<double>(VT_D2, _d2, std::numeric_limits<double>::infinity());
76   }
d3FLATBUFFERS_FINAL_CLASS77   double d3() const {
78     return GetField<double>(VT_D3, -std::numeric_limits<double>::infinity());
79   }
80   bool mutate_d3(double _d3 = -std::numeric_limits<double>::infinity()) {
81     return SetField<double>(VT_D3, _d3, -std::numeric_limits<double>::infinity());
82   }
f0FLATBUFFERS_FINAL_CLASS83   float f0() const {
84     return GetField<float>(VT_F0, std::numeric_limits<float>::quiet_NaN());
85   }
86   bool mutate_f0(float _f0 = std::numeric_limits<float>::quiet_NaN()) {
87     return SetField<float>(VT_F0, _f0, std::numeric_limits<float>::quiet_NaN());
88   }
f1FLATBUFFERS_FINAL_CLASS89   float f1() const {
90     return GetField<float>(VT_F1, std::numeric_limits<float>::quiet_NaN());
91   }
92   bool mutate_f1(float _f1 = std::numeric_limits<float>::quiet_NaN()) {
93     return SetField<float>(VT_F1, _f1, std::numeric_limits<float>::quiet_NaN());
94   }
f2FLATBUFFERS_FINAL_CLASS95   float f2() const {
96     return GetField<float>(VT_F2, std::numeric_limits<float>::infinity());
97   }
98   bool mutate_f2(float _f2 = std::numeric_limits<float>::infinity()) {
99     return SetField<float>(VT_F2, _f2, std::numeric_limits<float>::infinity());
100   }
f3FLATBUFFERS_FINAL_CLASS101   float f3() const {
102     return GetField<float>(VT_F3, -std::numeric_limits<float>::infinity());
103   }
104   bool mutate_f3(float _f3 = -std::numeric_limits<float>::infinity()) {
105     return SetField<float>(VT_F3, _f3, -std::numeric_limits<float>::infinity());
106   }
dvecFLATBUFFERS_FINAL_CLASS107   const flatbuffers::Vector<double> *dvec() const {
108     return GetPointer<const flatbuffers::Vector<double> *>(VT_DVEC);
109   }
mutable_dvecFLATBUFFERS_FINAL_CLASS110   flatbuffers::Vector<double> *mutable_dvec() {
111     return GetPointer<flatbuffers::Vector<double> *>(VT_DVEC);
112   }
fvecFLATBUFFERS_FINAL_CLASS113   const flatbuffers::Vector<float> *fvec() const {
114     return GetPointer<const flatbuffers::Vector<float> *>(VT_FVEC);
115   }
mutable_fvecFLATBUFFERS_FINAL_CLASS116   flatbuffers::Vector<float> *mutable_fvec() {
117     return GetPointer<flatbuffers::Vector<float> *>(VT_FVEC);
118   }
VerifyFLATBUFFERS_FINAL_CLASS119   bool Verify(flatbuffers::Verifier &verifier) const {
120     return VerifyTableStart(verifier) &&
121            VerifyField<double>(verifier, VT_D0, 8) &&
122            VerifyField<double>(verifier, VT_D1, 8) &&
123            VerifyField<double>(verifier, VT_D2, 8) &&
124            VerifyField<double>(verifier, VT_D3, 8) &&
125            VerifyField<float>(verifier, VT_F0, 4) &&
126            VerifyField<float>(verifier, VT_F1, 4) &&
127            VerifyField<float>(verifier, VT_F2, 4) &&
128            VerifyField<float>(verifier, VT_F3, 4) &&
129            VerifyOffset(verifier, VT_DVEC) &&
130            verifier.VerifyVector(dvec()) &&
131            VerifyOffset(verifier, VT_FVEC) &&
132            verifier.VerifyVector(fvec()) &&
133            verifier.EndTable();
134   }
135   MonsterExtraT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const;
136   void UnPackTo(MonsterExtraT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const;
137   static flatbuffers::Offset<MonsterExtra> Pack(flatbuffers::FlatBufferBuilder &_fbb, const MonsterExtraT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr);
138 };
139 
140 struct MonsterExtraBuilder {
141   typedef MonsterExtra Table;
142   flatbuffers::FlatBufferBuilder &fbb_;
143   flatbuffers::uoffset_t start_;
add_d0MonsterExtraBuilder144   void add_d0(double d0) {
145     fbb_.AddElement<double>(MonsterExtra::VT_D0, d0, std::numeric_limits<double>::quiet_NaN());
146   }
add_d1MonsterExtraBuilder147   void add_d1(double d1) {
148     fbb_.AddElement<double>(MonsterExtra::VT_D1, d1, std::numeric_limits<double>::quiet_NaN());
149   }
add_d2MonsterExtraBuilder150   void add_d2(double d2) {
151     fbb_.AddElement<double>(MonsterExtra::VT_D2, d2, std::numeric_limits<double>::infinity());
152   }
add_d3MonsterExtraBuilder153   void add_d3(double d3) {
154     fbb_.AddElement<double>(MonsterExtra::VT_D3, d3, -std::numeric_limits<double>::infinity());
155   }
add_f0MonsterExtraBuilder156   void add_f0(float f0) {
157     fbb_.AddElement<float>(MonsterExtra::VT_F0, f0, std::numeric_limits<float>::quiet_NaN());
158   }
add_f1MonsterExtraBuilder159   void add_f1(float f1) {
160     fbb_.AddElement<float>(MonsterExtra::VT_F1, f1, std::numeric_limits<float>::quiet_NaN());
161   }
add_f2MonsterExtraBuilder162   void add_f2(float f2) {
163     fbb_.AddElement<float>(MonsterExtra::VT_F2, f2, std::numeric_limits<float>::infinity());
164   }
add_f3MonsterExtraBuilder165   void add_f3(float f3) {
166     fbb_.AddElement<float>(MonsterExtra::VT_F3, f3, -std::numeric_limits<float>::infinity());
167   }
add_dvecMonsterExtraBuilder168   void add_dvec(flatbuffers::Offset<flatbuffers::Vector<double>> dvec) {
169     fbb_.AddOffset(MonsterExtra::VT_DVEC, dvec);
170   }
add_fvecMonsterExtraBuilder171   void add_fvec(flatbuffers::Offset<flatbuffers::Vector<float>> fvec) {
172     fbb_.AddOffset(MonsterExtra::VT_FVEC, fvec);
173   }
MonsterExtraBuilderMonsterExtraBuilder174   explicit MonsterExtraBuilder(flatbuffers::FlatBufferBuilder &_fbb)
175         : fbb_(_fbb) {
176     start_ = fbb_.StartTable();
177   }
FinishMonsterExtraBuilder178   flatbuffers::Offset<MonsterExtra> Finish() {
179     const auto end = fbb_.EndTable(start_);
180     auto o = flatbuffers::Offset<MonsterExtra>(end);
181     return o;
182   }
183 };
184 
185 inline flatbuffers::Offset<MonsterExtra> CreateMonsterExtra(
186     flatbuffers::FlatBufferBuilder &_fbb,
187     double d0 = std::numeric_limits<double>::quiet_NaN(),
188     double d1 = std::numeric_limits<double>::quiet_NaN(),
189     double d2 = std::numeric_limits<double>::infinity(),
190     double d3 = -std::numeric_limits<double>::infinity(),
191     float f0 = std::numeric_limits<float>::quiet_NaN(),
192     float f1 = std::numeric_limits<float>::quiet_NaN(),
193     float f2 = std::numeric_limits<float>::infinity(),
194     float f3 = -std::numeric_limits<float>::infinity(),
195     flatbuffers::Offset<flatbuffers::Vector<double>> dvec = 0,
196     flatbuffers::Offset<flatbuffers::Vector<float>> fvec = 0) {
197   MonsterExtraBuilder builder_(_fbb);
198   builder_.add_d3(d3);
199   builder_.add_d2(d2);
200   builder_.add_d1(d1);
201   builder_.add_d0(d0);
202   builder_.add_fvec(fvec);
203   builder_.add_dvec(dvec);
204   builder_.add_f3(f3);
205   builder_.add_f2(f2);
206   builder_.add_f1(f1);
207   builder_.add_f0(f0);
208   return builder_.Finish();
209 }
210 
211 inline flatbuffers::Offset<MonsterExtra> CreateMonsterExtraDirect(
212     flatbuffers::FlatBufferBuilder &_fbb,
213     double d0 = std::numeric_limits<double>::quiet_NaN(),
214     double d1 = std::numeric_limits<double>::quiet_NaN(),
215     double d2 = std::numeric_limits<double>::infinity(),
216     double d3 = -std::numeric_limits<double>::infinity(),
217     float f0 = std::numeric_limits<float>::quiet_NaN(),
218     float f1 = std::numeric_limits<float>::quiet_NaN(),
219     float f2 = std::numeric_limits<float>::infinity(),
220     float f3 = -std::numeric_limits<float>::infinity(),
221     const std::vector<double> *dvec = nullptr,
222     const std::vector<float> *fvec = nullptr) {
223   auto dvec__ = dvec ? _fbb.CreateVector<double>(*dvec) : 0;
224   auto fvec__ = fvec ? _fbb.CreateVector<float>(*fvec) : 0;
225   return MyGame::CreateMonsterExtra(
226       _fbb,
227       d0,
228       d1,
229       d2,
230       d3,
231       f0,
232       f1,
233       f2,
234       f3,
235       dvec__,
236       fvec__);
237 }
238 
239 flatbuffers::Offset<MonsterExtra> CreateMonsterExtra(flatbuffers::FlatBufferBuilder &_fbb, const MonsterExtraT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr);
240 
241 
242 inline bool operator==(const MonsterExtraT &lhs, const MonsterExtraT &rhs) {
243   return
244       (lhs.d0 == rhs.d0) &&
245       (lhs.d1 == rhs.d1) &&
246       (lhs.d2 == rhs.d2) &&
247       (lhs.d3 == rhs.d3) &&
248       (lhs.f0 == rhs.f0) &&
249       (lhs.f1 == rhs.f1) &&
250       (lhs.f2 == rhs.f2) &&
251       (lhs.f3 == rhs.f3) &&
252       (lhs.dvec == rhs.dvec) &&
253       (lhs.fvec == rhs.fvec);
254 }
255 
256 inline bool operator!=(const MonsterExtraT &lhs, const MonsterExtraT &rhs) {
257     return !(lhs == rhs);
258 }
259 
260 
UnPack(const flatbuffers::resolver_function_t * _resolver)261 inline MonsterExtraT *MonsterExtra::UnPack(const flatbuffers::resolver_function_t *_resolver) const {
262   auto _o = std::unique_ptr<MonsterExtraT>(new MonsterExtraT());
263   UnPackTo(_o.get(), _resolver);
264   return _o.release();
265 }
266 
UnPackTo(MonsterExtraT * _o,const flatbuffers::resolver_function_t * _resolver)267 inline void MonsterExtra::UnPackTo(MonsterExtraT *_o, const flatbuffers::resolver_function_t *_resolver) const {
268   (void)_o;
269   (void)_resolver;
270   { auto _e = d0(); _o->d0 = _e; }
271   { auto _e = d1(); _o->d1 = _e; }
272   { auto _e = d2(); _o->d2 = _e; }
273   { auto _e = d3(); _o->d3 = _e; }
274   { auto _e = f0(); _o->f0 = _e; }
275   { auto _e = f1(); _o->f1 = _e; }
276   { auto _e = f2(); _o->f2 = _e; }
277   { auto _e = f3(); _o->f3 = _e; }
278   { auto _e = dvec(); if (_e) { _o->dvec.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->dvec[_i] = _e->Get(_i); } } }
279   { auto _e = fvec(); if (_e) { _o->fvec.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->fvec[_i] = _e->Get(_i); } } }
280 }
281 
Pack(flatbuffers::FlatBufferBuilder & _fbb,const MonsterExtraT * _o,const flatbuffers::rehasher_function_t * _rehasher)282 inline flatbuffers::Offset<MonsterExtra> MonsterExtra::Pack(flatbuffers::FlatBufferBuilder &_fbb, const MonsterExtraT* _o, const flatbuffers::rehasher_function_t *_rehasher) {
283   return CreateMonsterExtra(_fbb, _o, _rehasher);
284 }
285 
CreateMonsterExtra(flatbuffers::FlatBufferBuilder & _fbb,const MonsterExtraT * _o,const flatbuffers::rehasher_function_t * _rehasher)286 inline flatbuffers::Offset<MonsterExtra> CreateMonsterExtra(flatbuffers::FlatBufferBuilder &_fbb, const MonsterExtraT *_o, const flatbuffers::rehasher_function_t *_rehasher) {
287   (void)_rehasher;
288   (void)_o;
289   struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const MonsterExtraT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va;
290   auto _d0 = _o->d0;
291   auto _d1 = _o->d1;
292   auto _d2 = _o->d2;
293   auto _d3 = _o->d3;
294   auto _f0 = _o->f0;
295   auto _f1 = _o->f1;
296   auto _f2 = _o->f2;
297   auto _f3 = _o->f3;
298   auto _dvec = _o->dvec.size() ? _fbb.CreateVector(_o->dvec) : 0;
299   auto _fvec = _o->fvec.size() ? _fbb.CreateVector(_o->fvec) : 0;
300   return MyGame::CreateMonsterExtra(
301       _fbb,
302       _d0,
303       _d1,
304       _d2,
305       _d3,
306       _f0,
307       _f1,
308       _f2,
309       _f3,
310       _dvec,
311       _fvec);
312 }
313 
MonsterExtraTypeTable()314 inline const flatbuffers::TypeTable *MonsterExtraTypeTable() {
315   static const flatbuffers::TypeCode type_codes[] = {
316     { flatbuffers::ET_DOUBLE, 0, -1 },
317     { flatbuffers::ET_DOUBLE, 0, -1 },
318     { flatbuffers::ET_DOUBLE, 0, -1 },
319     { flatbuffers::ET_DOUBLE, 0, -1 },
320     { flatbuffers::ET_FLOAT, 0, -1 },
321     { flatbuffers::ET_FLOAT, 0, -1 },
322     { flatbuffers::ET_FLOAT, 0, -1 },
323     { flatbuffers::ET_FLOAT, 0, -1 },
324     { flatbuffers::ET_DOUBLE, 1, -1 },
325     { flatbuffers::ET_FLOAT, 1, -1 },
326     { flatbuffers::ET_INT, 0, -1 }
327   };
328   static const char * const names[] = {
329     "d0",
330     "d1",
331     "d2",
332     "d3",
333     "f0",
334     "f1",
335     "f2",
336     "f3",
337     "dvec",
338     "fvec",
339     "deprec"
340   };
341   static const flatbuffers::TypeTable tt = {
342     flatbuffers::ST_TABLE, 11, type_codes, nullptr, nullptr, nullptr, names
343   };
344   return &tt;
345 }
346 
GetMonsterExtra(const void * buf)347 inline const MyGame::MonsterExtra *GetMonsterExtra(const void *buf) {
348   return flatbuffers::GetRoot<MyGame::MonsterExtra>(buf);
349 }
350 
GetSizePrefixedMonsterExtra(const void * buf)351 inline const MyGame::MonsterExtra *GetSizePrefixedMonsterExtra(const void *buf) {
352   return flatbuffers::GetSizePrefixedRoot<MyGame::MonsterExtra>(buf);
353 }
354 
GetMutableMonsterExtra(void * buf)355 inline MonsterExtra *GetMutableMonsterExtra(void *buf) {
356   return flatbuffers::GetMutableRoot<MonsterExtra>(buf);
357 }
358 
GetMutableSizePrefixedMonsterExtra(void * buf)359 inline MyGame::MonsterExtra *GetMutableSizePrefixedMonsterExtra(void *buf) {
360   return flatbuffers::GetMutableSizePrefixedRoot<MyGame::MonsterExtra>(buf);
361 }
362 
MonsterExtraIdentifier()363 inline const char *MonsterExtraIdentifier() {
364   return "MONE";
365 }
366 
MonsterExtraBufferHasIdentifier(const void * buf)367 inline bool MonsterExtraBufferHasIdentifier(const void *buf) {
368   return flatbuffers::BufferHasIdentifier(
369       buf, MonsterExtraIdentifier());
370 }
371 
SizePrefixedMonsterExtraBufferHasIdentifier(const void * buf)372 inline bool SizePrefixedMonsterExtraBufferHasIdentifier(const void *buf) {
373   return flatbuffers::BufferHasIdentifier(
374       buf, MonsterExtraIdentifier(), true);
375 }
376 
VerifyMonsterExtraBuffer(flatbuffers::Verifier & verifier)377 inline bool VerifyMonsterExtraBuffer(
378     flatbuffers::Verifier &verifier) {
379   return verifier.VerifyBuffer<MyGame::MonsterExtra>(MonsterExtraIdentifier());
380 }
381 
VerifySizePrefixedMonsterExtraBuffer(flatbuffers::Verifier & verifier)382 inline bool VerifySizePrefixedMonsterExtraBuffer(
383     flatbuffers::Verifier &verifier) {
384   return verifier.VerifySizePrefixedBuffer<MyGame::MonsterExtra>(MonsterExtraIdentifier());
385 }
386 
MonsterExtraExtension()387 inline const char *MonsterExtraExtension() {
388   return "mon";
389 }
390 
FinishMonsterExtraBuffer(flatbuffers::FlatBufferBuilder & fbb,flatbuffers::Offset<MyGame::MonsterExtra> root)391 inline void FinishMonsterExtraBuffer(
392     flatbuffers::FlatBufferBuilder &fbb,
393     flatbuffers::Offset<MyGame::MonsterExtra> root) {
394   fbb.Finish(root, MonsterExtraIdentifier());
395 }
396 
FinishSizePrefixedMonsterExtraBuffer(flatbuffers::FlatBufferBuilder & fbb,flatbuffers::Offset<MyGame::MonsterExtra> root)397 inline void FinishSizePrefixedMonsterExtraBuffer(
398     flatbuffers::FlatBufferBuilder &fbb,
399     flatbuffers::Offset<MyGame::MonsterExtra> root) {
400   fbb.FinishSizePrefixed(root, MonsterExtraIdentifier());
401 }
402 
403 inline flatbuffers::unique_ptr<MyGame::MonsterExtraT> UnPackMonsterExtra(
404     const void *buf,
405     const flatbuffers::resolver_function_t *res = nullptr) {
406   return flatbuffers::unique_ptr<MyGame::MonsterExtraT>(GetMonsterExtra(buf)->UnPack(res));
407 }
408 
409 inline flatbuffers::unique_ptr<MyGame::MonsterExtraT> UnPackSizePrefixedMonsterExtra(
410     const void *buf,
411     const flatbuffers::resolver_function_t *res = nullptr) {
412   return flatbuffers::unique_ptr<MyGame::MonsterExtraT>(GetSizePrefixedMonsterExtra(buf)->UnPack(res));
413 }
414 
415 }  // namespace MyGame
416 
417 #endif  // FLATBUFFERS_GENERATED_MONSTEREXTRA_MYGAME_H_
418