2018-07-24 02:03:11 +00:00
|
|
|
// automatically generated by the FlatBuffers compiler, do not modify
|
2019-05-22 18:48:10 +00:00
|
|
|
import flatbuffers
|
2018-07-24 02:03:11 +00:00
|
|
|
|
|
|
|
namespace NamespaceA
|
|
|
|
|
2019-05-22 18:48:10 +00:00
|
|
|
class TableInFirstNS
|
2018-07-24 02:03:11 +00:00
|
|
|
|
|
|
|
namespace NamespaceC
|
|
|
|
|
2019-05-22 18:48:10 +00:00
|
|
|
class TableInC
|
2018-07-24 02:03:11 +00:00
|
|
|
|
|
|
|
namespace NamespaceA
|
|
|
|
|
2019-05-22 18:48:10 +00:00
|
|
|
class SecondTableInA
|
2018-07-24 02:03:11 +00:00
|
|
|
|
2019-05-22 18:48:10 +00:00
|
|
|
class TableInFirstNS : flatbuffers_handle
|
2018-07-24 02:03:11 +00:00
|
|
|
def foo_table():
|
2019-05-22 18:48:10 +00:00
|
|
|
let o = buf_.flatbuffers_field_table(pos_, 4)
|
|
|
|
return if o: NamespaceA_NamespaceB_TableInNestedNS { buf_, o } else: nil
|
2018-07-24 02:03:11 +00:00
|
|
|
def foo_enum():
|
2019-05-22 22:28:16 +00:00
|
|
|
return EnumInNestedNS(buf_.flatbuffers_field_int8(pos_, 6, 0))
|
2021-01-25 17:33:47 +00:00
|
|
|
def foo_union_type():
|
|
|
|
return UnionInNestedNS(buf_.flatbuffers_field_int8(pos_, 8, 0))
|
|
|
|
def foo_union_as_TableInNestedNS():
|
|
|
|
return NamespaceA_NamespaceB_TableInNestedNS { buf_, buf_.flatbuffers_field_table(pos_, 10) }
|
2018-07-24 02:03:11 +00:00
|
|
|
def foo_struct():
|
2021-01-25 17:33:47 +00:00
|
|
|
let o = buf_.flatbuffers_field_struct(pos_, 12)
|
2019-05-22 18:48:10 +00:00
|
|
|
return if o: NamespaceA_NamespaceB_StructInNestedNS { buf_, o } else: nil
|
2018-07-24 02:03:11 +00:00
|
|
|
|
2019-05-22 18:48:10 +00:00
|
|
|
def GetRootAsTableInFirstNS(buf:string): return TableInFirstNS { buf, buf.flatbuffers_indirect(0) }
|
2018-07-24 02:03:11 +00:00
|
|
|
|
2019-05-23 02:42:13 +00:00
|
|
|
struct TableInFirstNSBuilder:
|
|
|
|
b_:flatbuffers_builder
|
|
|
|
def start():
|
2021-01-25 17:33:47 +00:00
|
|
|
b_.StartObject(5)
|
2019-05-23 02:42:13 +00:00
|
|
|
return this
|
|
|
|
def add_foo_table(foo_table:flatbuffers_offset):
|
|
|
|
b_.PrependUOffsetTRelativeSlot(0, foo_table)
|
|
|
|
return this
|
|
|
|
def add_foo_enum(foo_enum:EnumInNestedNS):
|
|
|
|
b_.PrependInt8Slot(1, foo_enum, 0)
|
|
|
|
return this
|
2021-01-25 17:33:47 +00:00
|
|
|
def add_foo_union_type(foo_union_type:UnionInNestedNS):
|
|
|
|
b_.PrependUint8Slot(2, foo_union_type, 0)
|
|
|
|
return this
|
|
|
|
def add_foo_union(foo_union:flatbuffers_offset):
|
|
|
|
b_.PrependUOffsetTRelativeSlot(3, foo_union)
|
|
|
|
return this
|
2019-05-23 02:42:13 +00:00
|
|
|
def add_foo_struct(foo_struct:flatbuffers_offset):
|
2021-01-25 17:33:47 +00:00
|
|
|
b_.PrependStructSlot(4, foo_struct)
|
2019-05-23 02:42:13 +00:00
|
|
|
return this
|
|
|
|
def end():
|
|
|
|
return b_.EndObject()
|
2018-07-24 02:03:11 +00:00
|
|
|
|
|
|
|
namespace NamespaceC
|
|
|
|
|
2019-05-22 18:48:10 +00:00
|
|
|
class TableInC : flatbuffers_handle
|
2018-07-24 02:03:11 +00:00
|
|
|
def refer_to_a1():
|
2019-05-22 18:48:10 +00:00
|
|
|
let o = buf_.flatbuffers_field_table(pos_, 4)
|
|
|
|
return if o: NamespaceA_TableInFirstNS { buf_, o } else: nil
|
2018-07-24 02:03:11 +00:00
|
|
|
def refer_to_a2():
|
2019-05-22 18:48:10 +00:00
|
|
|
let o = buf_.flatbuffers_field_table(pos_, 6)
|
|
|
|
return if o: NamespaceA_SecondTableInA { buf_, o } else: nil
|
2018-07-24 02:03:11 +00:00
|
|
|
|
2019-05-22 18:48:10 +00:00
|
|
|
def GetRootAsTableInC(buf:string): return TableInC { buf, buf.flatbuffers_indirect(0) }
|
2018-07-24 02:03:11 +00:00
|
|
|
|
2019-05-23 02:42:13 +00:00
|
|
|
struct TableInCBuilder:
|
|
|
|
b_:flatbuffers_builder
|
|
|
|
def start():
|
|
|
|
b_.StartObject(2)
|
|
|
|
return this
|
|
|
|
def add_refer_to_a1(refer_to_a1:flatbuffers_offset):
|
|
|
|
b_.PrependUOffsetTRelativeSlot(0, refer_to_a1)
|
|
|
|
return this
|
|
|
|
def add_refer_to_a2(refer_to_a2:flatbuffers_offset):
|
|
|
|
b_.PrependUOffsetTRelativeSlot(1, refer_to_a2)
|
|
|
|
return this
|
|
|
|
def end():
|
|
|
|
return b_.EndObject()
|
2018-07-24 02:03:11 +00:00
|
|
|
|
|
|
|
namespace NamespaceA
|
|
|
|
|
2019-05-22 18:48:10 +00:00
|
|
|
class SecondTableInA : flatbuffers_handle
|
2018-07-24 02:03:11 +00:00
|
|
|
def refer_to_c():
|
2019-05-22 18:48:10 +00:00
|
|
|
let o = buf_.flatbuffers_field_table(pos_, 4)
|
|
|
|
return if o: NamespaceC_TableInC { buf_, o } else: nil
|
2018-07-24 02:03:11 +00:00
|
|
|
|
2019-05-22 18:48:10 +00:00
|
|
|
def GetRootAsSecondTableInA(buf:string): return SecondTableInA { buf, buf.flatbuffers_indirect(0) }
|
2018-07-24 02:03:11 +00:00
|
|
|
|
2019-05-23 02:42:13 +00:00
|
|
|
struct SecondTableInABuilder:
|
|
|
|
b_:flatbuffers_builder
|
|
|
|
def start():
|
|
|
|
b_.StartObject(1)
|
|
|
|
return this
|
|
|
|
def add_refer_to_c(refer_to_c:flatbuffers_offset):
|
|
|
|
b_.PrependUOffsetTRelativeSlot(0, refer_to_c)
|
|
|
|
return this
|
|
|
|
def end():
|
|
|
|
return b_.EndObject()
|
2018-07-24 02:03:11 +00:00
|
|
|
|