mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-06 21:37:36 +00:00
65 lines
1.4 KiB
TypeScript
65 lines
1.4 KiB
TypeScript
// automatically generated by the FlatBuffers compiler, do not modify
|
|
|
|
/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
|
|
|
|
import * as flatbuffers from 'flatbuffers';
|
|
|
|
|
|
|
|
export class EvenMoreStruct implements flatbuffers.IUnpackableObject<EvenMoreStructT> {
|
|
bb: flatbuffers.ByteBuffer|null = null;
|
|
bb_pos: number = 0;
|
|
__init(i:number, bb:flatbuffers.ByteBuffer):EvenMoreStruct {
|
|
this.bb_pos = i;
|
|
this.bb = bb;
|
|
return this;
|
|
}
|
|
|
|
g(index: number):bigint|null {
|
|
return this.bb!.readInt64(this.bb_pos + 0 + index * 8);
|
|
}
|
|
|
|
static getFullyQualifiedName(): "EvenMoreStruct" {
|
|
return 'EvenMoreStruct';
|
|
}
|
|
|
|
static sizeOf():number {
|
|
return 16;
|
|
}
|
|
|
|
static createEvenMoreStruct(builder:flatbuffers.Builder, g: bigint[]):flatbuffers.Offset {
|
|
builder.prep(8, 16);
|
|
|
|
for (let i = 1; i >= 0; --i) {
|
|
builder.writeInt64(BigInt(g?.[i] ?? 0));
|
|
}
|
|
|
|
return builder.offset();
|
|
}
|
|
|
|
|
|
unpack(): EvenMoreStructT {
|
|
return new EvenMoreStructT(
|
|
this.bb!.createScalarList<bigint>(this.g.bind(this), 2)
|
|
);
|
|
}
|
|
|
|
|
|
unpackTo(_o: EvenMoreStructT): void {
|
|
_o.g = this.bb!.createScalarList<bigint>(this.g.bind(this), 2);
|
|
}
|
|
}
|
|
|
|
export class EvenMoreStructT implements flatbuffers.IGeneratedObject {
|
|
constructor(
|
|
public g: (bigint)[] = []
|
|
){}
|
|
|
|
|
|
pack(builder:flatbuffers.Builder): flatbuffers.Offset {
|
|
return EvenMoreStruct.createEvenMoreStruct(builder,
|
|
this.g
|
|
);
|
|
}
|
|
}
|