• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// automatically generated by the FlatBuffers compiler, do not modify
2
3import * as flatbuffers from 'flatbuffers';
4
5import { TableInC, TableInCT } from '../namespace-c/table-in-c';
6
7
8export class SecondTableInA {
9  bb: flatbuffers.ByteBuffer|null = null;
10  bb_pos = 0;
11__init(i:number, bb:flatbuffers.ByteBuffer):SecondTableInA {
12  this.bb_pos = i;
13  this.bb = bb;
14  return this;
15}
16
17static getRootAsSecondTableInA(bb:flatbuffers.ByteBuffer, obj?:SecondTableInA):SecondTableInA {
18  return (obj || new SecondTableInA()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
19}
20
21static getSizePrefixedRootAsSecondTableInA(bb:flatbuffers.ByteBuffer, obj?:SecondTableInA):SecondTableInA {
22  bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
23  return (obj || new SecondTableInA()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
24}
25
26referToC(obj?:TableInC):TableInC|null {
27  const offset = this.bb!.__offset(this.bb_pos, 4);
28  return offset ? (obj || new TableInC()).__init(this.bb!.__indirect(this.bb_pos + offset), this.bb!) : null;
29}
30
31static getFullyQualifiedName():string {
32  return 'NamespaceA.SecondTableInA';
33}
34
35static startSecondTableInA(builder:flatbuffers.Builder) {
36  builder.startObject(1);
37}
38
39static addReferToC(builder:flatbuffers.Builder, referToCOffset:flatbuffers.Offset) {
40  builder.addFieldOffset(0, referToCOffset, 0);
41}
42
43static endSecondTableInA(builder:flatbuffers.Builder):flatbuffers.Offset {
44  const offset = builder.endObject();
45  return offset;
46}
47
48static createSecondTableInA(builder:flatbuffers.Builder, referToCOffset:flatbuffers.Offset):flatbuffers.Offset {
49  SecondTableInA.startSecondTableInA(builder);
50  SecondTableInA.addReferToC(builder, referToCOffset);
51  return SecondTableInA.endSecondTableInA(builder);
52}
53
54unpack(): SecondTableInAT {
55  return new SecondTableInAT(
56    (this.referToC() !== null ? this.referToC()!.unpack() : null)
57  );
58}
59
60
61unpackTo(_o: SecondTableInAT): void {
62  _o.referToC = (this.referToC() !== null ? this.referToC()!.unpack() : null);
63}
64}
65
66export class SecondTableInAT {
67constructor(
68  public referToC: TableInCT|null = null
69){}
70
71
72pack(builder:flatbuffers.Builder): flatbuffers.Offset {
73  const referToC = (this.referToC !== null ? this.referToC!.pack(builder) : 0);
74
75  return SecondTableInA.createSecondTableInA(builder,
76    referToC
77  );
78}
79}
80