[Swift] Object API support (#5826)

* Adds Object-api support to swift

* Fixed indentation issues

* Removed indentation within namespaces
This commit is contained in:
mustiikhalil
2020-04-13 19:28:56 +03:00
committed by GitHub
parent 003e164057
commit cb4d0f72e3
14 changed files with 2323 additions and 865 deletions

View File

@@ -6,6 +6,14 @@ public protocol FlatBufferObject {
init(_ bb: ByteBuffer, o: Int32)
}
public protocol NativeTable {}
public protocol ObjectAPI {
associatedtype T
static func pack(_ builder: inout FlatBufferBuilder, obj: inout T) -> Offset<UOffset>
mutating func unpack() -> T
}
/// Readable is structures all the Flatbuffers structs
///
/// Readable is a procotol that each Flatbuffer struct should confirm to since