forked from google/flatbuffers
-
Notifications
You must be signed in to change notification settings - Fork 0
/
TableInC.go
46 lines (40 loc) · 1.34 KB
/
TableInC.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
// automatically generated by the FlatBuffers compiler, do not modify
package NamespaceA
import (
flatbuffers "github.com/google/flatbuffers/go"
)
type TableInC struct {
_tab flatbuffers.Table
}
func (rcv *TableInC) Init(buf []byte, i flatbuffers.UOffsetT) {
rcv._tab.Bytes = buf
rcv._tab.Pos = i
}
func (rcv *TableInC) ReferToA1(obj *TableInFirstNS) *TableInFirstNS {
o := flatbuffers.UOffsetT(rcv._tab.Offset(4))
if o != 0 {
x := rcv._tab.Indirect(o + rcv._tab.Pos)
if obj == nil {
obj = new(TableInFirstNS)
}
obj.Init(rcv._tab.Bytes, x)
return obj
}
return nil
}
func (rcv *TableInC) ReferToA2(obj *SecondTableInA) *SecondTableInA {
o := flatbuffers.UOffsetT(rcv._tab.Offset(6))
if o != 0 {
x := rcv._tab.Indirect(o + rcv._tab.Pos)
if obj == nil {
obj = new(SecondTableInA)
}
obj.Init(rcv._tab.Bytes, x)
return obj
}
return nil
}
func TableInCStart(builder *flatbuffers.Builder) { builder.StartObject(2) }
func TableInCAddReferToA1(builder *flatbuffers.Builder, referToA1 flatbuffers.UOffsetT) { builder.PrependUOffsetTSlot(0, flatbuffers.UOffsetT(referToA1), 0) }
func TableInCAddReferToA2(builder *flatbuffers.Builder, referToA2 flatbuffers.UOffsetT) { builder.PrependUOffsetTSlot(1, flatbuffers.UOffsetT(referToA2), 0) }
func TableInCEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT { return builder.EndObject() }