blob: d51f3d91638f82808938bcc852ced924123d7397 [file] [log] [blame]
// automatically generated by the FlatBuffers compiler, do not modify
import FlatBuffers
public struct Property: Readable {
static func validateVersion() { FlatBuffersVersion_1_12_0() }
public var __buffer: ByteBuffer! { return _accessor.bb }
private var _accessor: Struct
public static var size = 1
public static var alignment = 1
public init(_ bb: ByteBuffer, o: Int32) { _accessor = Struct(bb: bb, position: o) }
public var property: Bool { return _accessor.readBuffer(of: Bool.self, at: 0) }
@discardableResult public func mutate(property: Bool) -> Bool { return _accessor.mutate(property, index: 0) }
}
public func createProperty(builder: inout FlatBufferBuilder, property: Bool = false) -> Offset<UOffset> {
builder.createStructOf(size: Property.size, alignment: Property.alignment)
builder.reverseAdd(v: property, postion: 0)
return builder.endStruct()
}
public struct TestMutatingBool: FlatBufferObject {
static func validateVersion() { FlatBuffersVersion_1_12_0() }
public var __buffer: ByteBuffer! { return _accessor.bb }
private var _accessor: Table
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))) }
private init(_ t: Table) { _accessor = t }
public init(_ bb: ByteBuffer, o: Int32) { _accessor = Table(bb: bb, position: o) }
enum VTOFFSET: VOffset {
case b = 4
var v: Int32 { Int32(self.rawValue) }
var p: VOffset { self.rawValue }
}
public var b: Property? { let o = _accessor.offset(VTOFFSET.b.v); return o == 0 ? nil : Property(_accessor.bb, o: o + _accessor.postion) }
public static func startTestMutatingBool(_ fbb: inout FlatBufferBuilder) -> UOffset { fbb.startTable(with: 1) }
public static func add(b: Offset<UOffset>, _ fbb: inout FlatBufferBuilder) { fbb.add(structOffset: VTOFFSET.b.p) }
public static func endTestMutatingBool(_ fbb: inout FlatBufferBuilder, start: UOffset) -> Offset<UOffset> { let end = Offset<UOffset>(offset: fbb.endTable(at: start)); return end }
}