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