1// Code generated by the FlatBuffers compiler. DO NOT EDIT. 2 3package Example 4 5import ( 6 "strconv" 7 8 flatbuffers "github.com/google/flatbuffers/go" 9) 10 11type AnyAmbiguousAliases byte 12 13const ( 14 AnyAmbiguousAliasesNONE AnyAmbiguousAliases = 0 15 AnyAmbiguousAliasesM1 AnyAmbiguousAliases = 1 16 AnyAmbiguousAliasesM2 AnyAmbiguousAliases = 2 17 AnyAmbiguousAliasesM3 AnyAmbiguousAliases = 3 18) 19 20var EnumNamesAnyAmbiguousAliases = map[AnyAmbiguousAliases]string{ 21 AnyAmbiguousAliasesNONE: "NONE", 22 AnyAmbiguousAliasesM1: "M1", 23 AnyAmbiguousAliasesM2: "M2", 24 AnyAmbiguousAliasesM3: "M3", 25} 26 27var EnumValuesAnyAmbiguousAliases = map[string]AnyAmbiguousAliases{ 28 "NONE": AnyAmbiguousAliasesNONE, 29 "M1": AnyAmbiguousAliasesM1, 30 "M2": AnyAmbiguousAliasesM2, 31 "M3": AnyAmbiguousAliasesM3, 32} 33 34func (v AnyAmbiguousAliases) String() string { 35 if s, ok := EnumNamesAnyAmbiguousAliases[v]; ok { 36 return s 37 } 38 return "AnyAmbiguousAliases(" + strconv.FormatInt(int64(v), 10) + ")" 39} 40 41type AnyAmbiguousAliasesT struct { 42 Type AnyAmbiguousAliases 43 Value interface{} 44} 45 46func (t *AnyAmbiguousAliasesT) Pack(builder *flatbuffers.Builder) flatbuffers.UOffsetT { 47 if t == nil { 48 return 0 49 } 50 switch t.Type { 51 case AnyAmbiguousAliasesM1: 52 return t.Value.(*MonsterT).Pack(builder) 53 case AnyAmbiguousAliasesM2: 54 return t.Value.(*MonsterT).Pack(builder) 55 case AnyAmbiguousAliasesM3: 56 return t.Value.(*MonsterT).Pack(builder) 57 } 58 return 0 59} 60 61func (rcv AnyAmbiguousAliases) UnPack(table flatbuffers.Table) *AnyAmbiguousAliasesT { 62 switch rcv { 63 case AnyAmbiguousAliasesM1: 64 x := Monster{_tab: table} 65 return &AnyAmbiguousAliasesT{ Type: AnyAmbiguousAliasesM1, Value: x.UnPack() } 66 case AnyAmbiguousAliasesM2: 67 x := Monster{_tab: table} 68 return &AnyAmbiguousAliasesT{ Type: AnyAmbiguousAliasesM2, Value: x.UnPack() } 69 case AnyAmbiguousAliasesM3: 70 x := Monster{_tab: table} 71 return &AnyAmbiguousAliasesT{ Type: AnyAmbiguousAliasesM3, Value: x.UnPack() } 72 } 73 return nil 74} 75