1// automatically generated by the FlatBuffers compiler, do not modify 2 3import * as flatbuffers from 'flatbuffers'; 4 5 6 7export class TableInNestedNS { 8 bb: flatbuffers.ByteBuffer|null = null; 9 bb_pos = 0; 10__init(i:number, bb:flatbuffers.ByteBuffer):TableInNestedNS { 11 this.bb_pos = i; 12 this.bb = bb; 13 return this; 14} 15 16static getRootAsTableInNestedNS(bb:flatbuffers.ByteBuffer, obj?:TableInNestedNS):TableInNestedNS { 17 return (obj || new TableInNestedNS()).__init(bb.readInt32(bb.position()) + bb.position(), bb); 18} 19 20static getSizePrefixedRootAsTableInNestedNS(bb:flatbuffers.ByteBuffer, obj?:TableInNestedNS):TableInNestedNS { 21 bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); 22 return (obj || new TableInNestedNS()).__init(bb.readInt32(bb.position()) + bb.position(), bb); 23} 24 25foo():number { 26 const offset = this.bb!.__offset(this.bb_pos, 4); 27 return offset ? this.bb!.readInt32(this.bb_pos + offset) : 0; 28} 29 30mutate_foo(value:number):boolean { 31 const offset = this.bb!.__offset(this.bb_pos, 4); 32 33 if (offset === 0) { 34 return false; 35 } 36 37 this.bb!.writeInt32(this.bb_pos + offset, value); 38 return true; 39} 40 41static getFullyQualifiedName():string { 42 return 'NamespaceA.NamespaceB.TableInNestedNS'; 43} 44 45static startTableInNestedNS(builder:flatbuffers.Builder) { 46 builder.startObject(1); 47} 48 49static addFoo(builder:flatbuffers.Builder, foo:number) { 50 builder.addFieldInt32(0, foo, 0); 51} 52 53static endTableInNestedNS(builder:flatbuffers.Builder):flatbuffers.Offset { 54 const offset = builder.endObject(); 55 return offset; 56} 57 58static createTableInNestedNS(builder:flatbuffers.Builder, foo:number):flatbuffers.Offset { 59 TableInNestedNS.startTableInNestedNS(builder); 60 TableInNestedNS.addFoo(builder, foo); 61 return TableInNestedNS.endTableInNestedNS(builder); 62} 63 64unpack(): TableInNestedNST { 65 return new TableInNestedNST( 66 this.foo() 67 ); 68} 69 70 71unpackTo(_o: TableInNestedNST): void { 72 _o.foo = this.foo(); 73} 74} 75 76export class TableInNestedNST { 77constructor( 78 public foo: number = 0 79){} 80 81 82pack(builder:flatbuffers.Builder): flatbuffers.Offset { 83 return TableInNestedNS.createTableInNestedNS(builder, 84 this.foo 85 ); 86} 87} 88