• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// automatically generated by the FlatBuffers compiler, do not modify
2
3/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
4
5import * as flatbuffers from 'flatbuffers';
6
7
8
9export class Rapunzel implements flatbuffers.IUnpackableObject<RapunzelT> {
10  bb: flatbuffers.ByteBuffer|null = null;
11  bb_pos = 0;
12  __init(i:number, bb:flatbuffers.ByteBuffer):Rapunzel {
13  this.bb_pos = i;
14  this.bb = bb;
15  return this;
16}
17
18hairLength():number {
19  return this.bb!.readInt32(this.bb_pos);
20}
21
22mutate_hair_length(value:number):boolean {
23  this.bb!.writeInt32(this.bb_pos + 0, value);
24  return true;
25}
26
27static getFullyQualifiedName():string {
28  return 'Rapunzel';
29}
30
31static sizeOf():number {
32  return 4;
33}
34
35static createRapunzel(builder:flatbuffers.Builder, hair_length: number):flatbuffers.Offset {
36  builder.prep(4, 4);
37  builder.writeInt32(hair_length);
38  return builder.offset();
39}
40
41
42unpack(): RapunzelT {
43  return new RapunzelT(
44    this.hairLength()
45  );
46}
47
48
49unpackTo(_o: RapunzelT): void {
50  _o.hairLength = this.hairLength();
51}
52}
53
54export class RapunzelT implements flatbuffers.IGeneratedObject {
55constructor(
56  public hairLength: number = 0
57){}
58
59
60pack(builder:flatbuffers.Builder): flatbuffers.Offset {
61  return Rapunzel.createRapunzel(builder,
62    this.hairLength
63  );
64}
65}
66