• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// automatically generated by the FlatBuffers compiler, do not modify
2
3import * as flatbuffers from 'flatbuffers';
4
5
6
7export class HelloReply {
8  bb: flatbuffers.ByteBuffer|null = null;
9  bb_pos = 0;
10__init(i:number, bb:flatbuffers.ByteBuffer):HelloReply {
11  this.bb_pos = i;
12  this.bb = bb;
13  return this;
14}
15
16static getRootAsHelloReply(bb:flatbuffers.ByteBuffer, obj?:HelloReply):HelloReply {
17  return (obj || new HelloReply()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
18}
19
20static getSizePrefixedRootAsHelloReply(bb:flatbuffers.ByteBuffer, obj?:HelloReply):HelloReply {
21  bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
22  return (obj || new HelloReply()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
23}
24
25message():string|null
26message(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
27message(optionalEncoding?:any):string|Uint8Array|null {
28  const offset = this.bb!.__offset(this.bb_pos, 4);
29  return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
30}
31
32static startHelloReply(builder:flatbuffers.Builder) {
33  builder.startObject(1);
34}
35
36static addMessage(builder:flatbuffers.Builder, messageOffset:flatbuffers.Offset) {
37  builder.addFieldOffset(0, messageOffset, 0);
38}
39
40static endHelloReply(builder:flatbuffers.Builder):flatbuffers.Offset {
41  const offset = builder.endObject();
42  return offset;
43}
44
45static createHelloReply(builder:flatbuffers.Builder, messageOffset:flatbuffers.Offset):flatbuffers.Offset {
46  HelloReply.startHelloReply(builder);
47  HelloReply.addMessage(builder, messageOffset);
48  return HelloReply.endHelloReply(builder);
49}
50
51serialize():Uint8Array {
52  return this.bb!.bytes();
53}
54
55static deserialize(buffer: Uint8Array):HelloReply {
56  return HelloReply.getRootAsHelloReply(new flatbuffers.ByteBuffer(buffer))
57}
58}
59