PropertyCollector

public protocol PropertyCollector : AnyObject

Used by generated Swift code to get properties from an entity to store them. Is injected into the code generator; the actual implementation is in FlatBufferBuilder.

  • Write a value read from the given entity and write it to the given property.

    Declaration

    Swift

    func collect(_ value: Bool, at propertyOffset: UInt16)
  • Write a value read from the given entity and write it to the given property.

    Declaration

    Swift

    func collect(_ value: Int8, at propertyOffset: UInt16)
  • Write a value read from the given entity and write it to the given property.

    Declaration

    Swift

    func collect(_ value: Int16, at propertyOffset: UInt16)
  • Write a value read from the given entity and write it to the given property.

    Declaration

    Swift

    func collect(_ value: Int32, at propertyOffset: UInt16)
  • Write a value read from the given entity and write it to the given property.

    Declaration

    Swift

    func collect(_ value: Int64, at propertyOffset: UInt16)
  • Write a value read from the given entity and write it to the given property.

    Declaration

    Swift

    func collect(_ value: UInt8, at propertyOffset: UInt16)
  • Write a value read from the given entity and write it to the given property.

    Declaration

    Swift

    func collect(_ value: UInt16, at propertyOffset: UInt16)
  • Write a value read from the given entity and write it to the given property.

    Declaration

    Swift

    func collect(_ value: UInt32, at propertyOffset: UInt16)
  • Write a value read from the given entity and write it to the given property.

    Declaration

    Swift

    func collect(_ value: UInt64, at propertyOffset: UInt16)
  • Write a value read from the given entity and write it to the given property.

    Declaration

    Swift

    func collect(_ value: Float, at propertyOffset: UInt16)
  • Write a value read from the given entity and write it to the given property.

    Declaration

    Swift

    func collect(_ value: Double, at propertyOffset: UInt16)
  • Write a value read from the given entity and write it to the given property.

    Declaration

    Swift

    func collect(_ date: Date?, at propertyOffset: UInt16)
  • Declaration

    Swift

    func collect(_ value: Int, at propertyOffset: UInt16)

    Parameters

    value

    Treated as Int64, effectively ignoring 32bit platforms.

  • Declaration

    Swift

    func collect(_ value: UInt, at propertyOffset: UInt16)

    Parameters

    value

    Treated as Int64, effectively ignoring 32bit platforms.

  • Declaration

    Swift

    func collect(dataOffset: OBXDataOffset, at propertyOffset: UInt16)

    Parameters

    dataOffset

    If this is 0, the function does nothing.

  • Declaration

    Swift

    func prepare(string: String?, at propertyOffset: UInt16) -> OBXDataOffset

    Return Value

    A value > 0 when a string value is prepared; 0 if the property is skipped.

  • Declaration

    Swift

    func prepare(bytes data: Data?, at propertyOffset: UInt16) -> OBXDataOffset

    Return Value

    A value > 0 when a data value is prepared; 0 if the property is skipped.

  • Declaration

    Swift

    func prepare(bytes: [UInt8]?, at propertyOffset: UInt16) -> OBXDataOffset

    Return Value

    A value > 0 when a data value is prepared; 0 if the property is skipped.