mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-27 08:52:18 +00:00
bulk code format fix (#8707)
This commit is contained in:
@@ -1,51 +1,54 @@
|
||||
// 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 */
|
||||
/* 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 Monster {
|
||||
constructor() {
|
||||
this.bb = null;
|
||||
this.bb_pos = 0;
|
||||
}
|
||||
__init(i, bb) {
|
||||
this.bb_pos = i;
|
||||
this.bb = bb;
|
||||
return this;
|
||||
}
|
||||
static getRootAsMonster(bb, obj) {
|
||||
return (obj || new Monster()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
||||
}
|
||||
static getSizePrefixedRootAsMonster(bb, obj) {
|
||||
bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
|
||||
return (obj || new Monster()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
||||
}
|
||||
static getFullyQualifiedName() {
|
||||
return 'MyGame.Example2.Monster';
|
||||
}
|
||||
static startMonster(builder) {
|
||||
builder.startObject(0);
|
||||
}
|
||||
static endMonster(builder) {
|
||||
const offset = builder.endObject();
|
||||
return offset;
|
||||
}
|
||||
static createMonster(builder) {
|
||||
Monster.startMonster(builder);
|
||||
return Monster.endMonster(builder);
|
||||
}
|
||||
serialize() {
|
||||
return this.bb.bytes();
|
||||
}
|
||||
static deserialize(buffer) {
|
||||
return Monster.getRootAsMonster(new flatbuffers.ByteBuffer(buffer));
|
||||
}
|
||||
unpack() {
|
||||
return new MonsterT();
|
||||
}
|
||||
unpackTo(_o) { }
|
||||
constructor() {
|
||||
this.bb = null;
|
||||
this.bb_pos = 0;
|
||||
}
|
||||
__init(i, bb) {
|
||||
this.bb_pos = i;
|
||||
this.bb = bb;
|
||||
return this;
|
||||
}
|
||||
static getRootAsMonster(bb, obj) {
|
||||
return (obj || new Monster())
|
||||
.__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
||||
}
|
||||
static getSizePrefixedRootAsMonster(bb, obj) {
|
||||
bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
|
||||
return (obj || new Monster())
|
||||
.__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
||||
}
|
||||
static getFullyQualifiedName() {
|
||||
return 'MyGame.Example2.Monster';
|
||||
}
|
||||
static startMonster(builder) {
|
||||
builder.startObject(0);
|
||||
}
|
||||
static endMonster(builder) {
|
||||
const offset = builder.endObject();
|
||||
return offset;
|
||||
}
|
||||
static createMonster(builder) {
|
||||
Monster.startMonster(builder);
|
||||
return Monster.endMonster(builder);
|
||||
}
|
||||
serialize() {
|
||||
return this.bb.bytes();
|
||||
}
|
||||
static deserialize(buffer) {
|
||||
return Monster.getRootAsMonster(new flatbuffers.ByteBuffer(buffer));
|
||||
}
|
||||
unpack() {
|
||||
return new MonsterT();
|
||||
}
|
||||
unpackTo(_o) {}
|
||||
}
|
||||
export class MonsterT {
|
||||
constructor() { }
|
||||
pack(builder) {
|
||||
return Monster.createMonster(builder);
|
||||
}
|
||||
constructor() {}
|
||||
pack(builder) {
|
||||
return Monster.createMonster(builder);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user