• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // automatically generated by the FlatBuffers compiler, do not modify
2 // swiftlint:disable all
3 // swiftformat:disable all
4 
5 import FlatBuffers
6 
7 public struct models_HelloReply: FlatBufferObject {
8 
validateVersionnull9   static func validateVersion() { FlatBuffersVersion_2_0_0() }
10   public var __buffer: ByteBuffer! { return _accessor.bb }
11   private var _accessor: Table
12 
getRootAsHelloReplynull13   public static func getRootAsHelloReply(bb: ByteBuffer) -> models_HelloReply { return models_HelloReply(Table(bb: bb, position: Int32(bb.read(def: UOffset.self, position: bb.reader)) + Int32(bb.reader))) }
14 
15   private init(_ t: Table) { _accessor = t }
16   public init(_ bb: ByteBuffer, o: Int32) { _accessor = Table(bb: bb, position: o) }
17 
18   private enum VTOFFSET: VOffset {
19     case message = 4
20     var v: Int32 { Int32(self.rawValue) }
21     var p: VOffset { self.rawValue }
22   }
23 
24   public var message: String? { let o = _accessor.offset(VTOFFSET.message.v); return o == 0 ? nil : _accessor.string(at: o) }
25   public var messageSegmentArray: [UInt8]? { return _accessor.getVector(at: VTOFFSET.message.v) }
startHelloReplynull26   public static func startHelloReply(_ fbb: inout FlatBufferBuilder) -> UOffset { fbb.startTable(with: 1) }
addnull27   public static func add(message: Offset, _ fbb: inout FlatBufferBuilder) { fbb.add(offset: message, at: VTOFFSET.message.p) }
endHelloReplynull28   public static func endHelloReply(_ fbb: inout FlatBufferBuilder, start: UOffset) -> Offset { let end = Offset(offset: fbb.endTable(at: start)); return end }
29   public static func createHelloReply(
30     _ fbb: inout FlatBufferBuilder,
31     messageOffset message: Offset = Offset()
32   ) -> Offset {
33     let __start = models_HelloReply.startHelloReply(&fbb)
34     models_HelloReply.add(message: message, &fbb)
35     return models_HelloReply.endHelloReply(&fbb, start: __start)
36   }
37 }
38 
39 public struct models_HelloRequest: FlatBufferObject {
40 
validateVersionnull41   static func validateVersion() { FlatBuffersVersion_2_0_0() }
42   public var __buffer: ByteBuffer! { return _accessor.bb }
43   private var _accessor: Table
44 
getRootAsHelloRequestnull45   public static func getRootAsHelloRequest(bb: ByteBuffer) -> models_HelloRequest { return models_HelloRequest(Table(bb: bb, position: Int32(bb.read(def: UOffset.self, position: bb.reader)) + Int32(bb.reader))) }
46 
47   private init(_ t: Table) { _accessor = t }
48   public init(_ bb: ByteBuffer, o: Int32) { _accessor = Table(bb: bb, position: o) }
49 
50   private enum VTOFFSET: VOffset {
51     case name = 4
52     var v: Int32 { Int32(self.rawValue) }
53     var p: VOffset { self.rawValue }
54   }
55 
56   public var name: String? { let o = _accessor.offset(VTOFFSET.name.v); return o == 0 ? nil : _accessor.string(at: o) }
57   public var nameSegmentArray: [UInt8]? { return _accessor.getVector(at: VTOFFSET.name.v) }
startHelloRequestnull58   public static func startHelloRequest(_ fbb: inout FlatBufferBuilder) -> UOffset { fbb.startTable(with: 1) }
addnull59   public static func add(name: Offset, _ fbb: inout FlatBufferBuilder) { fbb.add(offset: name, at: VTOFFSET.name.p) }
endHelloRequestnull60   public static func endHelloRequest(_ fbb: inout FlatBufferBuilder, start: UOffset) -> Offset { let end = Offset(offset: fbb.endTable(at: start)); return end }
61   public static func createHelloRequest(
62     _ fbb: inout FlatBufferBuilder,
63     nameOffset name: Offset = Offset()
64   ) -> Offset {
65     let __start = models_HelloRequest.startHelloRequest(&fbb)
66     models_HelloRequest.add(name: name, &fbb)
67     return models_HelloRequest.endHelloRequest(&fbb, start: __start)
68   }
69 }
70 
71