1// Code generated by the FlatBuffers compiler. DO NOT EDIT. 2 3package Example2 4 5import ( 6 flatbuffers "github.com/google/flatbuffers/go" 7) 8 9type MonsterT struct { 10} 11 12func (t *MonsterT) Pack(builder *flatbuffers.Builder) flatbuffers.UOffsetT { 13 if t == nil { return 0 } 14 MonsterStart(builder) 15 return MonsterEnd(builder) 16} 17 18func (rcv *Monster) UnPackTo(t *MonsterT) { 19} 20 21func (rcv *Monster) UnPack() *MonsterT { 22 if rcv == nil { return nil } 23 t := &MonsterT{} 24 rcv.UnPackTo(t) 25 return t 26} 27 28type Monster struct { 29 _tab flatbuffers.Table 30} 31 32func GetRootAsMonster(buf []byte, offset flatbuffers.UOffsetT) *Monster { 33 n := flatbuffers.GetUOffsetT(buf[offset:]) 34 x := &Monster{} 35 x.Init(buf, n+offset) 36 return x 37} 38 39func GetSizePrefixedRootAsMonster(buf []byte, offset flatbuffers.UOffsetT) *Monster { 40 n := flatbuffers.GetUOffsetT(buf[offset+flatbuffers.SizeUint32:]) 41 x := &Monster{} 42 x.Init(buf, n+offset+flatbuffers.SizeUint32) 43 return x 44} 45 46func (rcv *Monster) Init(buf []byte, i flatbuffers.UOffsetT) { 47 rcv._tab.Bytes = buf 48 rcv._tab.Pos = i 49} 50 51func (rcv *Monster) Table() flatbuffers.Table { 52 return rcv._tab 53} 54 55func MonsterStart(builder *flatbuffers.Builder) { 56 builder.StartObject(0) 57} 58func MonsterEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT { 59 return builder.EndObject() 60} 61