1 // automatically generated by the FlatBuffers compiler, do not modify
4 namespace MyGame_Example
6 /// Composite components of Monster color.
10 /// Green is bit_flag with value (1u << 1)
12 /// \brief color Blue (1u << 3)
24 Any_TestSimpleTableWithEnum = 2
25 Any_MyGame_Example2_Monster = 3
27 enum AnyUniqueAliases:
28 AnyUniqueAliases_NONE = 0
29 AnyUniqueAliases_M = 1
30 AnyUniqueAliases_TS = 2
31 AnyUniqueAliases_M2 = 3
33 enum AnyAmbiguousAliases:
34 AnyAmbiguousAliases_NONE = 0
35 AnyAmbiguousAliases_M1 = 1
36 AnyAmbiguousAliases_M2 = 2
37 AnyAmbiguousAliases_M3 = 3
41 class InParentNamespace
43 namespace MyGame_Example2
47 namespace MyGame_Example
51 class TestSimpleTableWithEnum
67 class InParentNamespace : flatbuffers_handle
69 def GetRootAsInParentNamespace(buf:string): return InParentNamespace { buf, buf.flatbuffers_indirect(0) }
71 struct InParentNamespaceBuilder:
72 b_:flatbuffers_builder
79 namespace MyGame_Example2
81 class Monster : flatbuffers_handle
83 def GetRootAsMonster(buf:string): return Monster { buf, buf.flatbuffers_indirect(0) }
85 struct MonsterBuilder:
86 b_:flatbuffers_builder
93 namespace MyGame_Example
95 class Test : flatbuffers_handle
97 return buf_.read_int16_le(pos_ + 0)
99 return buf_.read_int8_le(pos_ + 2)
101 def CreateTest(b_:flatbuffers_builder, a:int, b:int):
108 class TestSimpleTableWithEnum : flatbuffers_handle
110 return Color(buf_.flatbuffers_field_int8(pos_, 4, 2))
112 def GetRootAsTestSimpleTableWithEnum(buf:string): return TestSimpleTableWithEnum { buf, buf.flatbuffers_indirect(0) }
114 struct TestSimpleTableWithEnumBuilder:
115 b_:flatbuffers_builder
119 def add_color(color:Color):
120 b_.PrependUint8Slot(0, color, 2)
123 return b_.EndObject()
125 class Vec3 : flatbuffers_handle
127 return buf_.read_float32_le(pos_ + 0)
129 return buf_.read_float32_le(pos_ + 4)
131 return buf_.read_float32_le(pos_ + 8)
133 return buf_.read_float64_le(pos_ + 16)
135 return Color(buf_.read_int8_le(pos_ + 24))
137 return MyGame_Example_Test{ buf_, pos_ + 26 }
139 def CreateVec3(b_:flatbuffers_builder, x:float, y:float, z:float, test1:float, test2:Color, test3_a:int, test3_b:int):
144 b_.PrependInt8(test3_b)
145 b_.PrependInt16(test3_a)
147 b_.PrependUint8(test2)
148 b_.PrependFloat64(test1)
155 class Ability : flatbuffers_handle
157 return buf_.read_int32_le(pos_ + 0)
159 return buf_.read_int32_le(pos_ + 4)
161 def CreateAbility(b_:flatbuffers_builder, id:int, distance:int):
163 b_.PrependUint32(distance)
167 class Stat : flatbuffers_handle
169 return buf_.flatbuffers_field_string(pos_, 4)
171 return buf_.flatbuffers_field_int64(pos_, 6, 0)
173 return buf_.flatbuffers_field_int16(pos_, 8, 0)
175 def GetRootAsStat(buf:string): return Stat { buf, buf.flatbuffers_indirect(0) }
178 b_:flatbuffers_builder
182 def add_id(id:flatbuffers_offset):
183 b_.PrependUOffsetTRelativeSlot(0, id)
185 def add_val(val:int):
186 b_.PrependInt64Slot(1, val, 0)
188 def add_count(count:int):
189 b_.PrependUint16Slot(2, count, 0)
192 return b_.EndObject()
194 class Referrable : flatbuffers_handle
196 return buf_.flatbuffers_field_int64(pos_, 4, 0)
198 def GetRootAsReferrable(buf:string): return Referrable { buf, buf.flatbuffers_indirect(0) }
200 struct ReferrableBuilder:
201 b_:flatbuffers_builder
206 b_.PrependUint64Slot(0, id, 0)
209 return b_.EndObject()
211 /// an example documentation comment: monster object
212 class Monster : flatbuffers_handle
214 let o = buf_.flatbuffers_field_struct(pos_, 4)
215 return if o: MyGame_Example_Vec3 { buf_, o } else: nil
217 return buf_.flatbuffers_field_int16(pos_, 6, 150)
219 return buf_.flatbuffers_field_int16(pos_, 8, 100)
221 return buf_.flatbuffers_field_string(pos_, 10)
222 def inventory(i:int):
223 return buf_.read_int8_le(buf_.flatbuffers_field_vector(pos_, 14) + i * 1)
224 def inventory_length():
225 return buf_.flatbuffers_field_vector_len(pos_, 14)
227 return Color(buf_.flatbuffers_field_int8(pos_, 16, 8))
229 return Any(buf_.flatbuffers_field_int8(pos_, 18, 0))
230 def test_as_Monster():
231 return MyGame_Example_Monster { buf_, buf_.flatbuffers_field_table(pos_, 20) }
232 def test_as_TestSimpleTableWithEnum():
233 return MyGame_Example_TestSimpleTableWithEnum { buf_, buf_.flatbuffers_field_table(pos_, 20) }
234 def test_as_MyGame_Example2_Monster():
235 return MyGame_Example2_Monster { buf_, buf_.flatbuffers_field_table(pos_, 20) }
237 return MyGame_Example_Test { buf_, buf_.flatbuffers_field_vector(pos_, 22) + i * 4 }
239 return buf_.flatbuffers_field_vector_len(pos_, 22)
240 def testarrayofstring(i:int):
241 return buf_.flatbuffers_string(buf_.flatbuffers_field_vector(pos_, 24) + i * 4)
242 def testarrayofstring_length():
243 return buf_.flatbuffers_field_vector_len(pos_, 24)
244 /// an example documentation comment: this will end up in the generated code
246 def testarrayoftables(i:int):
247 return MyGame_Example_Monster { buf_, buf_.flatbuffers_indirect(buf_.flatbuffers_field_vector(pos_, 26) + i * 4) }
248 def testarrayoftables_length():
249 return buf_.flatbuffers_field_vector_len(pos_, 26)
251 let o = buf_.flatbuffers_field_table(pos_, 28)
252 return if o: MyGame_Example_Monster { buf_, o } else: nil
253 def testnestedflatbuffer(i:int):
254 return buf_.read_int8_le(buf_.flatbuffers_field_vector(pos_, 30) + i * 1)
255 def testnestedflatbuffer_length():
256 return buf_.flatbuffers_field_vector_len(pos_, 30)
258 let o = buf_.flatbuffers_field_table(pos_, 32)
259 return if o: MyGame_Example_Stat { buf_, o } else: nil
261 return buf_.flatbuffers_field_int8(pos_, 34, 0)
262 def testhashs32_fnv1():
263 return buf_.flatbuffers_field_int32(pos_, 36, 0)
264 def testhashu32_fnv1():
265 return buf_.flatbuffers_field_int32(pos_, 38, 0)
266 def testhashs64_fnv1():
267 return buf_.flatbuffers_field_int64(pos_, 40, 0)
268 def testhashu64_fnv1():
269 return buf_.flatbuffers_field_int64(pos_, 42, 0)
270 def testhashs32_fnv1a():
271 return buf_.flatbuffers_field_int32(pos_, 44, 0)
272 def testhashu32_fnv1a():
273 return buf_.flatbuffers_field_int32(pos_, 46, 0)
274 def testhashs64_fnv1a():
275 return buf_.flatbuffers_field_int64(pos_, 48, 0)
276 def testhashu64_fnv1a():
277 return buf_.flatbuffers_field_int64(pos_, 50, 0)
278 def testarrayofbools(i:int):
279 return buf_.read_int8_le(buf_.flatbuffers_field_vector(pos_, 52) + i * 1)
280 def testarrayofbools_length():
281 return buf_.flatbuffers_field_vector_len(pos_, 52)
283 return buf_.flatbuffers_field_float32(pos_, 54, 3.14159)
285 return buf_.flatbuffers_field_float32(pos_, 56, 3.0)
287 return buf_.flatbuffers_field_float32(pos_, 58, 0.0)
288 def testarrayofstring2(i:int):
289 return buf_.flatbuffers_string(buf_.flatbuffers_field_vector(pos_, 60) + i * 4)
290 def testarrayofstring2_length():
291 return buf_.flatbuffers_field_vector_len(pos_, 60)
292 def testarrayofsortedstruct(i:int):
293 return MyGame_Example_Ability { buf_, buf_.flatbuffers_field_vector(pos_, 62) + i * 8 }
294 def testarrayofsortedstruct_length():
295 return buf_.flatbuffers_field_vector_len(pos_, 62)
297 return buf_.read_int8_le(buf_.flatbuffers_field_vector(pos_, 64) + i * 1)
299 return buf_.flatbuffers_field_vector_len(pos_, 64)
301 return MyGame_Example_Test { buf_, buf_.flatbuffers_field_vector(pos_, 66) + i * 4 }
303 return buf_.flatbuffers_field_vector_len(pos_, 66)
304 def vector_of_longs(i:int):
305 return buf_.read_int64_le(buf_.flatbuffers_field_vector(pos_, 68) + i * 8)
306 def vector_of_longs_length():
307 return buf_.flatbuffers_field_vector_len(pos_, 68)
308 def vector_of_doubles(i:int):
309 return buf_.read_float64_le(buf_.flatbuffers_field_vector(pos_, 70) + i * 8)
310 def vector_of_doubles_length():
311 return buf_.flatbuffers_field_vector_len(pos_, 70)
312 def parent_namespace_test():
313 let o = buf_.flatbuffers_field_table(pos_, 72)
314 return if o: MyGame_InParentNamespace { buf_, o } else: nil
315 def vector_of_referrables(i:int):
316 return MyGame_Example_Referrable { buf_, buf_.flatbuffers_indirect(buf_.flatbuffers_field_vector(pos_, 74) + i * 4) }
317 def vector_of_referrables_length():
318 return buf_.flatbuffers_field_vector_len(pos_, 74)
319 def single_weak_reference():
320 return buf_.flatbuffers_field_int64(pos_, 76, 0)
321 def vector_of_weak_references(i:int):
322 return buf_.read_int64_le(buf_.flatbuffers_field_vector(pos_, 78) + i * 8)
323 def vector_of_weak_references_length():
324 return buf_.flatbuffers_field_vector_len(pos_, 78)
325 def vector_of_strong_referrables(i:int):
326 return MyGame_Example_Referrable { buf_, buf_.flatbuffers_indirect(buf_.flatbuffers_field_vector(pos_, 80) + i * 4) }
327 def vector_of_strong_referrables_length():
328 return buf_.flatbuffers_field_vector_len(pos_, 80)
329 def co_owning_reference():
330 return buf_.flatbuffers_field_int64(pos_, 82, 0)
331 def vector_of_co_owning_references(i:int):
332 return buf_.read_int64_le(buf_.flatbuffers_field_vector(pos_, 84) + i * 8)
333 def vector_of_co_owning_references_length():
334 return buf_.flatbuffers_field_vector_len(pos_, 84)
335 def non_owning_reference():
336 return buf_.flatbuffers_field_int64(pos_, 86, 0)
337 def vector_of_non_owning_references(i:int):
338 return buf_.read_int64_le(buf_.flatbuffers_field_vector(pos_, 88) + i * 8)
339 def vector_of_non_owning_references_length():
340 return buf_.flatbuffers_field_vector_len(pos_, 88)
341 def any_unique_type():
342 return AnyUniqueAliases(buf_.flatbuffers_field_int8(pos_, 90, 0))
343 def any_unique_as_M():
344 return MyGame_Example_Monster { buf_, buf_.flatbuffers_field_table(pos_, 92) }
345 def any_unique_as_TS():
346 return MyGame_Example_TestSimpleTableWithEnum { buf_, buf_.flatbuffers_field_table(pos_, 92) }
347 def any_unique_as_M2():
348 return MyGame_Example2_Monster { buf_, buf_.flatbuffers_field_table(pos_, 92) }
349 def any_ambiguous_type():
350 return AnyAmbiguousAliases(buf_.flatbuffers_field_int8(pos_, 94, 0))
351 def any_ambiguous_as_M1():
352 return MyGame_Example_Monster { buf_, buf_.flatbuffers_field_table(pos_, 96) }
353 def any_ambiguous_as_M2():
354 return MyGame_Example_Monster { buf_, buf_.flatbuffers_field_table(pos_, 96) }
355 def any_ambiguous_as_M3():
356 return MyGame_Example_Monster { buf_, buf_.flatbuffers_field_table(pos_, 96) }
357 def vector_of_enums(i:int):
358 return buf_.read_int8_le(buf_.flatbuffers_field_vector(pos_, 98) + i * 1)
359 def vector_of_enums_length():
360 return buf_.flatbuffers_field_vector_len(pos_, 98)
362 return Race(buf_.flatbuffers_field_int8(pos_, 100, -1))
364 def GetRootAsMonster(buf:string): return Monster { buf, buf.flatbuffers_indirect(0) }
366 struct MonsterBuilder:
367 b_:flatbuffers_builder
371 def add_pos(pos:flatbuffers_offset):
372 b_.PrependStructSlot(0, pos)
374 def add_mana(mana:int):
375 b_.PrependInt16Slot(1, mana, 150)
378 b_.PrependInt16Slot(2, hp, 100)
380 def add_name(name:flatbuffers_offset):
381 b_.PrependUOffsetTRelativeSlot(3, name)
383 def add_inventory(inventory:flatbuffers_offset):
384 b_.PrependUOffsetTRelativeSlot(5, inventory)
386 def add_color(color:Color):
387 b_.PrependUint8Slot(6, color, 8)
389 def add_test_type(test_type:Any):
390 b_.PrependUint8Slot(7, test_type, 0)
392 def add_test(test:flatbuffers_offset):
393 b_.PrependUOffsetTRelativeSlot(8, test)
395 def add_test4(test4:flatbuffers_offset):
396 b_.PrependUOffsetTRelativeSlot(9, test4)
398 def add_testarrayofstring(testarrayofstring:flatbuffers_offset):
399 b_.PrependUOffsetTRelativeSlot(10, testarrayofstring)
401 def add_testarrayoftables(testarrayoftables:flatbuffers_offset):
402 b_.PrependUOffsetTRelativeSlot(11, testarrayoftables)
404 def add_enemy(enemy:flatbuffers_offset):
405 b_.PrependUOffsetTRelativeSlot(12, enemy)
407 def add_testnestedflatbuffer(testnestedflatbuffer:flatbuffers_offset):
408 b_.PrependUOffsetTRelativeSlot(13, testnestedflatbuffer)
410 def add_testempty(testempty:flatbuffers_offset):
411 b_.PrependUOffsetTRelativeSlot(14, testempty)
413 def add_testbool(testbool:int):
414 b_.PrependBoolSlot(15, testbool, 0)
416 def add_testhashs32_fnv1(testhashs32_fnv1:int):
417 b_.PrependInt32Slot(16, testhashs32_fnv1, 0)
419 def add_testhashu32_fnv1(testhashu32_fnv1:int):
420 b_.PrependUint32Slot(17, testhashu32_fnv1, 0)
422 def add_testhashs64_fnv1(testhashs64_fnv1:int):
423 b_.PrependInt64Slot(18, testhashs64_fnv1, 0)
425 def add_testhashu64_fnv1(testhashu64_fnv1:int):
426 b_.PrependUint64Slot(19, testhashu64_fnv1, 0)
428 def add_testhashs32_fnv1a(testhashs32_fnv1a:int):
429 b_.PrependInt32Slot(20, testhashs32_fnv1a, 0)
431 def add_testhashu32_fnv1a(testhashu32_fnv1a:int):
432 b_.PrependUint32Slot(21, testhashu32_fnv1a, 0)
434 def add_testhashs64_fnv1a(testhashs64_fnv1a:int):
435 b_.PrependInt64Slot(22, testhashs64_fnv1a, 0)
437 def add_testhashu64_fnv1a(testhashu64_fnv1a:int):
438 b_.PrependUint64Slot(23, testhashu64_fnv1a, 0)
440 def add_testarrayofbools(testarrayofbools:flatbuffers_offset):
441 b_.PrependUOffsetTRelativeSlot(24, testarrayofbools)
443 def add_testf(testf:float):
444 b_.PrependFloat32Slot(25, testf, 3.14159)
446 def add_testf2(testf2:float):
447 b_.PrependFloat32Slot(26, testf2, 3.0)
449 def add_testf3(testf3:float):
450 b_.PrependFloat32Slot(27, testf3, 0.0)
452 def add_testarrayofstring2(testarrayofstring2:flatbuffers_offset):
453 b_.PrependUOffsetTRelativeSlot(28, testarrayofstring2)
455 def add_testarrayofsortedstruct(testarrayofsortedstruct:flatbuffers_offset):
456 b_.PrependUOffsetTRelativeSlot(29, testarrayofsortedstruct)
458 def add_flex(flex:flatbuffers_offset):
459 b_.PrependUOffsetTRelativeSlot(30, flex)
461 def add_test5(test5:flatbuffers_offset):
462 b_.PrependUOffsetTRelativeSlot(31, test5)
464 def add_vector_of_longs(vector_of_longs:flatbuffers_offset):
465 b_.PrependUOffsetTRelativeSlot(32, vector_of_longs)
467 def add_vector_of_doubles(vector_of_doubles:flatbuffers_offset):
468 b_.PrependUOffsetTRelativeSlot(33, vector_of_doubles)
470 def add_parent_namespace_test(parent_namespace_test:flatbuffers_offset):
471 b_.PrependUOffsetTRelativeSlot(34, parent_namespace_test)
473 def add_vector_of_referrables(vector_of_referrables:flatbuffers_offset):
474 b_.PrependUOffsetTRelativeSlot(35, vector_of_referrables)
476 def add_single_weak_reference(single_weak_reference:int):
477 b_.PrependUint64Slot(36, single_weak_reference, 0)
479 def add_vector_of_weak_references(vector_of_weak_references:flatbuffers_offset):
480 b_.PrependUOffsetTRelativeSlot(37, vector_of_weak_references)
482 def add_vector_of_strong_referrables(vector_of_strong_referrables:flatbuffers_offset):
483 b_.PrependUOffsetTRelativeSlot(38, vector_of_strong_referrables)
485 def add_co_owning_reference(co_owning_reference:int):
486 b_.PrependUint64Slot(39, co_owning_reference, 0)
488 def add_vector_of_co_owning_references(vector_of_co_owning_references:flatbuffers_offset):
489 b_.PrependUOffsetTRelativeSlot(40, vector_of_co_owning_references)
491 def add_non_owning_reference(non_owning_reference:int):
492 b_.PrependUint64Slot(41, non_owning_reference, 0)
494 def add_vector_of_non_owning_references(vector_of_non_owning_references:flatbuffers_offset):
495 b_.PrependUOffsetTRelativeSlot(42, vector_of_non_owning_references)
497 def add_any_unique_type(any_unique_type:AnyUniqueAliases):
498 b_.PrependUint8Slot(43, any_unique_type, 0)
500 def add_any_unique(any_unique:flatbuffers_offset):
501 b_.PrependUOffsetTRelativeSlot(44, any_unique)
503 def add_any_ambiguous_type(any_ambiguous_type:AnyAmbiguousAliases):
504 b_.PrependUint8Slot(45, any_ambiguous_type, 0)
506 def add_any_ambiguous(any_ambiguous:flatbuffers_offset):
507 b_.PrependUOffsetTRelativeSlot(46, any_ambiguous)
509 def add_vector_of_enums(vector_of_enums:flatbuffers_offset):
510 b_.PrependUOffsetTRelativeSlot(47, vector_of_enums)
512 def add_signed_enum(signed_enum:Race):
513 b_.PrependInt8Slot(48, signed_enum, -1)
516 return b_.EndObject()
518 def MonsterStartInventoryVector(b_:flatbuffers_builder, n_:int):
519 b_.StartVector(1, n_, 1)
520 def MonsterCreateInventoryVector(b_:flatbuffers_builder, v_:[int]):
521 b_.StartVector(1, v_.length, 1)
522 reverse(v_) e_: b_.PrependUint8(e_)
523 return b_.EndVector(v_.length)
525 def MonsterStartTest4Vector(b_:flatbuffers_builder, n_:int):
526 b_.StartVector(4, n_, 2)
528 def MonsterStartTestarrayofstringVector(b_:flatbuffers_builder, n_:int):
529 b_.StartVector(4, n_, 4)
530 def MonsterCreateTestarrayofstringVector(b_:flatbuffers_builder, v_:[flatbuffers_offset]):
531 b_.StartVector(4, v_.length, 4)
532 reverse(v_) e_: b_.PrependUOffsetTRelative(e_)
533 return b_.EndVector(v_.length)
535 def MonsterStartTestarrayoftablesVector(b_:flatbuffers_builder, n_:int):
536 b_.StartVector(4, n_, 4)
537 def MonsterCreateTestarrayoftablesVector(b_:flatbuffers_builder, v_:[flatbuffers_offset]):
538 b_.StartVector(4, v_.length, 4)
539 reverse(v_) e_: b_.PrependUOffsetTRelative(e_)
540 return b_.EndVector(v_.length)
542 def MonsterStartTestnestedflatbufferVector(b_:flatbuffers_builder, n_:int):
543 b_.StartVector(1, n_, 1)
544 def MonsterCreateTestnestedflatbufferVector(b_:flatbuffers_builder, v_:[int]):
545 b_.StartVector(1, v_.length, 1)
546 reverse(v_) e_: b_.PrependUint8(e_)
547 return b_.EndVector(v_.length)
549 def MonsterStartTestarrayofboolsVector(b_:flatbuffers_builder, n_:int):
550 b_.StartVector(1, n_, 1)
551 def MonsterCreateTestarrayofboolsVector(b_:flatbuffers_builder, v_:[int]):
552 b_.StartVector(1, v_.length, 1)
553 reverse(v_) e_: b_.PrependBool(e_)
554 return b_.EndVector(v_.length)
556 def MonsterStartTestarrayofstring2Vector(b_:flatbuffers_builder, n_:int):
557 b_.StartVector(4, n_, 4)
558 def MonsterCreateTestarrayofstring2Vector(b_:flatbuffers_builder, v_:[flatbuffers_offset]):
559 b_.StartVector(4, v_.length, 4)
560 reverse(v_) e_: b_.PrependUOffsetTRelative(e_)
561 return b_.EndVector(v_.length)
563 def MonsterStartTestarrayofsortedstructVector(b_:flatbuffers_builder, n_:int):
564 b_.StartVector(8, n_, 4)
566 def MonsterStartFlexVector(b_:flatbuffers_builder, n_:int):
567 b_.StartVector(1, n_, 1)
568 def MonsterCreateFlexVector(b_:flatbuffers_builder, v_:[int]):
569 b_.StartVector(1, v_.length, 1)
570 reverse(v_) e_: b_.PrependUint8(e_)
571 return b_.EndVector(v_.length)
573 def MonsterStartTest5Vector(b_:flatbuffers_builder, n_:int):
574 b_.StartVector(4, n_, 2)
576 def MonsterStartVectorOfLongsVector(b_:flatbuffers_builder, n_:int):
577 b_.StartVector(8, n_, 8)
578 def MonsterCreateVectorOfLongsVector(b_:flatbuffers_builder, v_:[int]):
579 b_.StartVector(8, v_.length, 8)
580 reverse(v_) e_: b_.PrependInt64(e_)
581 return b_.EndVector(v_.length)
583 def MonsterStartVectorOfDoublesVector(b_:flatbuffers_builder, n_:int):
584 b_.StartVector(8, n_, 8)
585 def MonsterCreateVectorOfDoublesVector(b_:flatbuffers_builder, v_:[float]):
586 b_.StartVector(8, v_.length, 8)
587 reverse(v_) e_: b_.PrependFloat64(e_)
588 return b_.EndVector(v_.length)
590 def MonsterStartVectorOfReferrablesVector(b_:flatbuffers_builder, n_:int):
591 b_.StartVector(4, n_, 4)
592 def MonsterCreateVectorOfReferrablesVector(b_:flatbuffers_builder, v_:[flatbuffers_offset]):
593 b_.StartVector(4, v_.length, 4)
594 reverse(v_) e_: b_.PrependUOffsetTRelative(e_)
595 return b_.EndVector(v_.length)
597 def MonsterStartVectorOfWeakReferencesVector(b_:flatbuffers_builder, n_:int):
598 b_.StartVector(8, n_, 8)
599 def MonsterCreateVectorOfWeakReferencesVector(b_:flatbuffers_builder, v_:[int]):
600 b_.StartVector(8, v_.length, 8)
601 reverse(v_) e_: b_.PrependUint64(e_)
602 return b_.EndVector(v_.length)
604 def MonsterStartVectorOfStrongReferrablesVector(b_:flatbuffers_builder, n_:int):
605 b_.StartVector(4, n_, 4)
606 def MonsterCreateVectorOfStrongReferrablesVector(b_:flatbuffers_builder, v_:[flatbuffers_offset]):
607 b_.StartVector(4, v_.length, 4)
608 reverse(v_) e_: b_.PrependUOffsetTRelative(e_)
609 return b_.EndVector(v_.length)
611 def MonsterStartVectorOfCoOwningReferencesVector(b_:flatbuffers_builder, n_:int):
612 b_.StartVector(8, n_, 8)
613 def MonsterCreateVectorOfCoOwningReferencesVector(b_:flatbuffers_builder, v_:[int]):
614 b_.StartVector(8, v_.length, 8)
615 reverse(v_) e_: b_.PrependUint64(e_)
616 return b_.EndVector(v_.length)
618 def MonsterStartVectorOfNonOwningReferencesVector(b_:flatbuffers_builder, n_:int):
619 b_.StartVector(8, n_, 8)
620 def MonsterCreateVectorOfNonOwningReferencesVector(b_:flatbuffers_builder, v_:[int]):
621 b_.StartVector(8, v_.length, 8)
622 reverse(v_) e_: b_.PrependUint64(e_)
623 return b_.EndVector(v_.length)
625 def MonsterStartVectorOfEnumsVector(b_:flatbuffers_builder, n_:int):
626 b_.StartVector(1, n_, 1)
627 def MonsterCreateVectorOfEnumsVector(b_:flatbuffers_builder, v_:[Color]):
628 b_.StartVector(1, v_.length, 1)
629 reverse(v_) e_: b_.PrependUint8(e_)
630 return b_.EndVector(v_.length)
632 class TypeAliases : flatbuffers_handle
634 return buf_.flatbuffers_field_int8(pos_, 4, 0)
636 return buf_.flatbuffers_field_int8(pos_, 6, 0)
638 return buf_.flatbuffers_field_int16(pos_, 8, 0)
640 return buf_.flatbuffers_field_int16(pos_, 10, 0)
642 return buf_.flatbuffers_field_int32(pos_, 12, 0)
644 return buf_.flatbuffers_field_int32(pos_, 14, 0)
646 return buf_.flatbuffers_field_int64(pos_, 16, 0)
648 return buf_.flatbuffers_field_int64(pos_, 18, 0)
650 return buf_.flatbuffers_field_float32(pos_, 20, 0.0)
652 return buf_.flatbuffers_field_float64(pos_, 22, 0.0)
654 return buf_.read_int8_le(buf_.flatbuffers_field_vector(pos_, 24) + i * 1)
656 return buf_.flatbuffers_field_vector_len(pos_, 24)
658 return buf_.read_float64_le(buf_.flatbuffers_field_vector(pos_, 26) + i * 8)
660 return buf_.flatbuffers_field_vector_len(pos_, 26)
662 def GetRootAsTypeAliases(buf:string): return TypeAliases { buf, buf.flatbuffers_indirect(0) }
664 struct TypeAliasesBuilder:
665 b_:flatbuffers_builder
670 b_.PrependInt8Slot(0, i8, 0)
673 b_.PrependUint8Slot(1, u8, 0)
675 def add_i16(i16:int):
676 b_.PrependInt16Slot(2, i16, 0)
678 def add_u16(u16:int):
679 b_.PrependUint16Slot(3, u16, 0)
681 def add_i32(i32:int):
682 b_.PrependInt32Slot(4, i32, 0)
684 def add_u32(u32:int):
685 b_.PrependUint32Slot(5, u32, 0)
687 def add_i64(i64:int):
688 b_.PrependInt64Slot(6, i64, 0)
690 def add_u64(u64:int):
691 b_.PrependUint64Slot(7, u64, 0)
693 def add_f32(f32:float):
694 b_.PrependFloat32Slot(8, f32, 0.0)
696 def add_f64(f64:float):
697 b_.PrependFloat64Slot(9, f64, 0.0)
699 def add_v8(v8:flatbuffers_offset):
700 b_.PrependUOffsetTRelativeSlot(10, v8)
702 def add_vf64(vf64:flatbuffers_offset):
703 b_.PrependUOffsetTRelativeSlot(11, vf64)
706 return b_.EndObject()
708 def TypeAliasesStartV8Vector(b_:flatbuffers_builder, n_:int):
709 b_.StartVector(1, n_, 1)
710 def TypeAliasesCreateV8Vector(b_:flatbuffers_builder, v_:[int]):
711 b_.StartVector(1, v_.length, 1)
712 reverse(v_) e_: b_.PrependInt8(e_)
713 return b_.EndVector(v_.length)
715 def TypeAliasesStartVf64Vector(b_:flatbuffers_builder, n_:int):
716 b_.StartVector(8, n_, 8)
717 def TypeAliasesCreateVf64Vector(b_:flatbuffers_builder, v_:[float]):
718 b_.StartVector(8, v_.length, 8)
719 reverse(v_) e_: b_.PrependFloat64(e_)
720 return b_.EndVector(v_.length)