• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// Code generated by the FlatBuffers compiler. DO NOT EDIT.
2
3package NamespaceC
4
5import (
6	flatbuffers "github.com/google/flatbuffers/go"
7
8	NamespaceA "NamespaceA"
9)
10
11type TableInCT struct {
12	ReferToA1 *NamespaceA.TableInFirstNST
13	ReferToA2 *NamespaceA.SecondTableInAT
14}
15
16func (t *TableInCT) Pack(builder *flatbuffers.Builder) flatbuffers.UOffsetT {
17	if t == nil { return 0 }
18	referToA1Offset := t.ReferToA1.Pack(builder)
19	referToA2Offset := t.ReferToA2.Pack(builder)
20	TableInCStart(builder)
21	TableInCAddReferToA1(builder, referToA1Offset)
22	TableInCAddReferToA2(builder, referToA2Offset)
23	return TableInCEnd(builder)
24}
25
26func (rcv *TableInC) UnPackTo(t *TableInCT) {
27	t.ReferToA1 = rcv.ReferToA1(nil).UnPack()
28	t.ReferToA2 = rcv.ReferToA2(nil).UnPack()
29}
30
31func (rcv *TableInC) UnPack() *TableInCT {
32	if rcv == nil { return nil }
33	t := &TableInCT{}
34	rcv.UnPackTo(t)
35	return t
36}
37
38type TableInC struct {
39	_tab flatbuffers.Table
40}
41
42func GetRootAsTableInC(buf []byte, offset flatbuffers.UOffsetT) *TableInC {
43	n := flatbuffers.GetUOffsetT(buf[offset:])
44	x := &TableInC{}
45	x.Init(buf, n+offset)
46	return x
47}
48
49func GetSizePrefixedRootAsTableInC(buf []byte, offset flatbuffers.UOffsetT) *TableInC {
50	n := flatbuffers.GetUOffsetT(buf[offset+flatbuffers.SizeUint32:])
51	x := &TableInC{}
52	x.Init(buf, n+offset+flatbuffers.SizeUint32)
53	return x
54}
55
56func (rcv *TableInC) Init(buf []byte, i flatbuffers.UOffsetT) {
57	rcv._tab.Bytes = buf
58	rcv._tab.Pos = i
59}
60
61func (rcv *TableInC) Table() flatbuffers.Table {
62	return rcv._tab
63}
64
65func (rcv *TableInC) ReferToA1(obj *NamespaceA.TableInFirstNS) *NamespaceA.TableInFirstNS {
66	o := flatbuffers.UOffsetT(rcv._tab.Offset(4))
67	if o != 0 {
68		x := rcv._tab.Indirect(o + rcv._tab.Pos)
69		if obj == nil {
70			obj = new(NamespaceA.TableInFirstNS)
71		}
72		obj.Init(rcv._tab.Bytes, x)
73		return obj
74	}
75	return nil
76}
77
78func (rcv *TableInC) ReferToA2(obj *NamespaceA.SecondTableInA) *NamespaceA.SecondTableInA {
79	o := flatbuffers.UOffsetT(rcv._tab.Offset(6))
80	if o != 0 {
81		x := rcv._tab.Indirect(o + rcv._tab.Pos)
82		if obj == nil {
83			obj = new(NamespaceA.SecondTableInA)
84		}
85		obj.Init(rcv._tab.Bytes, x)
86		return obj
87	}
88	return nil
89}
90
91func TableInCStart(builder *flatbuffers.Builder) {
92	builder.StartObject(2)
93}
94func TableInCAddReferToA1(builder *flatbuffers.Builder, referToA1 flatbuffers.UOffsetT) {
95	builder.PrependUOffsetTSlot(0, flatbuffers.UOffsetT(referToA1), 0)
96}
97func TableInCAddReferToA2(builder *flatbuffers.Builder, referToA2 flatbuffers.UOffsetT) {
98	builder.PrependUOffsetTSlot(1, flatbuffers.UOffsetT(referToA2), 0)
99}
100func TableInCEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT {
101	return builder.EndObject()
102}
103