• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// Code generated by the FlatBuffers compiler. DO NOT EDIT.
2
3package Example
4
5import (
6	flatbuffers "github.com/google/flatbuffers/go"
7)
8
9type StructOfStructsOfStructsT struct {
10	A *StructOfStructsT `json:"a"`
11}
12
13func (t *StructOfStructsOfStructsT) Pack(builder *flatbuffers.Builder) flatbuffers.UOffsetT {
14	if t == nil {
15		return 0
16	}
17	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)
18}
19func (rcv *StructOfStructsOfStructs) UnPackTo(t *StructOfStructsOfStructsT) {
20	t.A = rcv.A(nil).UnPack()
21}
22
23func (rcv *StructOfStructsOfStructs) UnPack() *StructOfStructsOfStructsT {
24	if rcv == nil {
25		return nil
26	}
27	t := &StructOfStructsOfStructsT{}
28	rcv.UnPackTo(t)
29	return t
30}
31
32type StructOfStructsOfStructs struct {
33	_tab flatbuffers.Struct
34}
35
36func (rcv *StructOfStructsOfStructs) Init(buf []byte, i flatbuffers.UOffsetT) {
37	rcv._tab.Bytes = buf
38	rcv._tab.Pos = i
39}
40
41func (rcv *StructOfStructsOfStructs) Table() flatbuffers.Table {
42	return rcv._tab.Table
43}
44
45func (rcv *StructOfStructsOfStructs) A(obj *StructOfStructs) *StructOfStructs {
46	if obj == nil {
47		obj = new(StructOfStructs)
48	}
49	obj.Init(rcv._tab.Bytes, rcv._tab.Pos+0)
50	return obj
51}
52
53func 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 {
54	builder.Prep(4, 20)
55	builder.Prep(4, 20)
56	builder.Prep(4, 8)
57	builder.PrependUint32(a_c_distance)
58	builder.PrependUint32(a_c_id)
59	builder.Prep(2, 4)
60	builder.Pad(1)
61	builder.PrependInt8(a_b_b)
62	builder.PrependInt16(a_b_a)
63	builder.Prep(4, 8)
64	builder.PrependUint32(a_a_distance)
65	builder.PrependUint32(a_a_id)
66	return builder.Offset()
67}
68