1 // automatically generated by the FlatBuffers compiler, do not modify
5 public struct Property: NativeStruct {
7 static func validateVersion() { FlatBuffersVersion_1_12_0() }
9 public var property: Bool
12 public struct Property_Mutable: FlatBufferObject {
14 static func validateVersion() { FlatBuffersVersion_1_12_0() }
15 public var __buffer: ByteBuffer! { return _accessor.bb }
16 private var _accessor: Struct
18 public static var size = 1
19 public static var alignment = 1
20 public init(_ bb: ByteBuffer, o: Int32) { _accessor = Struct(bb: bb, position: o) }
22 public var property: Bool { return _accessor.readBuffer(of: Bool.self, at: 0) }
23 @discardableResult public func mutate(property: Bool) -> Bool { return _accessor.mutate(property, index: 0) }
26 public struct TestMutatingBool: FlatBufferObject {
28 static func validateVersion() { FlatBuffersVersion_1_12_0() }
29 public var __buffer: ByteBuffer! { return _accessor.bb }
30 private var _accessor: Table
32 public static func getRootAsTestMutatingBool(bb: ByteBuffer) -> TestMutatingBool { return TestMutatingBool(Table(bb: bb, position: Int32(bb.read(def: UOffset.self, position: bb.reader)) + Int32(bb.reader))) }
34 private init(_ t: Table) { _accessor = t }
35 public init(_ bb: ByteBuffer, o: Int32) { _accessor = Table(bb: bb, position: o) }
37 enum VTOFFSET: VOffset {
39 var v: Int32 { Int32(self.rawValue) }
40 var p: VOffset { self.rawValue }
43 public var b: Property? { let o = _accessor.offset(VTOFFSET.b.v); return o == 0 ? nil : _accessor.readBuffer(of: Property.self, at: o) }
44 public var mutableB: Property_Mutable? { let o = _accessor.offset(VTOFFSET.b.v); return o == 0 ? nil : Property_Mutable(_accessor.bb, o: o + _accessor.postion) }
45 public static func startTestMutatingBool(_ fbb: inout FlatBufferBuilder) -> UOffset { fbb.startTable(with: 1) }
46 public static func add(b: Property?, _ fbb: inout FlatBufferBuilder) { guard let b = b else { return }; _ = fbb.create(struct: b, position: VTOFFSET.b.p) }
47 public static func endTestMutatingBool(_ fbb: inout FlatBufferBuilder, start: UOffset) -> Offset { let end = Offset(offset: fbb.endTable(at: start)); return end }