1// Code generated by the FlatBuffers compiler. DO NOT EDIT. 2 3package NamespaceB 4 5import ( 6 flatbuffers "github.com/google/flatbuffers/go" 7) 8 9type TableInNestedNST struct { 10 Foo int32 11} 12 13func (t *TableInNestedNST) Pack(builder *flatbuffers.Builder) flatbuffers.UOffsetT { 14 if t == nil { return 0 } 15 TableInNestedNSStart(builder) 16 TableInNestedNSAddFoo(builder, t.Foo) 17 return TableInNestedNSEnd(builder) 18} 19 20func (rcv *TableInNestedNS) UnPackTo(t *TableInNestedNST) { 21 t.Foo = rcv.Foo() 22} 23 24func (rcv *TableInNestedNS) UnPack() *TableInNestedNST { 25 if rcv == nil { return nil } 26 t := &TableInNestedNST{} 27 rcv.UnPackTo(t) 28 return t 29} 30 31type TableInNestedNS struct { 32 _tab flatbuffers.Table 33} 34 35func GetRootAsTableInNestedNS(buf []byte, offset flatbuffers.UOffsetT) *TableInNestedNS { 36 n := flatbuffers.GetUOffsetT(buf[offset:]) 37 x := &TableInNestedNS{} 38 x.Init(buf, n+offset) 39 return x 40} 41 42func GetSizePrefixedRootAsTableInNestedNS(buf []byte, offset flatbuffers.UOffsetT) *TableInNestedNS { 43 n := flatbuffers.GetUOffsetT(buf[offset+flatbuffers.SizeUint32:]) 44 x := &TableInNestedNS{} 45 x.Init(buf, n+offset+flatbuffers.SizeUint32) 46 return x 47} 48 49func (rcv *TableInNestedNS) Init(buf []byte, i flatbuffers.UOffsetT) { 50 rcv._tab.Bytes = buf 51 rcv._tab.Pos = i 52} 53 54func (rcv *TableInNestedNS) Table() flatbuffers.Table { 55 return rcv._tab 56} 57 58func (rcv *TableInNestedNS) Foo() int32 { 59 o := flatbuffers.UOffsetT(rcv._tab.Offset(4)) 60 if o != 0 { 61 return rcv._tab.GetInt32(o + rcv._tab.Pos) 62 } 63 return 0 64} 65 66func (rcv *TableInNestedNS) MutateFoo(n int32) bool { 67 return rcv._tab.MutateInt32Slot(4, n) 68} 69 70func TableInNestedNSStart(builder *flatbuffers.Builder) { 71 builder.StartObject(1) 72} 73func TableInNestedNSAddFoo(builder *flatbuffers.Builder, foo int32) { 74 builder.PrependInt32Slot(0, foo, 0) 75} 76func TableInNestedNSEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT { 77 return builder.EndObject() 78} 79