mirror of
https://github.com/google/flatbuffers.git
synced 2026-07-01 09:51:37 +00:00
Adds a serialize helper function to native table (#6059)
* Adds a serialize helper function to native table * Updated version
This commit is contained in:
@@ -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) }
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user