mirror of
https://github.com/momo5502/emulator.git
synced 2026-01-21 20:53:56 +00:00
86 lines
2.3 KiB
TypeScript
86 lines
2.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 RunRequest implements flatbuffers.IUnpackableObject<RunRequestT> {
|
|
bb: flatbuffers.ByteBuffer|null = null;
|
|
bb_pos = 0;
|
|
__init(i:number, bb:flatbuffers.ByteBuffer):RunRequest {
|
|
this.bb_pos = i;
|
|
this.bb = bb;
|
|
return this;
|
|
}
|
|
|
|
static getRootAsRunRequest(bb:flatbuffers.ByteBuffer, obj?:RunRequest):RunRequest {
|
|
return (obj || new RunRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
|
}
|
|
|
|
static getSizePrefixedRootAsRunRequest(bb:flatbuffers.ByteBuffer, obj?:RunRequest):RunRequest {
|
|
bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
|
|
return (obj || new RunRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
|
}
|
|
|
|
singleStep():boolean {
|
|
const offset = this.bb!.__offset(this.bb_pos, 4);
|
|
return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false;
|
|
}
|
|
|
|
mutate_single_step(value:boolean):boolean {
|
|
const offset = this.bb!.__offset(this.bb_pos, 4);
|
|
|
|
if (offset === 0) {
|
|
return false;
|
|
}
|
|
|
|
this.bb!.writeInt8(this.bb_pos + offset, +value);
|
|
return true;
|
|
}
|
|
|
|
static startRunRequest(builder:flatbuffers.Builder) {
|
|
builder.startObject(1);
|
|
}
|
|
|
|
static addSingleStep(builder:flatbuffers.Builder, singleStep:boolean) {
|
|
builder.addFieldInt8(0, +singleStep, +false);
|
|
}
|
|
|
|
static endRunRequest(builder:flatbuffers.Builder):flatbuffers.Offset {
|
|
const offset = builder.endObject();
|
|
return offset;
|
|
}
|
|
|
|
static createRunRequest(builder:flatbuffers.Builder, singleStep:boolean):flatbuffers.Offset {
|
|
RunRequest.startRunRequest(builder);
|
|
RunRequest.addSingleStep(builder, singleStep);
|
|
return RunRequest.endRunRequest(builder);
|
|
}
|
|
|
|
unpack(): RunRequestT {
|
|
return new RunRequestT(
|
|
this.singleStep()
|
|
);
|
|
}
|
|
|
|
|
|
unpackTo(_o: RunRequestT): void {
|
|
_o.singleStep = this.singleStep();
|
|
}
|
|
}
|
|
|
|
export class RunRequestT implements flatbuffers.IGeneratedObject {
|
|
constructor(
|
|
public singleStep: boolean = false
|
|
){}
|
|
|
|
|
|
pack(builder:flatbuffers.Builder): flatbuffers.Offset {
|
|
return RunRequest.createRunRequest(builder,
|
|
this.singleStep
|
|
);
|
|
}
|
|
}
|