dart - add Packable interface (#6846)

This commit is contained in:
Ivan Dlugos
2021-09-28 22:23:30 +02:00
committed by GitHub
parent 2ece9e25b4
commit b9d43a557c
14 changed files with 66 additions and 30 deletions

View File

@@ -77,6 +77,12 @@ class BufferContext {
int _getUint8(int offset) => _buffer.getUint8(offset);
}
/// Interface implemented by the "object-api" classes (ending with "T").
abstract class Packable {
/// Serialize the object using the given builder, returning the offset.
int pack(Builder fbBuilder);
}
/// Class implemented by typed builders generated by flatc.
abstract class ObjectBuilder {
int? _firstOffset;