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
|
// Code generated by the FlatBuffers compiler. DO NOT EDIT.
package Example
import (
flatbuffers "github.com/google/flatbuffers/go"
)
type StructOfStructsOfStructsT struct {
A *StructOfStructsT `json:"a"`
}
func (t *StructOfStructsOfStructsT) Pack(builder *flatbuffers.Builder) flatbuffers.UOffsetT {
if t == nil {
return 0
}
return CreateStructOfStructsOfStructs(builder, t.A.A.Id, t.A.A.Distance, t.A.B.A, t.A.B.B, t.A.C.Id, t.A.C.Distance)
}
func (rcv *StructOfStructsOfStructs) UnPackTo(t *StructOfStructsOfStructsT) {
t.A = rcv.A(nil).UnPack()
}
func (rcv *StructOfStructsOfStructs) UnPack() *StructOfStructsOfStructsT {
if rcv == nil {
return nil
}
t := &StructOfStructsOfStructsT{}
rcv.UnPackTo(t)
return t
}
type StructOfStructsOfStructs struct {
_tab flatbuffers.Struct
}
func (rcv *StructOfStructsOfStructs) Init(buf []byte, i flatbuffers.UOffsetT) {
rcv._tab.Bytes = buf
rcv._tab.Pos = i
}
func (rcv *StructOfStructsOfStructs) Table() flatbuffers.Table {
return rcv._tab.Table
}
func (rcv *StructOfStructsOfStructs) A(obj *StructOfStructs) *StructOfStructs {
if obj == nil {
obj = new(StructOfStructs)
}
obj.Init(rcv._tab.Bytes, rcv._tab.Pos+0)
return obj
}
func CreateStructOfStructsOfStructs(builder *flatbuffers.Builder, a_a_id uint32, a_a_distance uint32, a_b_a int16, a_b_b int8, a_c_id uint32, a_c_distance uint32) flatbuffers.UOffsetT {
builder.Prep(4, 20)
builder.Prep(4, 20)
builder.Prep(4, 8)
builder.PrependUint32(a_c_distance)
builder.PrependUint32(a_c_id)
builder.Prep(2, 4)
builder.Pad(1)
builder.PrependInt8(a_b_b)
builder.PrependInt16(a_b_a)
builder.Prep(4, 8)
builder.PrependUint32(a_a_distance)
builder.PrependUint32(a_a_id)
return builder.Offset()
}
|