1 # automatically generated by the FlatBuffers compiler, do not modify 2 3 # namespace: Example 4 5 import flatbuffers 6 7 # /// an example documentation comment: monster object 8 class Monster(object): 9 __slots__ = ['_tab'] 10 11 @classmethod 12 def GetRootAsMonster(cls, buf, offset): 13 n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset) 14 x = Monster() 15 x.Init(buf, n + offset) 16 return x 17 18 # Monster 19 def Init(self, buf, pos): 20 self._tab = flatbuffers.table.Table(buf, pos) 21 22 # Monster 23 def Pos(self): 24 o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4)) 25 if o != 0: 26 x = o + self._tab.Pos 27 from .Vec3 import Vec3 28 obj = Vec3() 29 obj.Init(self._tab.Bytes, x) 30 return obj 31 return None 32 33 # Monster 34 def Mana(self): 35 o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6)) 36 if o != 0: 37 return self._tab.Get(flatbuffers.number_types.Int16Flags, o + self._tab.Pos) 38 return 150 39 40 # Monster 41 def Hp(self): 42 o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8)) 43 if o != 0: 44 return self._tab.Get(flatbuffers.number_types.Int16Flags, o + self._tab.Pos) 45 return 100 46 47 # Monster 48 def Name(self): 49 o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(10)) 50 if o != 0: 51 return self._tab.String(o + self._tab.Pos) 52 return None 53 54 # Monster 55 def Inventory(self, j): 56 o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(14)) 57 if o != 0: 58 a = self._tab.Vector(o) 59 return self._tab.Get(flatbuffers.number_types.Uint8Flags, a + flatbuffers.number_types.UOffsetTFlags.py_type(j * 1)) 60 return 0 61 62 # Monster 63 def InventoryAsNumpy(self): 64 o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(14)) 65 if o != 0: 66 return self._tab.GetVectorAsNumpy(flatbuffers.number_types.Uint8Flags, o) 67 return 0 68 69 # Monster 70 def InventoryLength(self): 71 o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(14)) 72 if o != 0: 73 return self._tab.VectorLen(o) 74 return 0 75 76 # Monster 77 def Color(self): 78 o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(16)) 79 if o != 0: 80 return self._tab.Get(flatbuffers.number_types.Int8Flags, o + self._tab.Pos) 81 return 8 82 83 # Monster 84 def TestType(self): 85 o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(18)) 86 if o != 0: 87 return self._tab.Get(flatbuffers.number_types.Uint8Flags, o + self._tab.Pos) 88 return 0 89 90 # Monster 91 def Test(self): 92 o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(20)) 93 if o != 0: 94 from flatbuffers.table import Table 95 obj = Table(bytearray(), 0) 96 self._tab.Union(obj, o) 97 return obj 98 return None 99 100 # Monster 101 def Test4(self, j): 102 o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(22)) 103 if o != 0: 104 x = self._tab.Vector(o) 105 x += flatbuffers.number_types.UOffsetTFlags.py_type(j) * 4 106 from .Test import Test 107 obj = Test() 108 obj.Init(self._tab.Bytes, x) 109 return obj 110 return None 111 112 # Monster 113 def Test4Length(self): 114 o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(22)) 115 if o != 0: 116 return self._tab.VectorLen(o) 117 return 0 118 119 # Monster 120 def Testarrayofstring(self, j): 121 o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(24)) 122 if o != 0: 123 a = self._tab.Vector(o) 124 return self._tab.String(a + flatbuffers.number_types.UOffsetTFlags.py_type(j * 4)) 125 return "" 126 127 # Monster 128 def TestarrayofstringLength(self): 129 o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(24)) 130 if o != 0: 131 return self._tab.VectorLen(o) 132 return 0 133 134 # /// an example documentation comment: this will end up in the generated code 135 # /// multiline too 136 # Monster 137 def Testarrayoftables(self, j): 138 o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(26)) 139 if o != 0: 140 x = self._tab.Vector(o) 141 x += flatbuffers.number_types.UOffsetTFlags.py_type(j) * 4 142 x = self._tab.Indirect(x) 143 from .Monster import Monster 144 obj = Monster() 145 obj.Init(self._tab.Bytes, x) 146 return obj 147 return None 148 149 # Monster 150 def TestarrayoftablesLength(self): 151 o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(26)) 152 if o != 0: 153 return self._tab.VectorLen(o) 154 return 0 155 156 # Monster 157 def Enemy(self): 158 o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(28)) 159 if o != 0: 160 x = self._tab.Indirect(o + self._tab.Pos) 161 from .Monster import Monster 162 obj = Monster() 163 obj.Init(self._tab.Bytes, x) 164 return obj 165 return None 166 167 # Monster 168 def Testnestedflatbuffer(self, j): 169 o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(30)) 170 if o != 0: 171 a = self._tab.Vector(o) 172 return self._tab.Get(flatbuffers.number_types.Uint8Flags, a + flatbuffers.number_types.UOffsetTFlags.py_type(j * 1)) 173 return 0 174 175 # Monster 176 def TestnestedflatbufferAsNumpy(self): 177 o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(30)) 178 if o != 0: 179 return self._tab.GetVectorAsNumpy(flatbuffers.number_types.Uint8Flags, o) 180 return 0 181 182 # Monster 183 def TestnestedflatbufferLength(self): 184 o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(30)) 185 if o != 0: 186 return self._tab.VectorLen(o) 187 return 0 188 189 # Monster 190 def Testempty(self): 191 o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(32)) 192 if o != 0: 193 x = self._tab.Indirect(o + self._tab.Pos) 194 from .Stat import Stat 195 obj = Stat() 196 obj.Init(self._tab.Bytes, x) 197 return obj 198 return None 199 200 # Monster 201 def Testbool(self): 202 o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(34)) 203 if o != 0: 204 return bool(self._tab.Get(flatbuffers.number_types.BoolFlags, o + self._tab.Pos)) 205 return False 206 207 # Monster 208 def Testhashs32Fnv1(self): 209 o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(36)) 210 if o != 0: 211 return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos) 212 return 0 213 214 # Monster 215 def Testhashu32Fnv1(self): 216 o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(38)) 217 if o != 0: 218 return self._tab.Get(flatbuffers.number_types.Uint32Flags, o + self._tab.Pos) 219 return 0 220 221 # Monster 222 def Testhashs64Fnv1(self): 223 o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(40)) 224 if o != 0: 225 return self._tab.Get(flatbuffers.number_types.Int64Flags, o + self._tab.Pos) 226 return 0 227 228 # Monster 229 def Testhashu64Fnv1(self): 230 o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(42)) 231 if o != 0: 232 return self._tab.Get(flatbuffers.number_types.Uint64Flags, o + self._tab.Pos) 233 return 0 234 235 # Monster 236 def Testhashs32Fnv1a(self): 237 o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(44)) 238 if o != 0: 239 return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos) 240 return 0 241 242 # Monster 243 def Testhashu32Fnv1a(self): 244 o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(46)) 245 if o != 0: 246 return self._tab.Get(flatbuffers.number_types.Uint32Flags, o + self._tab.Pos) 247 return 0 248 249 # Monster 250 def Testhashs64Fnv1a(self): 251 o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(48)) 252 if o != 0: 253 return self._tab.Get(flatbuffers.number_types.Int64Flags, o + self._tab.Pos) 254 return 0 255 256 # Monster 257 def Testhashu64Fnv1a(self): 258 o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(50)) 259 if o != 0: 260 return self._tab.Get(flatbuffers.number_types.Uint64Flags, o + self._tab.Pos) 261 return 0 262 263 # Monster 264 def Testarrayofbools(self, j): 265 o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(52)) 266 if o != 0: 267 a = self._tab.Vector(o) 268 return self._tab.Get(flatbuffers.number_types.BoolFlags, a + flatbuffers.number_types.UOffsetTFlags.py_type(j * 1)) 269 return 0 270 271 # Monster 272 def TestarrayofboolsAsNumpy(self): 273 o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(52)) 274 if o != 0: 275 return self._tab.GetVectorAsNumpy(flatbuffers.number_types.BoolFlags, o) 276 return 0 277 278 # Monster 279 def TestarrayofboolsLength(self): 280 o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(52)) 281 if o != 0: 282 return self._tab.VectorLen(o) 283 return 0 284 285 # Monster 286 def Testf(self): 287 o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(54)) 288 if o != 0: 289 return self._tab.Get(flatbuffers.number_types.Float32Flags, o + self._tab.Pos) 290 return 3.14159 291 292 # Monster 293 def Testf2(self): 294 o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(56)) 295 if o != 0: 296 return self._tab.Get(flatbuffers.number_types.Float32Flags, o + self._tab.Pos) 297 return 3.0 298 299 # Monster 300 def Testf3(self): 301 o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(58)) 302 if o != 0: 303 return self._tab.Get(flatbuffers.number_types.Float32Flags, o + self._tab.Pos) 304 return 0.0 305 306 # Monster 307 def Testarrayofstring2(self, j): 308 o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(60)) 309 if o != 0: 310 a = self._tab.Vector(o) 311 return self._tab.String(a + flatbuffers.number_types.UOffsetTFlags.py_type(j * 4)) 312 return "" 313 314 # Monster 315 def Testarrayofstring2Length(self): 316 o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(60)) 317 if o != 0: 318 return self._tab.VectorLen(o) 319 return 0 320 321 # Monster 322 def Testarrayofsortedstruct(self, j): 323 o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(62)) 324 if o != 0: 325 x = self._tab.Vector(o) 326 x += flatbuffers.number_types.UOffsetTFlags.py_type(j) * 8 327 from .Ability import Ability 328 obj = Ability() 329 obj.Init(self._tab.Bytes, x) 330 return obj 331 return None 332 333 # Monster 334 def TestarrayofsortedstructLength(self): 335 o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(62)) 336 if o != 0: 337 return self._tab.VectorLen(o) 338 return 0 339 340 # Monster 341 def Flex(self, j): 342 o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(64)) 343 if o != 0: 344 a = self._tab.Vector(o) 345 return self._tab.Get(flatbuffers.number_types.Uint8Flags, a + flatbuffers.number_types.UOffsetTFlags.py_type(j * 1)) 346 return 0 347 348 # Monster 349 def FlexAsNumpy(self): 350 o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(64)) 351 if o != 0: 352 return self._tab.GetVectorAsNumpy(flatbuffers.number_types.Uint8Flags, o) 353 return 0 354 355 # Monster 356 def FlexLength(self): 357 o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(64)) 358 if o != 0: 359 return self._tab.VectorLen(o) 360 return 0 361 362 # Monster 363 def Test5(self, j): 364 o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(66)) 365 if o != 0: 366 x = self._tab.Vector(o) 367 x += flatbuffers.number_types.UOffsetTFlags.py_type(j) * 4 368 from .Test import Test 369 obj = Test() 370 obj.Init(self._tab.Bytes, x) 371 return obj 372 return None 373 374 # Monster 375 def Test5Length(self): 376 o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(66)) 377 if o != 0: 378 return self._tab.VectorLen(o) 379 return 0 380 381 # Monster 382 def VectorOfLongs(self, j): 383 o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(68)) 384 if o != 0: 385 a = self._tab.Vector(o) 386 return self._tab.Get(flatbuffers.number_types.Int64Flags, a + flatbuffers.number_types.UOffsetTFlags.py_type(j * 8)) 387 return 0 388 389 # Monster 390 def VectorOfLongsAsNumpy(self): 391 o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(68)) 392 if o != 0: 393 return self._tab.GetVectorAsNumpy(flatbuffers.number_types.Int64Flags, o) 394 return 0 395 396 # Monster 397 def VectorOfLongsLength(self): 398 o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(68)) 399 if o != 0: 400 return self._tab.VectorLen(o) 401 return 0 402 403 # Monster 404 def VectorOfDoubles(self, j): 405 o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(70)) 406 if o != 0: 407 a = self._tab.Vector(o) 408 return self._tab.Get(flatbuffers.number_types.Float64Flags, a + flatbuffers.number_types.UOffsetTFlags.py_type(j * 8)) 409 return 0 410 411 # Monster 412 def VectorOfDoublesAsNumpy(self): 413 o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(70)) 414 if o != 0: 415 return self._tab.GetVectorAsNumpy(flatbuffers.number_types.Float64Flags, o) 416 return 0 417 418 # Monster 419 def VectorOfDoublesLength(self): 420 o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(70)) 421 if o != 0: 422 return self._tab.VectorLen(o) 423 return 0 424 425 # Monster 426 def ParentNamespaceTest(self): 427 o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(72)) 428 if o != 0: 429 x = self._tab.Indirect(o + self._tab.Pos) 430 from .InParentNamespace import InParentNamespace 431 obj = InParentNamespace() 432 obj.Init(self._tab.Bytes, x) 433 return obj 434 return None 435 436 # Monster 437 def VectorOfReferrables(self, j): 438 o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(74)) 439 if o != 0: 440 x = self._tab.Vector(o) 441 x += flatbuffers.number_types.UOffsetTFlags.py_type(j) * 4 442 x = self._tab.Indirect(x) 443 from .Referrable import Referrable 444 obj = Referrable() 445 obj.Init(self._tab.Bytes, x) 446 return obj 447 return None 448 449 # Monster 450 def VectorOfReferrablesLength(self): 451 o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(74)) 452 if o != 0: 453 return self._tab.VectorLen(o) 454 return 0 455 456 # Monster 457 def SingleWeakReference(self): 458 o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(76)) 459 if o != 0: 460 return self._tab.Get(flatbuffers.number_types.Uint64Flags, o + self._tab.Pos) 461 return 0 462 463 # Monster 464 def VectorOfWeakReferences(self, j): 465 o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(78)) 466 if o != 0: 467 a = self._tab.Vector(o) 468 return self._tab.Get(flatbuffers.number_types.Uint64Flags, a + flatbuffers.number_types.UOffsetTFlags.py_type(j * 8)) 469 return 0 470 471 # Monster 472 def VectorOfWeakReferencesAsNumpy(self): 473 o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(78)) 474 if o != 0: 475 return self._tab.GetVectorAsNumpy(flatbuffers.number_types.Uint64Flags, o) 476 return 0 477 478 # Monster 479 def VectorOfWeakReferencesLength(self): 480 o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(78)) 481 if o != 0: 482 return self._tab.VectorLen(o) 483 return 0 484 485 # Monster 486 def VectorOfStrongReferrables(self, j): 487 o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(80)) 488 if o != 0: 489 x = self._tab.Vector(o) 490 x += flatbuffers.number_types.UOffsetTFlags.py_type(j) * 4 491 x = self._tab.Indirect(x) 492 from .Referrable import Referrable 493 obj = Referrable() 494 obj.Init(self._tab.Bytes, x) 495 return obj 496 return None 497 498 # Monster 499 def VectorOfStrongReferrablesLength(self): 500 o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(80)) 501 if o != 0: 502 return self._tab.VectorLen(o) 503 return 0 504 505 # Monster 506 def CoOwningReference(self): 507 o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(82)) 508 if o != 0: 509 return self._tab.Get(flatbuffers.number_types.Uint64Flags, o + self._tab.Pos) 510 return 0 511 512 # Monster 513 def VectorOfCoOwningReferences(self, j): 514 o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(84)) 515 if o != 0: 516 a = self._tab.Vector(o) 517 return self._tab.Get(flatbuffers.number_types.Uint64Flags, a + flatbuffers.number_types.UOffsetTFlags.py_type(j * 8)) 518 return 0 519 520 # Monster 521 def VectorOfCoOwningReferencesAsNumpy(self): 522 o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(84)) 523 if o != 0: 524 return self._tab.GetVectorAsNumpy(flatbuffers.number_types.Uint64Flags, o) 525 return 0 526 527 # Monster 528 def VectorOfCoOwningReferencesLength(self): 529 o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(84)) 530 if o != 0: 531 return self._tab.VectorLen(o) 532 return 0 533 534 # Monster 535 def NonOwningReference(self): 536 o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(86)) 537 if o != 0: 538 return self._tab.Get(flatbuffers.number_types.Uint64Flags, o + self._tab.Pos) 539 return 0 540 541 # Monster 542 def VectorOfNonOwningReferences(self, j): 543 o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(88)) 544 if o != 0: 545 a = self._tab.Vector(o) 546 return self._tab.Get(flatbuffers.number_types.Uint64Flags, a + flatbuffers.number_types.UOffsetTFlags.py_type(j * 8)) 547 return 0 548 549 # Monster 550 def VectorOfNonOwningReferencesAsNumpy(self): 551 o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(88)) 552 if o != 0: 553 return self._tab.GetVectorAsNumpy(flatbuffers.number_types.Uint64Flags, o) 554 return 0 555 556 # Monster 557 def VectorOfNonOwningReferencesLength(self): 558 o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(88)) 559 if o != 0: 560 return self._tab.VectorLen(o) 561 return 0 562 563 # Monster 564 def AnyUniqueType(self): 565 o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(90)) 566 if o != 0: 567 return self._tab.Get(flatbuffers.number_types.Uint8Flags, o + self._tab.Pos) 568 return 0 569 570 # Monster 571 def AnyUnique(self): 572 o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(92)) 573 if o != 0: 574 from flatbuffers.table import Table 575 obj = Table(bytearray(), 0) 576 self._tab.Union(obj, o) 577 return obj 578 return None 579 580 # Monster 581 def AnyAmbiguousType(self): 582 o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(94)) 583 if o != 0: 584 return self._tab.Get(flatbuffers.number_types.Uint8Flags, o + self._tab.Pos) 585 return 0 586 587 # Monster 588 def AnyAmbiguous(self): 589 o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(96)) 590 if o != 0: 591 from flatbuffers.table import Table 592 obj = Table(bytearray(), 0) 593 self._tab.Union(obj, o) 594 return obj 595 return None 596 597 # Monster 598 def VectorOfEnums(self, j): 599 o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(98)) 600 if o != 0: 601 a = self._tab.Vector(o) 602 return self._tab.Get(flatbuffers.number_types.Int8Flags, a + flatbuffers.number_types.UOffsetTFlags.py_type(j * 1)) 603 return 0 604 605 # Monster 606 def VectorOfEnumsAsNumpy(self): 607 o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(98)) 608 if o != 0: 609 return self._tab.GetVectorAsNumpy(flatbuffers.number_types.Int8Flags, o) 610 return 0 611 612 # Monster 613 def VectorOfEnumsLength(self): 614 o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(98)) 615 if o != 0: 616 return self._tab.VectorLen(o) 617 return 0 618 619 def MonsterStart(builder): builder.StartObject(48) 620 def MonsterAddPos(builder, pos): builder.PrependStructSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(pos), 0) 621 def MonsterAddMana(builder, mana): builder.PrependInt16Slot(1, mana, 150) 622 def MonsterAddHp(builder, hp): builder.PrependInt16Slot(2, hp, 100) 623 def MonsterAddName(builder, name): builder.PrependUOffsetTRelativeSlot(3, flatbuffers.number_types.UOffsetTFlags.py_type(name), 0) 624 def MonsterAddInventory(builder, inventory): builder.PrependUOffsetTRelativeSlot(5, flatbuffers.number_types.UOffsetTFlags.py_type(inventory), 0) 625 def MonsterStartInventoryVector(builder, numElems): return builder.StartVector(1, numElems, 1) 626 def MonsterAddColor(builder, color): builder.PrependInt8Slot(6, color, 8) 627 def MonsterAddTestType(builder, testType): builder.PrependUint8Slot(7, testType, 0) 628 def MonsterAddTest(builder, test): builder.PrependUOffsetTRelativeSlot(8, flatbuffers.number_types.UOffsetTFlags.py_type(test), 0) 629 def MonsterAddTest4(builder, test4): builder.PrependUOffsetTRelativeSlot(9, flatbuffers.number_types.UOffsetTFlags.py_type(test4), 0) 630 def MonsterStartTest4Vector(builder, numElems): return builder.StartVector(4, numElems, 2) 631 def MonsterAddTestarrayofstring(builder, testarrayofstring): builder.PrependUOffsetTRelativeSlot(10, flatbuffers.number_types.UOffsetTFlags.py_type(testarrayofstring), 0) 632 def MonsterStartTestarrayofstringVector(builder, numElems): return builder.StartVector(4, numElems, 4) 633 def MonsterAddTestarrayoftables(builder, testarrayoftables): builder.PrependUOffsetTRelativeSlot(11, flatbuffers.number_types.UOffsetTFlags.py_type(testarrayoftables), 0) 634 def MonsterStartTestarrayoftablesVector(builder, numElems): return builder.StartVector(4, numElems, 4) 635 def MonsterAddEnemy(builder, enemy): builder.PrependUOffsetTRelativeSlot(12, flatbuffers.number_types.UOffsetTFlags.py_type(enemy), 0) 636 def MonsterAddTestnestedflatbuffer(builder, testnestedflatbuffer): builder.PrependUOffsetTRelativeSlot(13, flatbuffers.number_types.UOffsetTFlags.py_type(testnestedflatbuffer), 0) 637 def MonsterStartTestnestedflatbufferVector(builder, numElems): return builder.StartVector(1, numElems, 1) 638 def MonsterAddTestempty(builder, testempty): builder.PrependUOffsetTRelativeSlot(14, flatbuffers.number_types.UOffsetTFlags.py_type(testempty), 0) 639 def MonsterAddTestbool(builder, testbool): builder.PrependBoolSlot(15, testbool, 0) 640 def MonsterAddTesthashs32Fnv1(builder, testhashs32Fnv1): builder.PrependInt32Slot(16, testhashs32Fnv1, 0) 641 def MonsterAddTesthashu32Fnv1(builder, testhashu32Fnv1): builder.PrependUint32Slot(17, testhashu32Fnv1, 0) 642 def MonsterAddTesthashs64Fnv1(builder, testhashs64Fnv1): builder.PrependInt64Slot(18, testhashs64Fnv1, 0) 643 def MonsterAddTesthashu64Fnv1(builder, testhashu64Fnv1): builder.PrependUint64Slot(19, testhashu64Fnv1, 0) 644 def MonsterAddTesthashs32Fnv1a(builder, testhashs32Fnv1a): builder.PrependInt32Slot(20, testhashs32Fnv1a, 0) 645 def MonsterAddTesthashu32Fnv1a(builder, testhashu32Fnv1a): builder.PrependUint32Slot(21, testhashu32Fnv1a, 0) 646 def MonsterAddTesthashs64Fnv1a(builder, testhashs64Fnv1a): builder.PrependInt64Slot(22, testhashs64Fnv1a, 0) 647 def MonsterAddTesthashu64Fnv1a(builder, testhashu64Fnv1a): builder.PrependUint64Slot(23, testhashu64Fnv1a, 0) 648 def MonsterAddTestarrayofbools(builder, testarrayofbools): builder.PrependUOffsetTRelativeSlot(24, flatbuffers.number_types.UOffsetTFlags.py_type(testarrayofbools), 0) 649 def MonsterStartTestarrayofboolsVector(builder, numElems): return builder.StartVector(1, numElems, 1) 650 def MonsterAddTestf(builder, testf): builder.PrependFloat32Slot(25, testf, 3.14159) 651 def MonsterAddTestf2(builder, testf2): builder.PrependFloat32Slot(26, testf2, 3.0) 652 def MonsterAddTestf3(builder, testf3): builder.PrependFloat32Slot(27, testf3, 0.0) 653 def MonsterAddTestarrayofstring2(builder, testarrayofstring2): builder.PrependUOffsetTRelativeSlot(28, flatbuffers.number_types.UOffsetTFlags.py_type(testarrayofstring2), 0) 654 def MonsterStartTestarrayofstring2Vector(builder, numElems): return builder.StartVector(4, numElems, 4) 655 def MonsterAddTestarrayofsortedstruct(builder, testarrayofsortedstruct): builder.PrependUOffsetTRelativeSlot(29, flatbuffers.number_types.UOffsetTFlags.py_type(testarrayofsortedstruct), 0) 656 def MonsterStartTestarrayofsortedstructVector(builder, numElems): return builder.StartVector(8, numElems, 4) 657 def MonsterAddFlex(builder, flex): builder.PrependUOffsetTRelativeSlot(30, flatbuffers.number_types.UOffsetTFlags.py_type(flex), 0) 658 def MonsterStartFlexVector(builder, numElems): return builder.StartVector(1, numElems, 1) 659 def MonsterAddTest5(builder, test5): builder.PrependUOffsetTRelativeSlot(31, flatbuffers.number_types.UOffsetTFlags.py_type(test5), 0) 660 def MonsterStartTest5Vector(builder, numElems): return builder.StartVector(4, numElems, 2) 661 def MonsterAddVectorOfLongs(builder, vectorOfLongs): builder.PrependUOffsetTRelativeSlot(32, flatbuffers.number_types.UOffsetTFlags.py_type(vectorOfLongs), 0) 662 def MonsterStartVectorOfLongsVector(builder, numElems): return builder.StartVector(8, numElems, 8) 663 def MonsterAddVectorOfDoubles(builder, vectorOfDoubles): builder.PrependUOffsetTRelativeSlot(33, flatbuffers.number_types.UOffsetTFlags.py_type(vectorOfDoubles), 0) 664 def MonsterStartVectorOfDoublesVector(builder, numElems): return builder.StartVector(8, numElems, 8) 665 def MonsterAddParentNamespaceTest(builder, parentNamespaceTest): builder.PrependUOffsetTRelativeSlot(34, flatbuffers.number_types.UOffsetTFlags.py_type(parentNamespaceTest), 0) 666 def MonsterAddVectorOfReferrables(builder, vectorOfReferrables): builder.PrependUOffsetTRelativeSlot(35, flatbuffers.number_types.UOffsetTFlags.py_type(vectorOfReferrables), 0) 667 def MonsterStartVectorOfReferrablesVector(builder, numElems): return builder.StartVector(4, numElems, 4) 668 def MonsterAddSingleWeakReference(builder, singleWeakReference): builder.PrependUint64Slot(36, singleWeakReference, 0) 669 def MonsterAddVectorOfWeakReferences(builder, vectorOfWeakReferences): builder.PrependUOffsetTRelativeSlot(37, flatbuffers.number_types.UOffsetTFlags.py_type(vectorOfWeakReferences), 0) 670 def MonsterStartVectorOfWeakReferencesVector(builder, numElems): return builder.StartVector(8, numElems, 8) 671 def MonsterAddVectorOfStrongReferrables(builder, vectorOfStrongReferrables): builder.PrependUOffsetTRelativeSlot(38, flatbuffers.number_types.UOffsetTFlags.py_type(vectorOfStrongReferrables), 0) 672 def MonsterStartVectorOfStrongReferrablesVector(builder, numElems): return builder.StartVector(4, numElems, 4) 673 def MonsterAddCoOwningReference(builder, coOwningReference): builder.PrependUint64Slot(39, coOwningReference, 0) 674 def MonsterAddVectorOfCoOwningReferences(builder, vectorOfCoOwningReferences): builder.PrependUOffsetTRelativeSlot(40, flatbuffers.number_types.UOffsetTFlags.py_type(vectorOfCoOwningReferences), 0) 675 def MonsterStartVectorOfCoOwningReferencesVector(builder, numElems): return builder.StartVector(8, numElems, 8) 676 def MonsterAddNonOwningReference(builder, nonOwningReference): builder.PrependUint64Slot(41, nonOwningReference, 0) 677 def MonsterAddVectorOfNonOwningReferences(builder, vectorOfNonOwningReferences): builder.PrependUOffsetTRelativeSlot(42, flatbuffers.number_types.UOffsetTFlags.py_type(vectorOfNonOwningReferences), 0) 678 def MonsterStartVectorOfNonOwningReferencesVector(builder, numElems): return builder.StartVector(8, numElems, 8) 679 def MonsterAddAnyUniqueType(builder, anyUniqueType): builder.PrependUint8Slot(43, anyUniqueType, 0) 680 def MonsterAddAnyUnique(builder, anyUnique): builder.PrependUOffsetTRelativeSlot(44, flatbuffers.number_types.UOffsetTFlags.py_type(anyUnique), 0) 681 def MonsterAddAnyAmbiguousType(builder, anyAmbiguousType): builder.PrependUint8Slot(45, anyAmbiguousType, 0) 682 def MonsterAddAnyAmbiguous(builder, anyAmbiguous): builder.PrependUOffsetTRelativeSlot(46, flatbuffers.number_types.UOffsetTFlags.py_type(anyAmbiguous), 0) 683 def MonsterAddVectorOfEnums(builder, vectorOfEnums): builder.PrependUOffsetTRelativeSlot(47, flatbuffers.number_types.UOffsetTFlags.py_type(vectorOfEnums), 0) 684 def MonsterStartVectorOfEnumsVector(builder, numElems): return builder.StartVector(1, numElems, 1) 685 def MonsterEnd(builder): return builder.EndObject() 686