-
Notifications
You must be signed in to change notification settings - Fork 4
/
GrandCompanyTable.go
145 lines (126 loc) · 3.76 KB
/
GrandCompanyTable.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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
// Code generated by the FlatBuffers compiler. DO NOT EDIT.
package exports
import (
flatbuffers "github.com/google/flatbuffers/go"
)
type GrandCompanyTable struct {
_tab flatbuffers.Table
}
func GetRootAsGrandCompanyTable(buf []byte, offset flatbuffers.UOffsetT) *GrandCompanyTable {
n := flatbuffers.GetUOffsetT(buf[offset:])
x := &GrandCompanyTable{}
x.Init(buf, n+offset)
return x
}
func (rcv *GrandCompanyTable) Init(buf []byte, i flatbuffers.UOffsetT) {
rcv._tab.Bytes = buf
rcv._tab.Pos = i
}
func (rcv *GrandCompanyTable) Table() flatbuffers.Table {
return rcv._tab
}
func (rcv *GrandCompanyTable) GrandCompanies(obj *GrandCompany, j int) bool {
o := flatbuffers.UOffsetT(rcv._tab.Offset(4))
if o != 0 {
x := rcv._tab.Vector(o)
x += flatbuffers.UOffsetT(j) * 4
x = rcv._tab.Indirect(x)
obj.Init(rcv._tab.Bytes, x)
return true
}
return false
}
func (rcv *GrandCompanyTable) GrandCompaniesLength() int {
o := flatbuffers.UOffsetT(rcv._tab.Offset(4))
if o != 0 {
return rcv._tab.VectorLen(o)
}
return 0
}
func GrandCompanyTableStart(builder *flatbuffers.Builder) {
builder.StartObject(1)
}
func GrandCompanyTableAddGrandCompanies(builder *flatbuffers.Builder, GrandCompanies flatbuffers.UOffsetT) {
builder.PrependUOffsetTSlot(0, flatbuffers.UOffsetT(GrandCompanies), 0)
}
func GrandCompanyTableStartGrandCompaniesVector(builder *flatbuffers.Builder, numElems int) flatbuffers.UOffsetT {
return builder.StartVector(4, numElems, 4)
}
func GrandCompanyTableEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT {
return builder.EndObject()
}
type GrandCompany struct {
_tab flatbuffers.Table
}
func GetRootAsGrandCompany(buf []byte, offset flatbuffers.UOffsetT) *GrandCompany {
n := flatbuffers.GetUOffsetT(buf[offset:])
x := &GrandCompany{}
x.Init(buf, n+offset)
return x
}
func (rcv *GrandCompany) Init(buf []byte, i flatbuffers.UOffsetT) {
rcv._tab.Bytes = buf
rcv._tab.Pos = i
}
func (rcv *GrandCompany) Table() flatbuffers.Table {
return rcv._tab
}
func (rcv *GrandCompany) Id() uint32 {
o := flatbuffers.UOffsetT(rcv._tab.Offset(4))
if o != 0 {
return rcv._tab.GetUint32(o + rcv._tab.Pos)
}
return 0
}
func (rcv *GrandCompany) MutateId(n uint32) bool {
return rcv._tab.MutateUint32Slot(4, n)
}
func (rcv *GrandCompany) NameEn() []byte {
o := flatbuffers.UOffsetT(rcv._tab.Offset(6))
if o != 0 {
return rcv._tab.ByteVector(o + rcv._tab.Pos)
}
return nil
}
func (rcv *GrandCompany) NameFr() []byte {
o := flatbuffers.UOffsetT(rcv._tab.Offset(8))
if o != 0 {
return rcv._tab.ByteVector(o + rcv._tab.Pos)
}
return nil
}
func (rcv *GrandCompany) NameDe() []byte {
o := flatbuffers.UOffsetT(rcv._tab.Offset(10))
if o != 0 {
return rcv._tab.ByteVector(o + rcv._tab.Pos)
}
return nil
}
func (rcv *GrandCompany) NameJa() []byte {
o := flatbuffers.UOffsetT(rcv._tab.Offset(12))
if o != 0 {
return rcv._tab.ByteVector(o + rcv._tab.Pos)
}
return nil
}
func GrandCompanyStart(builder *flatbuffers.Builder) {
builder.StartObject(5)
}
func GrandCompanyAddId(builder *flatbuffers.Builder, Id uint32) {
builder.PrependUint32Slot(0, Id, 0)
}
func GrandCompanyAddNameEn(builder *flatbuffers.Builder, NameEn flatbuffers.UOffsetT) {
builder.PrependUOffsetTSlot(1, flatbuffers.UOffsetT(NameEn), 0)
}
func GrandCompanyAddNameFr(builder *flatbuffers.Builder, NameFr flatbuffers.UOffsetT) {
builder.PrependUOffsetTSlot(2, flatbuffers.UOffsetT(NameFr), 0)
}
func GrandCompanyAddNameDe(builder *flatbuffers.Builder, NameDe flatbuffers.UOffsetT) {
builder.PrependUOffsetTSlot(3, flatbuffers.UOffsetT(NameDe), 0)
}
func GrandCompanyAddNameJa(builder *flatbuffers.Builder, NameJa flatbuffers.UOffsetT) {
builder.PrependUOffsetTSlot(4, flatbuffers.UOffsetT(NameJa), 0)
}
func GrandCompanyEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT {
return builder.EndObject()
}