1// automatically generated by the FlatBuffers compiler, do not modify 2import flatbuffers 3 4namespace NamespaceA 5 6class TableInFirstNS 7 8namespace NamespaceC 9 10class TableInC 11 12namespace NamespaceA 13 14class SecondTableInA 15 16class TableInFirstNS : flatbuffers_handle 17 def foo_table(): 18 let o = buf_.flatbuffers_field_table(pos_, 4) 19 return if o: NamespaceA_NamespaceB_TableInNestedNS { buf_, o } else: nil 20 def foo_enum(): 21 return EnumInNestedNS(buf_.flatbuffers_field_int8(pos_, 6, 0)) 22 def foo_struct(): 23 let o = buf_.flatbuffers_field_struct(pos_, 8) 24 return if o: NamespaceA_NamespaceB_StructInNestedNS { buf_, o } else: nil 25 26def GetRootAsTableInFirstNS(buf:string): return TableInFirstNS { buf, buf.flatbuffers_indirect(0) } 27 28struct TableInFirstNSBuilder: 29 b_:flatbuffers_builder 30 def start(): 31 b_.StartObject(3) 32 return this 33 def add_foo_table(foo_table:flatbuffers_offset): 34 b_.PrependUOffsetTRelativeSlot(0, foo_table) 35 return this 36 def add_foo_enum(foo_enum:EnumInNestedNS): 37 b_.PrependInt8Slot(1, foo_enum, 0) 38 return this 39 def add_foo_struct(foo_struct:flatbuffers_offset): 40 b_.PrependStructSlot(2, foo_struct) 41 return this 42 def end(): 43 return b_.EndObject() 44 45namespace NamespaceC 46 47class TableInC : flatbuffers_handle 48 def refer_to_a1(): 49 let o = buf_.flatbuffers_field_table(pos_, 4) 50 return if o: NamespaceA_TableInFirstNS { buf_, o } else: nil 51 def refer_to_a2(): 52 let o = buf_.flatbuffers_field_table(pos_, 6) 53 return if o: NamespaceA_SecondTableInA { buf_, o } else: nil 54 55def GetRootAsTableInC(buf:string): return TableInC { buf, buf.flatbuffers_indirect(0) } 56 57struct TableInCBuilder: 58 b_:flatbuffers_builder 59 def start(): 60 b_.StartObject(2) 61 return this 62 def add_refer_to_a1(refer_to_a1:flatbuffers_offset): 63 b_.PrependUOffsetTRelativeSlot(0, refer_to_a1) 64 return this 65 def add_refer_to_a2(refer_to_a2:flatbuffers_offset): 66 b_.PrependUOffsetTRelativeSlot(1, refer_to_a2) 67 return this 68 def end(): 69 return b_.EndObject() 70 71namespace NamespaceA 72 73class SecondTableInA : flatbuffers_handle 74 def refer_to_c(): 75 let o = buf_.flatbuffers_field_table(pos_, 4) 76 return if o: NamespaceC_TableInC { buf_, o } else: nil 77 78def GetRootAsSecondTableInA(buf:string): return SecondTableInA { buf, buf.flatbuffers_indirect(0) } 79 80struct SecondTableInABuilder: 81 b_:flatbuffers_builder 82 def start(): 83 b_.StartObject(1) 84 return this 85 def add_refer_to_c(refer_to_c:flatbuffers_offset): 86 b_.PrependUOffsetTRelativeSlot(0, refer_to_c) 87 return this 88 def end(): 89 return b_.EndObject() 90 91