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