...

Text file src/github.com/google/flatbuffers/tests/namespace_test/namespace_test1_generated.lobster

Documentation: github.com/google/flatbuffers/tests/namespace_test

     1// automatically generated by the FlatBuffers compiler, do not modify
     2import flatbuffers
     3
     4namespace NamespaceA_NamespaceB
     5
     6enum UnionInNestedNS:
     7    UnionInNestedNS_NONE = 0
     8    UnionInNestedNS_TableInNestedNS = 1
     9
    10enum EnumInNestedNS:
    11    EnumInNestedNS_A = 0
    12    EnumInNestedNS_B = 1
    13    EnumInNestedNS_C = 2
    14
    15class TableInNestedNS
    16
    17class StructInNestedNS
    18
    19class TableInNestedNS : flatbuffers_handle
    20    def foo():
    21        return buf_.flatbuffers_field_int32(pos_, 4, 0)
    22
    23def GetRootAsTableInNestedNS(buf:string): return TableInNestedNS { buf, buf.flatbuffers_indirect(0) }
    24
    25struct TableInNestedNSBuilder:
    26    b_:flatbuffers_builder
    27    def start():
    28        b_.StartObject(1)
    29        return this
    30    def add_foo(foo:int):
    31        b_.PrependInt32Slot(0, foo, 0)
    32        return this
    33    def end():
    34        return b_.EndObject()
    35
    36class StructInNestedNS : flatbuffers_handle
    37    def a():
    38        return buf_.read_int32_le(pos_ + 0)
    39    def b():
    40        return buf_.read_int32_le(pos_ + 4)
    41
    42def CreateStructInNestedNS(b_:flatbuffers_builder, a:int, b:int):
    43    b_.Prep(4, 8)
    44    b_.PrependInt32(b)
    45    b_.PrependInt32(a)
    46    return b_.Offset()
    47

View as plain text