mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-28 22:40:03 +00:00
58 lines
1.3 KiB
TypeScript
58 lines
1.3 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 Unused implements flatbuffers.IUnpackableObject<UnusedT> {
|
|
bb: flatbuffers.ByteBuffer | null = null;
|
|
bb_pos = 0;
|
|
__init(i: number, bb: flatbuffers.ByteBuffer): Unused {
|
|
this.bb_pos = i;
|
|
this.bb = bb;
|
|
return this;
|
|
}
|
|
|
|
a(): number {
|
|
return this.bb!.readInt32(this.bb_pos);
|
|
}
|
|
|
|
mutate_a(value: number): boolean {
|
|
this.bb!.writeInt32(this.bb_pos + 0, value);
|
|
return true;
|
|
}
|
|
|
|
static getFullyQualifiedName(): string {
|
|
return 'MyGame.OtherNameSpace.Unused';
|
|
}
|
|
|
|
static sizeOf(): number {
|
|
return 4;
|
|
}
|
|
|
|
static createUnused(
|
|
builder: flatbuffers.Builder,
|
|
a: number,
|
|
): flatbuffers.Offset {
|
|
builder.prep(4, 4);
|
|
builder.writeInt32(a);
|
|
return builder.offset();
|
|
}
|
|
|
|
unpack(): UnusedT {
|
|
return new UnusedT(this.a());
|
|
}
|
|
|
|
unpackTo(_o: UnusedT): void {
|
|
_o.a = this.a();
|
|
}
|
|
}
|
|
|
|
export class UnusedT implements flatbuffers.IGeneratedObject {
|
|
constructor(public a: number = 0) {}
|
|
|
|
pack(builder: flatbuffers.Builder): flatbuffers.Offset {
|
|
return Unused.createUnused(builder, this.a);
|
|
}
|
|
}
|