1// automatically generated by the FlatBuffers compiler, do not modify 2/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */ 3import * as flatbuffers from 'flatbuffers'; 4import { TableB } from './my-game/other-name-space/table-b.js'; 5export class TableA { 6 constructor() { 7 this.bb = null; 8 this.bb_pos = 0; 9 } 10 __init(i, bb) { 11 this.bb_pos = i; 12 this.bb = bb; 13 return this; 14 } 15 static getRootAsTableA(bb, obj) { 16 return (obj || new TableA()).__init(bb.readInt32(bb.position()) + bb.position(), bb); 17 } 18 static getSizePrefixedRootAsTableA(bb, obj) { 19 bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); 20 return (obj || new TableA()).__init(bb.readInt32(bb.position()) + bb.position(), bb); 21 } 22 b(obj) { 23 const offset = this.bb.__offset(this.bb_pos, 4); 24 return offset ? (obj || new TableB()).__init(this.bb.__indirect(this.bb_pos + offset), this.bb) : null; 25 } 26 static getFullyQualifiedName() { 27 return 'TableA'; 28 } 29 static startTableA(builder) { 30 builder.startObject(1); 31 } 32 static addB(builder, bOffset) { 33 builder.addFieldOffset(0, bOffset, 0); 34 } 35 static endTableA(builder) { 36 const offset = builder.endObject(); 37 return offset; 38 } 39 static createTableA(builder, bOffset) { 40 TableA.startTableA(builder); 41 TableA.addB(builder, bOffset); 42 return TableA.endTableA(builder); 43 } 44 serialize() { 45 return this.bb.bytes(); 46 } 47 static deserialize(buffer) { 48 return TableA.getRootAsTableA(new flatbuffers.ByteBuffer(buffer)); 49 } 50 unpack() { 51 return new TableAT((this.b() !== null ? this.b().unpack() : null)); 52 } 53 unpackTo(_o) { 54 _o.b = (this.b() !== null ? this.b().unpack() : null); 55 } 56} 57export class TableAT { 58 constructor(b = null) { 59 this.b = b; 60 } 61 pack(builder) { 62 const b = (this.b !== null ? this.b.pack(builder) : 0); 63 return TableA.createTableA(builder, b); 64 } 65} 66