Adds a serialize helper function to native table (#6059)

* Adds a serialize helper function to native table
* Updated version
This commit is contained in:
mustiikhalil
2020-08-04 13:53:40 +03:00
committed by GitHub
parent c30a87de6f
commit 63cc0eec4e
7 changed files with 86 additions and 37 deletions

View File

@@ -145,7 +145,7 @@ extension BookReader {
}
public struct Attacker: FlatBufferObject {
public struct Attacker: FlatBufferObject, ObjectAPI {
static func validateVersion() { FlatBuffersVersion_1_12_0() }
public var __buffer: ByteBuffer! { return _accessor.bb }
@@ -205,8 +205,10 @@ public class AttackerT: NativeTable {
swordAttackDamage = 0
}
func serialize() -> ByteBuffer { return serialize(type: Attacker.self) }
}
public struct Movie: FlatBufferObject {
public struct Movie: FlatBufferObject, ObjectAPI {
static func validateVersion() { FlatBuffersVersion_1_12_0() }
public var __buffer: ByteBuffer! { return _accessor.bb }
@@ -329,4 +331,6 @@ public class MovieT: NativeTable {
characters = []
}
func serialize() -> ByteBuffer { return serialize(type: Movie.self) }
}