1// automatically generated by the FlatBuffers compiler, do not modify 2 3package NamespaceC 4 5import ( 6 flatbuffers "github.com/google/flatbuffers/go" 7) 8 9type TableInC struct { 10 _tab flatbuffers.Table 11} 12 13func GetRootAsTableInC(buf []byte, offset flatbuffers.UOffsetT) *TableInC { 14 n := flatbuffers.GetUOffsetT(buf[offset:]) 15 x := &TableInC{} 16 x.Init(buf, n+offset) 17 return x 18} 19 20func (rcv *TableInC) Init(buf []byte, i flatbuffers.UOffsetT) { 21 rcv._tab.Bytes = buf 22 rcv._tab.Pos = i 23} 24 25func (rcv *TableInC) Table() flatbuffers.Table { 26 return rcv._tab 27} 28 29func (rcv *TableInC) ReferToA1(obj *TableInFirstNS) *TableInFirstNS { 30 o := flatbuffers.UOffsetT(rcv._tab.Offset(4)) 31 if o != 0 { 32 x := rcv._tab.Indirect(o + rcv._tab.Pos) 33 if obj == nil { 34 obj = new(TableInFirstNS) 35 } 36 obj.Init(rcv._tab.Bytes, x) 37 return obj 38 } 39 return nil 40} 41 42func (rcv *TableInC) ReferToA2(obj *SecondTableInA) *SecondTableInA { 43 o := flatbuffers.UOffsetT(rcv._tab.Offset(6)) 44 if o != 0 { 45 x := rcv._tab.Indirect(o + rcv._tab.Pos) 46 if obj == nil { 47 obj = new(SecondTableInA) 48 } 49 obj.Init(rcv._tab.Bytes, x) 50 return obj 51 } 52 return nil 53} 54 55func TableInCStart(builder *flatbuffers.Builder) { 56 builder.StartObject(2) 57} 58func TableInCAddReferToA1(builder *flatbuffers.Builder, referToA1 flatbuffers.UOffsetT) { 59 builder.PrependUOffsetTSlot(0, flatbuffers.UOffsetT(referToA1), 0) 60} 61func TableInCAddReferToA2(builder *flatbuffers.Builder, referToA2 flatbuffers.UOffsetT) { 62 builder.PrependUOffsetTSlot(1, flatbuffers.UOffsetT(referToA2), 0) 63} 64func TableInCEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT { 65 return builder.EndObject() 66} 67