blob: cdb02278baff55655e64ee011f043ac9ff910cc4 [file] [log] [blame]
Austin Schuh272c6132020-11-14 16:37:52 -08001import Foundation
2
3/// Offset object for all the Objects that are written into the buffer
4public struct Offset<T> {
5 /// Offset of the object in the buffer
6 public var o: UOffset
7 /// Returns false if the offset is equal to zero
8 public var isEmpty: Bool { return o == 0 }
9
10 public init(offset: UOffset) { o = offset }
11 public init() { o = 0 }
12}