blob: fca1668c46e8c60b2426badab97c28a7aad4f20c [file] [log] [blame]
James Kuszmaul8e62b022022-03-22 09:33:25 -07001// automatically generated by the FlatBuffers compiler, do not modify
2import * as flatbuffers from 'flatbuffers';
3export class TableInNestedNS {
4 constructor() {
5 this.bb = null;
6 this.bb_pos = 0;
7 }
8 __init(i, bb) {
9 this.bb_pos = i;
10 this.bb = bb;
11 return this;
12 }
13 static getRootAsTableInNestedNS(bb, obj) {
14 return (obj || new TableInNestedNS()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
15 }
16 static getSizePrefixedRootAsTableInNestedNS(bb, obj) {
17 bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
18 return (obj || new TableInNestedNS()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
19 }
20 foo() {
21 const offset = this.bb.__offset(this.bb_pos, 4);
22 return offset ? this.bb.readInt32(this.bb_pos + offset) : 0;
23 }
24 mutate_foo(value) {
25 const offset = this.bb.__offset(this.bb_pos, 4);
26 if (offset === 0) {
27 return false;
28 }
29 this.bb.writeInt32(this.bb_pos + offset, value);
30 return true;
31 }
32 static getFullyQualifiedName() {
33 return 'NamespaceA.NamespaceB.TableInNestedNS';
34 }
35 static startTableInNestedNS(builder) {
36 builder.startObject(1);
37 }
38 static addFoo(builder, foo) {
39 builder.addFieldInt32(0, foo, 0);
40 }
41 static endTableInNestedNS(builder) {
42 const offset = builder.endObject();
43 return offset;
44 }
45 static createTableInNestedNS(builder, foo) {
46 TableInNestedNS.startTableInNestedNS(builder);
47 TableInNestedNS.addFoo(builder, foo);
48 return TableInNestedNS.endTableInNestedNS(builder);
49 }
50 unpack() {
51 return new TableInNestedNST(this.foo());
52 }
53 unpackTo(_o) {
54 _o.foo = this.foo();
55 }
56}
57export class TableInNestedNST {
58 constructor(foo = 0) {
59 this.foo = foo;
60 }
61 pack(builder) {
62 return TableInNestedNS.createTableInNestedNS(builder, this.foo);
63 }
64}