• 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 namespace MyGame {
10 
11 struct MonsterExtra;
12 struct MonsterExtraBuilder;
13 struct MonsterExtraT;
14 
15 bool operator==(const MonsterExtraT &lhs, const MonsterExtraT &rhs);
16 bool operator!=(const MonsterExtraT &lhs, const MonsterExtraT &rhs);
17 
18 inline const flatbuffers::TypeTable *MonsterExtraTypeTable();
19 
20 struct MonsterExtraT : public flatbuffers::NativeTable {
21   typedef MonsterExtra TableType;
22   double d0;
23   double d1;
24   double d2;
25   double d3;
26   float f0;
27   float f1;
28   float f2;
29   float f3;
30   std::vector<double> dvec;
31   std::vector<float> fvec;
MonsterExtraTMonsterExtraT32   MonsterExtraT()
33       : d0(std::numeric_limits<double>::quiet_NaN()),
34         d1(std::numeric_limits<double>::quiet_NaN()),
35         d2(std::numeric_limits<double>::infinity()),
36         d3(-std::numeric_limits<double>::infinity()),
37         f0(std::numeric_limits<float>::quiet_NaN()),
38         f1(std::numeric_limits<float>::quiet_NaN()),
39         f2(std::numeric_limits<float>::infinity()),
40         f3(-std::numeric_limits<float>::infinity()) {
41   }
42 };
43 
44 inline bool operator==(const MonsterExtraT &lhs, const MonsterExtraT &rhs) {
45   return
46       (lhs.d0 == rhs.d0) &&
47       (lhs.d1 == rhs.d1) &&
48       (lhs.d2 == rhs.d2) &&
49       (lhs.d3 == rhs.d3) &&
50       (lhs.f0 == rhs.f0) &&
51       (lhs.f1 == rhs.f1) &&
52       (lhs.f2 == rhs.f2) &&
53       (lhs.f3 == rhs.f3) &&
54       (lhs.dvec == rhs.dvec) &&
55       (lhs.fvec == rhs.fvec);
56 }
57 
58 inline bool operator!=(const MonsterExtraT &lhs, const MonsterExtraT &rhs) {
59     return !(lhs == rhs);
60 }
61 
62 
63 struct MonsterExtra FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
64   typedef MonsterExtraT NativeTableType;
65   typedef MonsterExtraBuilder Builder;
MiniReflectTypeTableFLATBUFFERS_FINAL_CLASS66   static const flatbuffers::TypeTable *MiniReflectTypeTable() {
67     return MonsterExtraTypeTable();
68   }
69   enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
70     VT_D0 = 4,
71     VT_D1 = 6,
72     VT_D2 = 8,
73     VT_D3 = 10,
74     VT_F0 = 12,
75     VT_F1 = 14,
76     VT_F2 = 16,
77     VT_F3 = 18,
78     VT_DVEC = 20,
79     VT_FVEC = 22
80   };
d0FLATBUFFERS_FINAL_CLASS81   double d0() const {
82     return GetField<double>(VT_D0, std::numeric_limits<double>::quiet_NaN());
83   }
mutate_d0FLATBUFFERS_FINAL_CLASS84   bool mutate_d0(double _d0) {
85     return SetField<double>(VT_D0, _d0, std::numeric_limits<double>::quiet_NaN());
86   }
d1FLATBUFFERS_FINAL_CLASS87   double d1() const {
88     return GetField<double>(VT_D1, std::numeric_limits<double>::quiet_NaN());
89   }
mutate_d1FLATBUFFERS_FINAL_CLASS90   bool mutate_d1(double _d1) {
91     return SetField<double>(VT_D1, _d1, std::numeric_limits<double>::quiet_NaN());
92   }
d2FLATBUFFERS_FINAL_CLASS93   double d2() const {
94     return GetField<double>(VT_D2, std::numeric_limits<double>::infinity());
95   }
mutate_d2FLATBUFFERS_FINAL_CLASS96   bool mutate_d2(double _d2) {
97     return SetField<double>(VT_D2, _d2, std::numeric_limits<double>::infinity());
98   }
d3FLATBUFFERS_FINAL_CLASS99   double d3() const {
100     return GetField<double>(VT_D3, -std::numeric_limits<double>::infinity());
101   }
mutate_d3FLATBUFFERS_FINAL_CLASS102   bool mutate_d3(double _d3) {
103     return SetField<double>(VT_D3, _d3, -std::numeric_limits<double>::infinity());
104   }
f0FLATBUFFERS_FINAL_CLASS105   float f0() const {
106     return GetField<float>(VT_F0, std::numeric_limits<float>::quiet_NaN());
107   }
mutate_f0FLATBUFFERS_FINAL_CLASS108   bool mutate_f0(float _f0) {
109     return SetField<float>(VT_F0, _f0, std::numeric_limits<float>::quiet_NaN());
110   }
f1FLATBUFFERS_FINAL_CLASS111   float f1() const {
112     return GetField<float>(VT_F1, std::numeric_limits<float>::quiet_NaN());
113   }
mutate_f1FLATBUFFERS_FINAL_CLASS114   bool mutate_f1(float _f1) {
115     return SetField<float>(VT_F1, _f1, std::numeric_limits<float>::quiet_NaN());
116   }
f2FLATBUFFERS_FINAL_CLASS117   float f2() const {
118     return GetField<float>(VT_F2, std::numeric_limits<float>::infinity());
119   }
mutate_f2FLATBUFFERS_FINAL_CLASS120   bool mutate_f2(float _f2) {
121     return SetField<float>(VT_F2, _f2, std::numeric_limits<float>::infinity());
122   }
f3FLATBUFFERS_FINAL_CLASS123   float f3() const {
124     return GetField<float>(VT_F3, -std::numeric_limits<float>::infinity());
125   }
mutate_f3FLATBUFFERS_FINAL_CLASS126   bool mutate_f3(float _f3) {
127     return SetField<float>(VT_F3, _f3, -std::numeric_limits<float>::infinity());
128   }
dvecFLATBUFFERS_FINAL_CLASS129   const flatbuffers::Vector<double> *dvec() const {
130     return GetPointer<const flatbuffers::Vector<double> *>(VT_DVEC);
131   }
mutable_dvecFLATBUFFERS_FINAL_CLASS132   flatbuffers::Vector<double> *mutable_dvec() {
133     return GetPointer<flatbuffers::Vector<double> *>(VT_DVEC);
134   }
fvecFLATBUFFERS_FINAL_CLASS135   const flatbuffers::Vector<float> *fvec() const {
136     return GetPointer<const flatbuffers::Vector<float> *>(VT_FVEC);
137   }
mutable_fvecFLATBUFFERS_FINAL_CLASS138   flatbuffers::Vector<float> *mutable_fvec() {
139     return GetPointer<flatbuffers::Vector<float> *>(VT_FVEC);
140   }
VerifyFLATBUFFERS_FINAL_CLASS141   bool Verify(flatbuffers::Verifier &verifier) const {
142     return VerifyTableStart(verifier) &&
143            VerifyField<double>(verifier, VT_D0) &&
144            VerifyField<double>(verifier, VT_D1) &&
145            VerifyField<double>(verifier, VT_D2) &&
146            VerifyField<double>(verifier, VT_D3) &&
147            VerifyField<float>(verifier, VT_F0) &&
148            VerifyField<float>(verifier, VT_F1) &&
149            VerifyField<float>(verifier, VT_F2) &&
150            VerifyField<float>(verifier, VT_F3) &&
151            VerifyOffset(verifier, VT_DVEC) &&
152            verifier.VerifyVector(dvec()) &&
153            VerifyOffset(verifier, VT_FVEC) &&
154            verifier.VerifyVector(fvec()) &&
155            verifier.EndTable();
156   }
157   MonsterExtraT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const;
158   void UnPackTo(MonsterExtraT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const;
159   static flatbuffers::Offset<MonsterExtra> Pack(flatbuffers::FlatBufferBuilder &_fbb, const MonsterExtraT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr);
160 };
161 
162 struct MonsterExtraBuilder {
163   typedef MonsterExtra Table;
164   flatbuffers::FlatBufferBuilder &fbb_;
165   flatbuffers::uoffset_t start_;
add_d0MonsterExtraBuilder166   void add_d0(double d0) {
167     fbb_.AddElement<double>(MonsterExtra::VT_D0, d0, std::numeric_limits<double>::quiet_NaN());
168   }
add_d1MonsterExtraBuilder169   void add_d1(double d1) {
170     fbb_.AddElement<double>(MonsterExtra::VT_D1, d1, std::numeric_limits<double>::quiet_NaN());
171   }
add_d2MonsterExtraBuilder172   void add_d2(double d2) {
173     fbb_.AddElement<double>(MonsterExtra::VT_D2, d2, std::numeric_limits<double>::infinity());
174   }
add_d3MonsterExtraBuilder175   void add_d3(double d3) {
176     fbb_.AddElement<double>(MonsterExtra::VT_D3, d3, -std::numeric_limits<double>::infinity());
177   }
add_f0MonsterExtraBuilder178   void add_f0(float f0) {
179     fbb_.AddElement<float>(MonsterExtra::VT_F0, f0, std::numeric_limits<float>::quiet_NaN());
180   }
add_f1MonsterExtraBuilder181   void add_f1(float f1) {
182     fbb_.AddElement<float>(MonsterExtra::VT_F1, f1, std::numeric_limits<float>::quiet_NaN());
183   }
add_f2MonsterExtraBuilder184   void add_f2(float f2) {
185     fbb_.AddElement<float>(MonsterExtra::VT_F2, f2, std::numeric_limits<float>::infinity());
186   }
add_f3MonsterExtraBuilder187   void add_f3(float f3) {
188     fbb_.AddElement<float>(MonsterExtra::VT_F3, f3, -std::numeric_limits<float>::infinity());
189   }
add_dvecMonsterExtraBuilder190   void add_dvec(flatbuffers::Offset<flatbuffers::Vector<double>> dvec) {
191     fbb_.AddOffset(MonsterExtra::VT_DVEC, dvec);
192   }
add_fvecMonsterExtraBuilder193   void add_fvec(flatbuffers::Offset<flatbuffers::Vector<float>> fvec) {
194     fbb_.AddOffset(MonsterExtra::VT_FVEC, fvec);
195   }
MonsterExtraBuilderMonsterExtraBuilder196   explicit MonsterExtraBuilder(flatbuffers::FlatBufferBuilder &_fbb)
197         : fbb_(_fbb) {
198     start_ = fbb_.StartTable();
199   }
200   MonsterExtraBuilder &operator=(const MonsterExtraBuilder &);
FinishMonsterExtraBuilder201   flatbuffers::Offset<MonsterExtra> Finish() {
202     const auto end = fbb_.EndTable(start_);
203     auto o = flatbuffers::Offset<MonsterExtra>(end);
204     return o;
205   }
206 };
207 
208 inline flatbuffers::Offset<MonsterExtra> CreateMonsterExtra(
209     flatbuffers::FlatBufferBuilder &_fbb,
210     double d0 = std::numeric_limits<double>::quiet_NaN(),
211     double d1 = std::numeric_limits<double>::quiet_NaN(),
212     double d2 = std::numeric_limits<double>::infinity(),
213     double d3 = -std::numeric_limits<double>::infinity(),
214     float f0 = std::numeric_limits<float>::quiet_NaN(),
215     float f1 = std::numeric_limits<float>::quiet_NaN(),
216     float f2 = std::numeric_limits<float>::infinity(),
217     float f3 = -std::numeric_limits<float>::infinity(),
218     flatbuffers::Offset<flatbuffers::Vector<double>> dvec = 0,
219     flatbuffers::Offset<flatbuffers::Vector<float>> fvec = 0) {
220   MonsterExtraBuilder builder_(_fbb);
221   builder_.add_d3(d3);
222   builder_.add_d2(d2);
223   builder_.add_d1(d1);
224   builder_.add_d0(d0);
225   builder_.add_fvec(fvec);
226   builder_.add_dvec(dvec);
227   builder_.add_f3(f3);
228   builder_.add_f2(f2);
229   builder_.add_f1(f1);
230   builder_.add_f0(f0);
231   return builder_.Finish();
232 }
233 
234 inline flatbuffers::Offset<MonsterExtra> CreateMonsterExtraDirect(
235     flatbuffers::FlatBufferBuilder &_fbb,
236     double d0 = std::numeric_limits<double>::quiet_NaN(),
237     double d1 = std::numeric_limits<double>::quiet_NaN(),
238     double d2 = std::numeric_limits<double>::infinity(),
239     double d3 = -std::numeric_limits<double>::infinity(),
240     float f0 = std::numeric_limits<float>::quiet_NaN(),
241     float f1 = std::numeric_limits<float>::quiet_NaN(),
242     float f2 = std::numeric_limits<float>::infinity(),
243     float f3 = -std::numeric_limits<float>::infinity(),
244     const std::vector<double> *dvec = nullptr,
245     const std::vector<float> *fvec = nullptr) {
246   auto dvec__ = dvec ? _fbb.CreateVector<double>(*dvec) : 0;
247   auto fvec__ = fvec ? _fbb.CreateVector<float>(*fvec) : 0;
248   return MyGame::CreateMonsterExtra(
249       _fbb,
250       d0,
251       d1,
252       d2,
253       d3,
254       f0,
255       f1,
256       f2,
257       f3,
258       dvec__,
259       fvec__);
260 }
261 
262 flatbuffers::Offset<MonsterExtra> CreateMonsterExtra(flatbuffers::FlatBufferBuilder &_fbb, const MonsterExtraT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr);
263 
UnPack(const flatbuffers::resolver_function_t * _resolver)264 inline MonsterExtraT *MonsterExtra::UnPack(const flatbuffers::resolver_function_t *_resolver) const {
265   flatbuffers::unique_ptr<MyGame::MonsterExtraT> _o = flatbuffers::unique_ptr<MyGame::MonsterExtraT>(new MonsterExtraT());
266   UnPackTo(_o.get(), _resolver);
267   return _o.release();
268 }
269 
UnPackTo(MonsterExtraT * _o,const flatbuffers::resolver_function_t * _resolver)270 inline void MonsterExtra::UnPackTo(MonsterExtraT *_o, const flatbuffers::resolver_function_t *_resolver) const {
271   (void)_o;
272   (void)_resolver;
273   { auto _e = d0(); _o->d0 = _e; }
274   { auto _e = d1(); _o->d1 = _e; }
275   { auto _e = d2(); _o->d2 = _e; }
276   { auto _e = d3(); _o->d3 = _e; }
277   { auto _e = f0(); _o->f0 = _e; }
278   { auto _e = f1(); _o->f1 = _e; }
279   { auto _e = f2(); _o->f2 = _e; }
280   { auto _e = f3(); _o->f3 = _e; }
281   { 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); } } }
282   { 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); } } }
283 }
284 
Pack(flatbuffers::FlatBufferBuilder & _fbb,const MonsterExtraT * _o,const flatbuffers::rehasher_function_t * _rehasher)285 inline flatbuffers::Offset<MonsterExtra> MonsterExtra::Pack(flatbuffers::FlatBufferBuilder &_fbb, const MonsterExtraT* _o, const flatbuffers::rehasher_function_t *_rehasher) {
286   return CreateMonsterExtra(_fbb, _o, _rehasher);
287 }
288 
CreateMonsterExtra(flatbuffers::FlatBufferBuilder & _fbb,const MonsterExtraT * _o,const flatbuffers::rehasher_function_t * _rehasher)289 inline flatbuffers::Offset<MonsterExtra> CreateMonsterExtra(flatbuffers::FlatBufferBuilder &_fbb, const MonsterExtraT *_o, const flatbuffers::rehasher_function_t *_rehasher) {
290   (void)_rehasher;
291   (void)_o;
292   struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const MonsterExtraT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va;
293   auto _d0 = _o->d0;
294   auto _d1 = _o->d1;
295   auto _d2 = _o->d2;
296   auto _d3 = _o->d3;
297   auto _f0 = _o->f0;
298   auto _f1 = _o->f1;
299   auto _f2 = _o->f2;
300   auto _f3 = _o->f3;
301   auto _dvec = _o->dvec.size() ? _fbb.CreateVector(_o->dvec) : 0;
302   auto _fvec = _o->fvec.size() ? _fbb.CreateVector(_o->fvec) : 0;
303   return MyGame::CreateMonsterExtra(
304       _fbb,
305       _d0,
306       _d1,
307       _d2,
308       _d3,
309       _f0,
310       _f1,
311       _f2,
312       _f3,
313       _dvec,
314       _fvec);
315 }
316 
MonsterExtraTypeTable()317 inline const flatbuffers::TypeTable *MonsterExtraTypeTable() {
318   static const flatbuffers::TypeCode type_codes[] = {
319     { flatbuffers::ET_DOUBLE, 0, -1 },
320     { flatbuffers::ET_DOUBLE, 0, -1 },
321     { flatbuffers::ET_DOUBLE, 0, -1 },
322     { flatbuffers::ET_DOUBLE, 0, -1 },
323     { flatbuffers::ET_FLOAT, 0, -1 },
324     { flatbuffers::ET_FLOAT, 0, -1 },
325     { flatbuffers::ET_FLOAT, 0, -1 },
326     { flatbuffers::ET_FLOAT, 0, -1 },
327     { flatbuffers::ET_DOUBLE, 1, -1 },
328     { flatbuffers::ET_FLOAT, 1, -1 },
329     { flatbuffers::ET_INT, 0, -1 }
330   };
331   static const char * const names[] = {
332     "d0",
333     "d1",
334     "d2",
335     "d3",
336     "f0",
337     "f1",
338     "f2",
339     "f3",
340     "dvec",
341     "fvec",
342     "deprec"
343   };
344   static const flatbuffers::TypeTable tt = {
345     flatbuffers::ST_TABLE, 11, type_codes, nullptr, nullptr, names
346   };
347   return &tt;
348 }
349 
GetMonsterExtra(const void * buf)350 inline const MyGame::MonsterExtra *GetMonsterExtra(const void *buf) {
351   return flatbuffers::GetRoot<MyGame::MonsterExtra>(buf);
352 }
353 
GetSizePrefixedMonsterExtra(const void * buf)354 inline const MyGame::MonsterExtra *GetSizePrefixedMonsterExtra(const void *buf) {
355   return flatbuffers::GetSizePrefixedRoot<MyGame::MonsterExtra>(buf);
356 }
357 
GetMutableMonsterExtra(void * buf)358 inline MonsterExtra *GetMutableMonsterExtra(void *buf) {
359   return flatbuffers::GetMutableRoot<MonsterExtra>(buf);
360 }
361 
MonsterExtraIdentifier()362 inline const char *MonsterExtraIdentifier() {
363   return "MONE";
364 }
365 
MonsterExtraBufferHasIdentifier(const void * buf)366 inline bool MonsterExtraBufferHasIdentifier(const void *buf) {
367   return flatbuffers::BufferHasIdentifier(
368       buf, MonsterExtraIdentifier());
369 }
370 
VerifyMonsterExtraBuffer(flatbuffers::Verifier & verifier)371 inline bool VerifyMonsterExtraBuffer(
372     flatbuffers::Verifier &verifier) {
373   return verifier.VerifyBuffer<MyGame::MonsterExtra>(MonsterExtraIdentifier());
374 }
375 
VerifySizePrefixedMonsterExtraBuffer(flatbuffers::Verifier & verifier)376 inline bool VerifySizePrefixedMonsterExtraBuffer(
377     flatbuffers::Verifier &verifier) {
378   return verifier.VerifySizePrefixedBuffer<MyGame::MonsterExtra>(MonsterExtraIdentifier());
379 }
380 
MonsterExtraExtension()381 inline const char *MonsterExtraExtension() {
382   return "mon";
383 }
384 
FinishMonsterExtraBuffer(flatbuffers::FlatBufferBuilder & fbb,flatbuffers::Offset<MyGame::MonsterExtra> root)385 inline void FinishMonsterExtraBuffer(
386     flatbuffers::FlatBufferBuilder &fbb,
387     flatbuffers::Offset<MyGame::MonsterExtra> root) {
388   fbb.Finish(root, MonsterExtraIdentifier());
389 }
390 
FinishSizePrefixedMonsterExtraBuffer(flatbuffers::FlatBufferBuilder & fbb,flatbuffers::Offset<MyGame::MonsterExtra> root)391 inline void FinishSizePrefixedMonsterExtraBuffer(
392     flatbuffers::FlatBufferBuilder &fbb,
393     flatbuffers::Offset<MyGame::MonsterExtra> root) {
394   fbb.FinishSizePrefixed(root, MonsterExtraIdentifier());
395 }
396 
397 inline flatbuffers::unique_ptr<MyGame::MonsterExtraT> UnPackMonsterExtra(
398     const void *buf,
399     const flatbuffers::resolver_function_t *res = nullptr) {
400   return flatbuffers::unique_ptr<MyGame::MonsterExtraT>(GetMonsterExtra(buf)->UnPack(res));
401 }
402 
403 inline flatbuffers::unique_ptr<MyGame::MonsterExtraT> UnPackSizePrefixedMonsterExtra(
404     const void *buf,
405     const flatbuffers::resolver_function_t *res = nullptr) {
406   return flatbuffers::unique_ptr<MyGame::MonsterExtraT>(GetSizePrefixedMonsterExtra(buf)->UnPack(res));
407 }
408 
409 }  // namespace MyGame
410 
411 #endif  // FLATBUFFERS_GENERATED_MONSTEREXTRA_MYGAME_H_
412