2018-10-03 18:19:40 +00:00
|
|
|
// Code generated by the FlatBuffers compiler. DO NOT EDIT.
|
2015-11-29 20:31:55 +00:00
|
|
|
|
|
|
|
package NamespaceA
|
|
|
|
|
|
|
|
import (
|
|
|
|
flatbuffers "github.com/google/flatbuffers/go"
|
|
|
|
)
|
2016-08-08 19:18:07 +00:00
|
|
|
|
2015-11-29 20:31:55 +00:00
|
|
|
type TableInFirstNS struct {
|
|
|
|
_tab flatbuffers.Table
|
|
|
|
}
|
|
|
|
|
2016-07-25 21:42:58 +00:00
|
|
|
func GetRootAsTableInFirstNS(buf []byte, offset flatbuffers.UOffsetT) *TableInFirstNS {
|
|
|
|
n := flatbuffers.GetUOffsetT(buf[offset:])
|
|
|
|
x := &TableInFirstNS{}
|
2016-08-08 19:18:07 +00:00
|
|
|
x.Init(buf, n+offset)
|
2016-07-25 21:42:58 +00:00
|
|
|
return x
|
|
|
|
}
|
|
|
|
|
2015-11-29 20:31:55 +00:00
|
|
|
func (rcv *TableInFirstNS) Init(buf []byte, i flatbuffers.UOffsetT) {
|
|
|
|
rcv._tab.Bytes = buf
|
|
|
|
rcv._tab.Pos = i
|
|
|
|
}
|
|
|
|
|
2016-12-22 01:45:27 +00:00
|
|
|
func (rcv *TableInFirstNS) Table() flatbuffers.Table {
|
|
|
|
return rcv._tab
|
|
|
|
}
|
|
|
|
|
2015-11-29 20:31:55 +00:00
|
|
|
func (rcv *TableInFirstNS) FooTable(obj *TableInNestedNS) *TableInNestedNS {
|
|
|
|
o := flatbuffers.UOffsetT(rcv._tab.Offset(4))
|
|
|
|
if o != 0 {
|
|
|
|
x := rcv._tab.Indirect(o + rcv._tab.Pos)
|
|
|
|
if obj == nil {
|
|
|
|
obj = new(TableInNestedNS)
|
|
|
|
}
|
|
|
|
obj.Init(rcv._tab.Bytes, x)
|
|
|
|
return obj
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2018-10-08 21:25:37 +00:00
|
|
|
func (rcv *TableInFirstNS) FooEnum() EnumInNestedNS {
|
2015-11-29 20:31:55 +00:00
|
|
|
o := flatbuffers.UOffsetT(rcv._tab.Offset(6))
|
|
|
|
if o != 0 {
|
|
|
|
return rcv._tab.GetInt8(o + rcv._tab.Pos)
|
|
|
|
}
|
|
|
|
return 0
|
|
|
|
}
|
|
|
|
|
2018-10-08 21:25:37 +00:00
|
|
|
func (rcv *TableInFirstNS) MutateFooEnum(n EnumInNestedNS) bool {
|
2016-07-21 00:43:03 +00:00
|
|
|
return rcv._tab.MutateInt8Slot(6, n)
|
|
|
|
}
|
|
|
|
|
2015-11-29 20:31:55 +00:00
|
|
|
func (rcv *TableInFirstNS) FooStruct(obj *StructInNestedNS) *StructInNestedNS {
|
|
|
|
o := flatbuffers.UOffsetT(rcv._tab.Offset(8))
|
|
|
|
if o != 0 {
|
|
|
|
x := o + rcv._tab.Pos
|
|
|
|
if obj == nil {
|
|
|
|
obj = new(StructInNestedNS)
|
|
|
|
}
|
|
|
|
obj.Init(rcv._tab.Bytes, x)
|
|
|
|
return obj
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2016-08-08 19:18:07 +00:00
|
|
|
func TableInFirstNSStart(builder *flatbuffers.Builder) {
|
|
|
|
builder.StartObject(3)
|
|
|
|
}
|
|
|
|
func TableInFirstNSAddFooTable(builder *flatbuffers.Builder, fooTable flatbuffers.UOffsetT) {
|
|
|
|
builder.PrependUOffsetTSlot(0, flatbuffers.UOffsetT(fooTable), 0)
|
|
|
|
}
|
|
|
|
func TableInFirstNSAddFooEnum(builder *flatbuffers.Builder, fooEnum int8) {
|
|
|
|
builder.PrependInt8Slot(1, fooEnum, 0)
|
|
|
|
}
|
|
|
|
func TableInFirstNSAddFooStruct(builder *flatbuffers.Builder, fooStruct flatbuffers.UOffsetT) {
|
|
|
|
builder.PrependStructSlot(2, flatbuffers.UOffsetT(fooStruct), 0)
|
|
|
|
}
|
|
|
|
func TableInFirstNSEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT {
|
|
|
|
return builder.EndObject()
|
|
|
|
}
|