blob: a5fbc66dce698bfe7fd97875ccb064dfb2da2e98 [file] [log] [blame]
Austin Schuh2dd86a92022-09-14 21:19:23 -07001// automatically generated by the FlatBuffers compiler, do not modify
2import { StructOfStructs } from '../../my-game/example/struct-of-structs.js';
3export class StructOfStructsOfStructs {
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 a(obj) {
14 return (obj || new StructOfStructs()).__init(this.bb_pos, this.bb);
15 }
16 static getFullyQualifiedName() {
17 return 'MyGame_Example_StructOfStructsOfStructs';
18 }
19 static sizeOf() {
20 return 20;
21 }
22 static createStructOfStructsOfStructs(builder, a_a_id, a_a_distance, a_b_a, a_b_b, a_c_id, a_c_distance) {
23 builder.prep(4, 20);
24 builder.prep(4, 20);
25 builder.prep(4, 8);
26 builder.writeInt32(a_c_distance);
27 builder.writeInt32(a_c_id);
28 builder.prep(2, 4);
29 builder.pad(1);
30 builder.writeInt8(a_b_b);
31 builder.writeInt16(a_b_a);
32 builder.prep(4, 8);
33 builder.writeInt32(a_a_distance);
34 builder.writeInt32(a_a_id);
35 return builder.offset();
36 }
37 unpack() {
38 return new StructOfStructsOfStructsT((this.a() !== null ? this.a().unpack() : null));
39 }
40 unpackTo(_o) {
41 _o.a = (this.a() !== null ? this.a().unpack() : null);
42 }
43}
44export class StructOfStructsOfStructsT {
45 constructor(a = null) {
46 this.a = a;
47 }
48 pack(builder) {
49 var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _p, _q, _r, _s, _t, _u;
50 return StructOfStructsOfStructs.createStructOfStructsOfStructs(builder, ((_c = (_b = (_a = this.a) === null || _a === void 0 ? void 0 : _a.a) === null || _b === void 0 ? void 0 : _b.id) !== null && _c !== void 0 ? _c : 0), ((_f = (_e = (_d = this.a) === null || _d === void 0 ? void 0 : _d.a) === null || _e === void 0 ? void 0 : _e.distance) !== null && _f !== void 0 ? _f : 0), ((_j = (_h = (_g = this.a) === null || _g === void 0 ? void 0 : _g.b) === null || _h === void 0 ? void 0 : _h.a) !== null && _j !== void 0 ? _j : 0), ((_m = (_l = (_k = this.a) === null || _k === void 0 ? void 0 : _k.b) === null || _l === void 0 ? void 0 : _l.b) !== null && _m !== void 0 ? _m : 0), ((_r = (_q = (_p = this.a) === null || _p === void 0 ? void 0 : _p.c) === null || _q === void 0 ? void 0 : _q.id) !== null && _r !== void 0 ? _r : 0), ((_u = (_t = (_s = this.a) === null || _s === void 0 ? void 0 : _s.c) === null || _t === void 0 ? void 0 : _t.distance) !== null && _u !== void 0 ? _u : 0));
51 }
52}