|
|
@@ -209,6 +209,917 @@ func (x *wrapStringSlice) CodecDecodeSelf(d *Decoder) {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+func (x *codecgenA) CodecEncodeSelf(e *Encoder) {
|
|
|
+ var h codecSelfer19780
|
|
|
+ z, r := GenHelperEncoder(e)
|
|
|
+ _, _, _ = h, z, r
|
|
|
+ if x == nil {
|
|
|
+ r.EncodeNil()
|
|
|
+ } else {
|
|
|
+ if false {
|
|
|
+ } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil {
|
|
|
+ z.EncExtension(x, yyxt1)
|
|
|
+ } else {
|
|
|
+ yysep2 := !z.EncBinary()
|
|
|
+ yy2arr2 := z.EncBasicHandle().StructToArray
|
|
|
+ _, _ = yysep2, yy2arr2
|
|
|
+ const yyr2 bool = false // struct tag has 'toArray'
|
|
|
+ var yyq2 = [1]bool{ // should field at this index be written?
|
|
|
+ false || codecSelfer19780False() || len(x.BB.CC.DD) != 0, // BB
|
|
|
+ }
|
|
|
+ _ = yyq2
|
|
|
+ if yyr2 || yy2arr2 {
|
|
|
+ r.WriteArrayStart(1)
|
|
|
+ } else {
|
|
|
+ var yynn2 int
|
|
|
+ for _, b := range yyq2 {
|
|
|
+ if b {
|
|
|
+ yynn2++
|
|
|
+ }
|
|
|
+ }
|
|
|
+ r.WriteMapStart(yynn2)
|
|
|
+ yynn2 = 0
|
|
|
+ }
|
|
|
+ if yyr2 || yy2arr2 {
|
|
|
+ r.WriteArrayElem()
|
|
|
+ if yyq2[0] {
|
|
|
+ yy4 := &x.BB
|
|
|
+ yy4.CodecEncodeSelf(e)
|
|
|
+ } else {
|
|
|
+ r.EncodeNil()
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ if yyq2[0] {
|
|
|
+ r.WriteMapElemKey()
|
|
|
+ if z.IsJSONHandle() {
|
|
|
+ z.WriteStr("\"BB\"")
|
|
|
+ } else {
|
|
|
+ r.EncodeStringEnc(codecSelferCcUTF819780, `BB`)
|
|
|
+ }
|
|
|
+ r.WriteMapElemValue()
|
|
|
+ yy6 := &x.BB
|
|
|
+ yy6.CodecEncodeSelf(e)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if yyr2 || yy2arr2 {
|
|
|
+ r.WriteArrayEnd()
|
|
|
+ } else {
|
|
|
+ r.WriteMapEnd()
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+func (x *codecgenA) CodecDecodeSelf(d *Decoder) {
|
|
|
+ var h codecSelfer19780
|
|
|
+ z, r := GenHelperDecoder(d)
|
|
|
+ _, _, _ = h, z, r
|
|
|
+ if false {
|
|
|
+ } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil {
|
|
|
+ z.DecExtension(x, yyxt1)
|
|
|
+ } else {
|
|
|
+ yyct2 := r.ContainerType()
|
|
|
+ if yyct2 == codecSelferValueTypeMap19780 {
|
|
|
+ yyl2 := r.ReadMapStart()
|
|
|
+ if yyl2 == 0 {
|
|
|
+ r.ReadMapEnd()
|
|
|
+ } else {
|
|
|
+ x.codecDecodeSelfFromMap(yyl2, d)
|
|
|
+ }
|
|
|
+ } else if yyct2 == codecSelferValueTypeArray19780 {
|
|
|
+ yyl2 := r.ReadArrayStart()
|
|
|
+ if yyl2 == 0 {
|
|
|
+ r.ReadArrayEnd()
|
|
|
+ } else {
|
|
|
+ x.codecDecodeSelfFromArray(yyl2, d)
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ panic(errCodecSelferOnlyMapOrArrayEncodeToStruct19780)
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+func (x *codecgenA) codecDecodeSelfFromMap(l int, d *Decoder) {
|
|
|
+ var h codecSelfer19780
|
|
|
+ z, r := GenHelperDecoder(d)
|
|
|
+ _, _, _ = h, z, r
|
|
|
+ var yyhl3 bool = l >= 0
|
|
|
+ for yyj3 := 0; ; yyj3++ {
|
|
|
+ if yyhl3 {
|
|
|
+ if yyj3 >= l {
|
|
|
+ break
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ if r.CheckBreak() {
|
|
|
+ break
|
|
|
+ }
|
|
|
+ }
|
|
|
+ r.ReadMapElemKey()
|
|
|
+ yys3 := z.StringView(r.DecodeStringAsBytes())
|
|
|
+ r.ReadMapElemValue()
|
|
|
+ switch yys3 {
|
|
|
+ case "BB":
|
|
|
+ if r.TryDecodeAsNil() {
|
|
|
+ x.BB = codecgenB{}
|
|
|
+ } else {
|
|
|
+ x.BB.CodecDecodeSelf(d)
|
|
|
+ }
|
|
|
+ default:
|
|
|
+ z.DecStructFieldNotFound(-1, yys3)
|
|
|
+ } // end switch yys3
|
|
|
+ } // end for yyj3
|
|
|
+ r.ReadMapEnd()
|
|
|
+}
|
|
|
+
|
|
|
+func (x *codecgenA) codecDecodeSelfFromArray(l int, d *Decoder) {
|
|
|
+ var h codecSelfer19780
|
|
|
+ z, r := GenHelperDecoder(d)
|
|
|
+ _, _, _ = h, z, r
|
|
|
+ var yyj5 int
|
|
|
+ var yyb5 bool
|
|
|
+ var yyhl5 bool = l >= 0
|
|
|
+ yyj5++
|
|
|
+ if yyhl5 {
|
|
|
+ yyb5 = yyj5 > l
|
|
|
+ } else {
|
|
|
+ yyb5 = r.CheckBreak()
|
|
|
+ }
|
|
|
+ if yyb5 {
|
|
|
+ r.ReadArrayEnd()
|
|
|
+ return
|
|
|
+ }
|
|
|
+ r.ReadArrayElem()
|
|
|
+ if r.TryDecodeAsNil() {
|
|
|
+ x.BB = codecgenB{}
|
|
|
+ } else {
|
|
|
+ x.BB.CodecDecodeSelf(d)
|
|
|
+ }
|
|
|
+ for {
|
|
|
+ yyj5++
|
|
|
+ if yyhl5 {
|
|
|
+ yyb5 = yyj5 > l
|
|
|
+ } else {
|
|
|
+ yyb5 = r.CheckBreak()
|
|
|
+ }
|
|
|
+ if yyb5 {
|
|
|
+ break
|
|
|
+ }
|
|
|
+ r.ReadArrayElem()
|
|
|
+ z.DecStructFieldNotFound(yyj5-1, "")
|
|
|
+ }
|
|
|
+ r.ReadArrayEnd()
|
|
|
+}
|
|
|
+
|
|
|
+func (x *codecgenB) CodecEncodeSelf(e *Encoder) {
|
|
|
+ var h codecSelfer19780
|
|
|
+ z, r := GenHelperEncoder(e)
|
|
|
+ _, _, _ = h, z, r
|
|
|
+ if x == nil {
|
|
|
+ r.EncodeNil()
|
|
|
+ } else {
|
|
|
+ if false {
|
|
|
+ } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil {
|
|
|
+ z.EncExtension(x, yyxt1)
|
|
|
+ } else {
|
|
|
+ yysep2 := !z.EncBinary()
|
|
|
+ yy2arr2 := z.EncBasicHandle().StructToArray
|
|
|
+ _, _ = yysep2, yy2arr2
|
|
|
+ const yyr2 bool = false // struct tag has 'toArray'
|
|
|
+ if yyr2 || yy2arr2 {
|
|
|
+ r.WriteArrayStart(1)
|
|
|
+ } else {
|
|
|
+ r.WriteMapStart(1)
|
|
|
+ }
|
|
|
+ if yyr2 || yy2arr2 {
|
|
|
+ r.WriteArrayElem()
|
|
|
+ yy4 := &x.CC
|
|
|
+ yy4.CodecEncodeSelf(e)
|
|
|
+ } else {
|
|
|
+ r.WriteMapElemKey()
|
|
|
+ if z.IsJSONHandle() {
|
|
|
+ z.WriteStr("\"CC\"")
|
|
|
+ } else {
|
|
|
+ r.EncodeStringEnc(codecSelferCcUTF819780, `CC`)
|
|
|
+ }
|
|
|
+ r.WriteMapElemValue()
|
|
|
+ yy6 := &x.CC
|
|
|
+ yy6.CodecEncodeSelf(e)
|
|
|
+ }
|
|
|
+ if yyr2 || yy2arr2 {
|
|
|
+ r.WriteArrayEnd()
|
|
|
+ } else {
|
|
|
+ r.WriteMapEnd()
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+func (x *codecgenB) CodecDecodeSelf(d *Decoder) {
|
|
|
+ var h codecSelfer19780
|
|
|
+ z, r := GenHelperDecoder(d)
|
|
|
+ _, _, _ = h, z, r
|
|
|
+ if false {
|
|
|
+ } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil {
|
|
|
+ z.DecExtension(x, yyxt1)
|
|
|
+ } else {
|
|
|
+ yyct2 := r.ContainerType()
|
|
|
+ if yyct2 == codecSelferValueTypeMap19780 {
|
|
|
+ yyl2 := r.ReadMapStart()
|
|
|
+ if yyl2 == 0 {
|
|
|
+ r.ReadMapEnd()
|
|
|
+ } else {
|
|
|
+ x.codecDecodeSelfFromMap(yyl2, d)
|
|
|
+ }
|
|
|
+ } else if yyct2 == codecSelferValueTypeArray19780 {
|
|
|
+ yyl2 := r.ReadArrayStart()
|
|
|
+ if yyl2 == 0 {
|
|
|
+ r.ReadArrayEnd()
|
|
|
+ } else {
|
|
|
+ x.codecDecodeSelfFromArray(yyl2, d)
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ panic(errCodecSelferOnlyMapOrArrayEncodeToStruct19780)
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+func (x *codecgenB) codecDecodeSelfFromMap(l int, d *Decoder) {
|
|
|
+ var h codecSelfer19780
|
|
|
+ z, r := GenHelperDecoder(d)
|
|
|
+ _, _, _ = h, z, r
|
|
|
+ var yyhl3 bool = l >= 0
|
|
|
+ for yyj3 := 0; ; yyj3++ {
|
|
|
+ if yyhl3 {
|
|
|
+ if yyj3 >= l {
|
|
|
+ break
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ if r.CheckBreak() {
|
|
|
+ break
|
|
|
+ }
|
|
|
+ }
|
|
|
+ r.ReadMapElemKey()
|
|
|
+ yys3 := z.StringView(r.DecodeStringAsBytes())
|
|
|
+ r.ReadMapElemValue()
|
|
|
+ switch yys3 {
|
|
|
+ case "CC":
|
|
|
+ if r.TryDecodeAsNil() {
|
|
|
+ x.CC = codecgenC{}
|
|
|
+ } else {
|
|
|
+ x.CC.CodecDecodeSelf(d)
|
|
|
+ }
|
|
|
+ default:
|
|
|
+ z.DecStructFieldNotFound(-1, yys3)
|
|
|
+ } // end switch yys3
|
|
|
+ } // end for yyj3
|
|
|
+ r.ReadMapEnd()
|
|
|
+}
|
|
|
+
|
|
|
+func (x *codecgenB) codecDecodeSelfFromArray(l int, d *Decoder) {
|
|
|
+ var h codecSelfer19780
|
|
|
+ z, r := GenHelperDecoder(d)
|
|
|
+ _, _, _ = h, z, r
|
|
|
+ var yyj5 int
|
|
|
+ var yyb5 bool
|
|
|
+ var yyhl5 bool = l >= 0
|
|
|
+ yyj5++
|
|
|
+ if yyhl5 {
|
|
|
+ yyb5 = yyj5 > l
|
|
|
+ } else {
|
|
|
+ yyb5 = r.CheckBreak()
|
|
|
+ }
|
|
|
+ if yyb5 {
|
|
|
+ r.ReadArrayEnd()
|
|
|
+ return
|
|
|
+ }
|
|
|
+ r.ReadArrayElem()
|
|
|
+ if r.TryDecodeAsNil() {
|
|
|
+ x.CC = codecgenC{}
|
|
|
+ } else {
|
|
|
+ x.CC.CodecDecodeSelf(d)
|
|
|
+ }
|
|
|
+ for {
|
|
|
+ yyj5++
|
|
|
+ if yyhl5 {
|
|
|
+ yyb5 = yyj5 > l
|
|
|
+ } else {
|
|
|
+ yyb5 = r.CheckBreak()
|
|
|
+ }
|
|
|
+ if yyb5 {
|
|
|
+ break
|
|
|
+ }
|
|
|
+ r.ReadArrayElem()
|
|
|
+ z.DecStructFieldNotFound(yyj5-1, "")
|
|
|
+ }
|
|
|
+ r.ReadArrayEnd()
|
|
|
+}
|
|
|
+
|
|
|
+func (x *codecgenC) CodecEncodeSelf(e *Encoder) {
|
|
|
+ var h codecSelfer19780
|
|
|
+ z, r := GenHelperEncoder(e)
|
|
|
+ _, _, _ = h, z, r
|
|
|
+ if x == nil {
|
|
|
+ r.EncodeNil()
|
|
|
+ } else {
|
|
|
+ if false {
|
|
|
+ } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil {
|
|
|
+ z.EncExtension(x, yyxt1)
|
|
|
+ } else {
|
|
|
+ yysep2 := !z.EncBinary()
|
|
|
+ yy2arr2 := z.EncBasicHandle().StructToArray
|
|
|
+ _, _ = yysep2, yy2arr2
|
|
|
+ const yyr2 bool = false // struct tag has 'toArray'
|
|
|
+ if yyr2 || yy2arr2 {
|
|
|
+ r.WriteArrayStart(1)
|
|
|
+ } else {
|
|
|
+ r.WriteMapStart(1)
|
|
|
+ }
|
|
|
+ if yyr2 || yy2arr2 {
|
|
|
+ r.WriteArrayElem()
|
|
|
+ if x.DD == nil {
|
|
|
+ r.EncodeNil()
|
|
|
+ } else {
|
|
|
+ if false {
|
|
|
+ } else {
|
|
|
+ r.EncodeStringBytesRaw([]byte(x.DD))
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ r.WriteMapElemKey()
|
|
|
+ if z.IsJSONHandle() {
|
|
|
+ z.WriteStr("\"DD\"")
|
|
|
+ } else {
|
|
|
+ r.EncodeStringEnc(codecSelferCcUTF819780, `DD`)
|
|
|
+ }
|
|
|
+ r.WriteMapElemValue()
|
|
|
+ if x.DD == nil {
|
|
|
+ r.EncodeNil()
|
|
|
+ } else {
|
|
|
+ if false {
|
|
|
+ } else {
|
|
|
+ r.EncodeStringBytesRaw([]byte(x.DD))
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if yyr2 || yy2arr2 {
|
|
|
+ r.WriteArrayEnd()
|
|
|
+ } else {
|
|
|
+ r.WriteMapEnd()
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+func (x *codecgenC) CodecDecodeSelf(d *Decoder) {
|
|
|
+ var h codecSelfer19780
|
|
|
+ z, r := GenHelperDecoder(d)
|
|
|
+ _, _, _ = h, z, r
|
|
|
+ if false {
|
|
|
+ } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil {
|
|
|
+ z.DecExtension(x, yyxt1)
|
|
|
+ } else {
|
|
|
+ yyct2 := r.ContainerType()
|
|
|
+ if yyct2 == codecSelferValueTypeMap19780 {
|
|
|
+ yyl2 := r.ReadMapStart()
|
|
|
+ if yyl2 == 0 {
|
|
|
+ r.ReadMapEnd()
|
|
|
+ } else {
|
|
|
+ x.codecDecodeSelfFromMap(yyl2, d)
|
|
|
+ }
|
|
|
+ } else if yyct2 == codecSelferValueTypeArray19780 {
|
|
|
+ yyl2 := r.ReadArrayStart()
|
|
|
+ if yyl2 == 0 {
|
|
|
+ r.ReadArrayEnd()
|
|
|
+ } else {
|
|
|
+ x.codecDecodeSelfFromArray(yyl2, d)
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ panic(errCodecSelferOnlyMapOrArrayEncodeToStruct19780)
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+func (x *codecgenC) codecDecodeSelfFromMap(l int, d *Decoder) {
|
|
|
+ var h codecSelfer19780
|
|
|
+ z, r := GenHelperDecoder(d)
|
|
|
+ _, _, _ = h, z, r
|
|
|
+ var yyhl3 bool = l >= 0
|
|
|
+ for yyj3 := 0; ; yyj3++ {
|
|
|
+ if yyhl3 {
|
|
|
+ if yyj3 >= l {
|
|
|
+ break
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ if r.CheckBreak() {
|
|
|
+ break
|
|
|
+ }
|
|
|
+ }
|
|
|
+ r.ReadMapElemKey()
|
|
|
+ yys3 := z.StringView(r.DecodeStringAsBytes())
|
|
|
+ r.ReadMapElemValue()
|
|
|
+ switch yys3 {
|
|
|
+ case "DD":
|
|
|
+ if r.TryDecodeAsNil() {
|
|
|
+ x.DD = nil
|
|
|
+ } else {
|
|
|
+ if false {
|
|
|
+ } else {
|
|
|
+ x.DD = r.DecodeBytes(([]byte)(x.DD), false)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ default:
|
|
|
+ z.DecStructFieldNotFound(-1, yys3)
|
|
|
+ } // end switch yys3
|
|
|
+ } // end for yyj3
|
|
|
+ r.ReadMapEnd()
|
|
|
+}
|
|
|
+
|
|
|
+func (x *codecgenC) codecDecodeSelfFromArray(l int, d *Decoder) {
|
|
|
+ var h codecSelfer19780
|
|
|
+ z, r := GenHelperDecoder(d)
|
|
|
+ _, _, _ = h, z, r
|
|
|
+ var yyj6 int
|
|
|
+ var yyb6 bool
|
|
|
+ var yyhl6 bool = l >= 0
|
|
|
+ yyj6++
|
|
|
+ if yyhl6 {
|
|
|
+ yyb6 = yyj6 > l
|
|
|
+ } else {
|
|
|
+ yyb6 = r.CheckBreak()
|
|
|
+ }
|
|
|
+ if yyb6 {
|
|
|
+ r.ReadArrayEnd()
|
|
|
+ return
|
|
|
+ }
|
|
|
+ r.ReadArrayElem()
|
|
|
+ if r.TryDecodeAsNil() {
|
|
|
+ x.DD = nil
|
|
|
+ } else {
|
|
|
+ if false {
|
|
|
+ } else {
|
|
|
+ x.DD = r.DecodeBytes(([]byte)(x.DD), false)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ for {
|
|
|
+ yyj6++
|
|
|
+ if yyhl6 {
|
|
|
+ yyb6 = yyj6 > l
|
|
|
+ } else {
|
|
|
+ yyb6 = r.CheckBreak()
|
|
|
+ }
|
|
|
+ if yyb6 {
|
|
|
+ break
|
|
|
+ }
|
|
|
+ r.ReadArrayElem()
|
|
|
+ z.DecStructFieldNotFound(yyj6-1, "")
|
|
|
+ }
|
|
|
+ r.ReadArrayEnd()
|
|
|
+}
|
|
|
+
|
|
|
+func (x *codecgenG) CodecEncodeSelf(e *Encoder) {
|
|
|
+ var h codecSelfer19780
|
|
|
+ z, r := GenHelperEncoder(e)
|
|
|
+ _, _, _ = h, z, r
|
|
|
+ if x == nil {
|
|
|
+ r.EncodeNil()
|
|
|
+ } else {
|
|
|
+ if false {
|
|
|
+ } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil {
|
|
|
+ z.EncExtension(x, yyxt1)
|
|
|
+ } else {
|
|
|
+ yysep2 := !z.EncBinary()
|
|
|
+ yy2arr2 := z.EncBasicHandle().StructToArray
|
|
|
+ _, _ = yysep2, yy2arr2
|
|
|
+ const yyr2 bool = false // struct tag has 'toArray'
|
|
|
+ if yyr2 || yy2arr2 {
|
|
|
+ r.WriteArrayStart(1)
|
|
|
+ } else {
|
|
|
+ r.WriteMapStart(1)
|
|
|
+ }
|
|
|
+ if yyr2 || yy2arr2 {
|
|
|
+ r.WriteArrayElem()
|
|
|
+ if false {
|
|
|
+ } else {
|
|
|
+ r.EncodeInt(int64(x.G))
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ r.WriteMapElemKey()
|
|
|
+ if z.IsJSONHandle() {
|
|
|
+ z.WriteStr("\"G\"")
|
|
|
+ } else {
|
|
|
+ r.EncodeStringEnc(codecSelferCcUTF819780, `G`)
|
|
|
+ }
|
|
|
+ r.WriteMapElemValue()
|
|
|
+ if false {
|
|
|
+ } else {
|
|
|
+ r.EncodeInt(int64(x.G))
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if yyr2 || yy2arr2 {
|
|
|
+ r.WriteArrayEnd()
|
|
|
+ } else {
|
|
|
+ r.WriteMapEnd()
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+func (x *codecgenG) CodecDecodeSelf(d *Decoder) {
|
|
|
+ var h codecSelfer19780
|
|
|
+ z, r := GenHelperDecoder(d)
|
|
|
+ _, _, _ = h, z, r
|
|
|
+ if false {
|
|
|
+ } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil {
|
|
|
+ z.DecExtension(x, yyxt1)
|
|
|
+ } else {
|
|
|
+ yyct2 := r.ContainerType()
|
|
|
+ if yyct2 == codecSelferValueTypeMap19780 {
|
|
|
+ yyl2 := r.ReadMapStart()
|
|
|
+ if yyl2 == 0 {
|
|
|
+ r.ReadMapEnd()
|
|
|
+ } else {
|
|
|
+ x.codecDecodeSelfFromMap(yyl2, d)
|
|
|
+ }
|
|
|
+ } else if yyct2 == codecSelferValueTypeArray19780 {
|
|
|
+ yyl2 := r.ReadArrayStart()
|
|
|
+ if yyl2 == 0 {
|
|
|
+ r.ReadArrayEnd()
|
|
|
+ } else {
|
|
|
+ x.codecDecodeSelfFromArray(yyl2, d)
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ panic(errCodecSelferOnlyMapOrArrayEncodeToStruct19780)
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+func (x *codecgenG) codecDecodeSelfFromMap(l int, d *Decoder) {
|
|
|
+ var h codecSelfer19780
|
|
|
+ z, r := GenHelperDecoder(d)
|
|
|
+ _, _, _ = h, z, r
|
|
|
+ var yyhl3 bool = l >= 0
|
|
|
+ for yyj3 := 0; ; yyj3++ {
|
|
|
+ if yyhl3 {
|
|
|
+ if yyj3 >= l {
|
|
|
+ break
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ if r.CheckBreak() {
|
|
|
+ break
|
|
|
+ }
|
|
|
+ }
|
|
|
+ r.ReadMapElemKey()
|
|
|
+ yys3 := z.StringView(r.DecodeStringAsBytes())
|
|
|
+ r.ReadMapElemValue()
|
|
|
+ switch yys3 {
|
|
|
+ case "G":
|
|
|
+ if r.TryDecodeAsNil() {
|
|
|
+ x.G = 0
|
|
|
+ } else {
|
|
|
+ x.G = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize19780))
|
|
|
+ }
|
|
|
+ default:
|
|
|
+ z.DecStructFieldNotFound(-1, yys3)
|
|
|
+ } // end switch yys3
|
|
|
+ } // end for yyj3
|
|
|
+ r.ReadMapEnd()
|
|
|
+}
|
|
|
+
|
|
|
+func (x *codecgenG) codecDecodeSelfFromArray(l int, d *Decoder) {
|
|
|
+ var h codecSelfer19780
|
|
|
+ z, r := GenHelperDecoder(d)
|
|
|
+ _, _, _ = h, z, r
|
|
|
+ var yyj5 int
|
|
|
+ var yyb5 bool
|
|
|
+ var yyhl5 bool = l >= 0
|
|
|
+ yyj5++
|
|
|
+ if yyhl5 {
|
|
|
+ yyb5 = yyj5 > l
|
|
|
+ } else {
|
|
|
+ yyb5 = r.CheckBreak()
|
|
|
+ }
|
|
|
+ if yyb5 {
|
|
|
+ r.ReadArrayEnd()
|
|
|
+ return
|
|
|
+ }
|
|
|
+ r.ReadArrayElem()
|
|
|
+ if r.TryDecodeAsNil() {
|
|
|
+ x.G = 0
|
|
|
+ } else {
|
|
|
+ x.G = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize19780))
|
|
|
+ }
|
|
|
+ for {
|
|
|
+ yyj5++
|
|
|
+ if yyhl5 {
|
|
|
+ yyb5 = yyj5 > l
|
|
|
+ } else {
|
|
|
+ yyb5 = r.CheckBreak()
|
|
|
+ }
|
|
|
+ if yyb5 {
|
|
|
+ break
|
|
|
+ }
|
|
|
+ r.ReadArrayElem()
|
|
|
+ z.DecStructFieldNotFound(yyj5-1, "")
|
|
|
+ }
|
|
|
+ r.ReadArrayEnd()
|
|
|
+}
|
|
|
+
|
|
|
+func (x *codecgenH) CodecEncodeSelf(e *Encoder) {
|
|
|
+ var h codecSelfer19780
|
|
|
+ z, r := GenHelperEncoder(e)
|
|
|
+ _, _, _ = h, z, r
|
|
|
+ if x == nil {
|
|
|
+ r.EncodeNil()
|
|
|
+ } else {
|
|
|
+ if false {
|
|
|
+ } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil {
|
|
|
+ z.EncExtension(x, yyxt1)
|
|
|
+ } else {
|
|
|
+ yysep2 := !z.EncBinary()
|
|
|
+ yy2arr2 := z.EncBasicHandle().StructToArray
|
|
|
+ _, _ = yysep2, yy2arr2
|
|
|
+ const yyr2 bool = false // struct tag has 'toArray'
|
|
|
+ if yyr2 || yy2arr2 {
|
|
|
+ r.WriteArrayStart(1)
|
|
|
+ } else {
|
|
|
+ r.WriteMapStart(1)
|
|
|
+ }
|
|
|
+ if yyr2 || yy2arr2 {
|
|
|
+ r.WriteArrayElem()
|
|
|
+ if false {
|
|
|
+ } else {
|
|
|
+ r.EncodeInt(int64(x.codecgenG.G))
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ r.WriteMapElemKey()
|
|
|
+ if z.IsJSONHandle() {
|
|
|
+ z.WriteStr("\"G\"")
|
|
|
+ } else {
|
|
|
+ r.EncodeStringEnc(codecSelferCcUTF819780, `G`)
|
|
|
+ }
|
|
|
+ r.WriteMapElemValue()
|
|
|
+ if false {
|
|
|
+ } else {
|
|
|
+ r.EncodeInt(int64(x.codecgenG.G))
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if yyr2 || yy2arr2 {
|
|
|
+ r.WriteArrayEnd()
|
|
|
+ } else {
|
|
|
+ r.WriteMapEnd()
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+func (x *codecgenH) CodecDecodeSelf(d *Decoder) {
|
|
|
+ var h codecSelfer19780
|
|
|
+ z, r := GenHelperDecoder(d)
|
|
|
+ _, _, _ = h, z, r
|
|
|
+ if false {
|
|
|
+ } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil {
|
|
|
+ z.DecExtension(x, yyxt1)
|
|
|
+ } else {
|
|
|
+ yyct2 := r.ContainerType()
|
|
|
+ if yyct2 == codecSelferValueTypeMap19780 {
|
|
|
+ yyl2 := r.ReadMapStart()
|
|
|
+ if yyl2 == 0 {
|
|
|
+ r.ReadMapEnd()
|
|
|
+ } else {
|
|
|
+ x.codecDecodeSelfFromMap(yyl2, d)
|
|
|
+ }
|
|
|
+ } else if yyct2 == codecSelferValueTypeArray19780 {
|
|
|
+ yyl2 := r.ReadArrayStart()
|
|
|
+ if yyl2 == 0 {
|
|
|
+ r.ReadArrayEnd()
|
|
|
+ } else {
|
|
|
+ x.codecDecodeSelfFromArray(yyl2, d)
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ panic(errCodecSelferOnlyMapOrArrayEncodeToStruct19780)
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+func (x *codecgenH) codecDecodeSelfFromMap(l int, d *Decoder) {
|
|
|
+ var h codecSelfer19780
|
|
|
+ z, r := GenHelperDecoder(d)
|
|
|
+ _, _, _ = h, z, r
|
|
|
+ var yyhl3 bool = l >= 0
|
|
|
+ for yyj3 := 0; ; yyj3++ {
|
|
|
+ if yyhl3 {
|
|
|
+ if yyj3 >= l {
|
|
|
+ break
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ if r.CheckBreak() {
|
|
|
+ break
|
|
|
+ }
|
|
|
+ }
|
|
|
+ r.ReadMapElemKey()
|
|
|
+ yys3 := z.StringView(r.DecodeStringAsBytes())
|
|
|
+ r.ReadMapElemValue()
|
|
|
+ switch yys3 {
|
|
|
+ case "G":
|
|
|
+ if r.TryDecodeAsNil() {
|
|
|
+ x.codecgenG.G = 0
|
|
|
+ } else {
|
|
|
+ x.codecgenG.G = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize19780))
|
|
|
+ }
|
|
|
+ default:
|
|
|
+ z.DecStructFieldNotFound(-1, yys3)
|
|
|
+ } // end switch yys3
|
|
|
+ } // end for yyj3
|
|
|
+ r.ReadMapEnd()
|
|
|
+}
|
|
|
+
|
|
|
+func (x *codecgenH) codecDecodeSelfFromArray(l int, d *Decoder) {
|
|
|
+ var h codecSelfer19780
|
|
|
+ z, r := GenHelperDecoder(d)
|
|
|
+ _, _, _ = h, z, r
|
|
|
+ var yyj5 int
|
|
|
+ var yyb5 bool
|
|
|
+ var yyhl5 bool = l >= 0
|
|
|
+ yyj5++
|
|
|
+ if yyhl5 {
|
|
|
+ yyb5 = yyj5 > l
|
|
|
+ } else {
|
|
|
+ yyb5 = r.CheckBreak()
|
|
|
+ }
|
|
|
+ if yyb5 {
|
|
|
+ r.ReadArrayEnd()
|
|
|
+ return
|
|
|
+ }
|
|
|
+ r.ReadArrayElem()
|
|
|
+ if r.TryDecodeAsNil() {
|
|
|
+ x.codecgenG.G = 0
|
|
|
+ } else {
|
|
|
+ x.codecgenG.G = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize19780))
|
|
|
+ }
|
|
|
+ for {
|
|
|
+ yyj5++
|
|
|
+ if yyhl5 {
|
|
|
+ yyb5 = yyj5 > l
|
|
|
+ } else {
|
|
|
+ yyb5 = r.CheckBreak()
|
|
|
+ }
|
|
|
+ if yyb5 {
|
|
|
+ break
|
|
|
+ }
|
|
|
+ r.ReadArrayElem()
|
|
|
+ z.DecStructFieldNotFound(yyj5-1, "")
|
|
|
+ }
|
|
|
+ r.ReadArrayEnd()
|
|
|
+}
|
|
|
+
|
|
|
+func (x *codecgenI) CodecEncodeSelf(e *Encoder) {
|
|
|
+ var h codecSelfer19780
|
|
|
+ z, r := GenHelperEncoder(e)
|
|
|
+ _, _, _ = h, z, r
|
|
|
+ if x == nil {
|
|
|
+ r.EncodeNil()
|
|
|
+ } else {
|
|
|
+ if false {
|
|
|
+ } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil {
|
|
|
+ z.EncExtension(x, yyxt1)
|
|
|
+ } else {
|
|
|
+ yysep2 := !z.EncBinary()
|
|
|
+ yy2arr2 := z.EncBasicHandle().StructToArray
|
|
|
+ _, _ = yysep2, yy2arr2
|
|
|
+ const yyr2 bool = false // struct tag has 'toArray'
|
|
|
+ if yyr2 || yy2arr2 {
|
|
|
+ r.WriteArrayStart(1)
|
|
|
+ } else {
|
|
|
+ r.WriteMapStart(1)
|
|
|
+ }
|
|
|
+ if yyr2 || yy2arr2 {
|
|
|
+ r.WriteArrayElem()
|
|
|
+ if false {
|
|
|
+ } else {
|
|
|
+ r.EncodeInt(int64(x.codecgenH.codecgenG.G))
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ r.WriteMapElemKey()
|
|
|
+ if z.IsJSONHandle() {
|
|
|
+ z.WriteStr("\"G\"")
|
|
|
+ } else {
|
|
|
+ r.EncodeStringEnc(codecSelferCcUTF819780, `G`)
|
|
|
+ }
|
|
|
+ r.WriteMapElemValue()
|
|
|
+ if false {
|
|
|
+ } else {
|
|
|
+ r.EncodeInt(int64(x.codecgenH.codecgenG.G))
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if yyr2 || yy2arr2 {
|
|
|
+ r.WriteArrayEnd()
|
|
|
+ } else {
|
|
|
+ r.WriteMapEnd()
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+func (x *codecgenI) CodecDecodeSelf(d *Decoder) {
|
|
|
+ var h codecSelfer19780
|
|
|
+ z, r := GenHelperDecoder(d)
|
|
|
+ _, _, _ = h, z, r
|
|
|
+ if false {
|
|
|
+ } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil {
|
|
|
+ z.DecExtension(x, yyxt1)
|
|
|
+ } else {
|
|
|
+ yyct2 := r.ContainerType()
|
|
|
+ if yyct2 == codecSelferValueTypeMap19780 {
|
|
|
+ yyl2 := r.ReadMapStart()
|
|
|
+ if yyl2 == 0 {
|
|
|
+ r.ReadMapEnd()
|
|
|
+ } else {
|
|
|
+ x.codecDecodeSelfFromMap(yyl2, d)
|
|
|
+ }
|
|
|
+ } else if yyct2 == codecSelferValueTypeArray19780 {
|
|
|
+ yyl2 := r.ReadArrayStart()
|
|
|
+ if yyl2 == 0 {
|
|
|
+ r.ReadArrayEnd()
|
|
|
+ } else {
|
|
|
+ x.codecDecodeSelfFromArray(yyl2, d)
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ panic(errCodecSelferOnlyMapOrArrayEncodeToStruct19780)
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+func (x *codecgenI) codecDecodeSelfFromMap(l int, d *Decoder) {
|
|
|
+ var h codecSelfer19780
|
|
|
+ z, r := GenHelperDecoder(d)
|
|
|
+ _, _, _ = h, z, r
|
|
|
+ var yyhl3 bool = l >= 0
|
|
|
+ for yyj3 := 0; ; yyj3++ {
|
|
|
+ if yyhl3 {
|
|
|
+ if yyj3 >= l {
|
|
|
+ break
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ if r.CheckBreak() {
|
|
|
+ break
|
|
|
+ }
|
|
|
+ }
|
|
|
+ r.ReadMapElemKey()
|
|
|
+ yys3 := z.StringView(r.DecodeStringAsBytes())
|
|
|
+ r.ReadMapElemValue()
|
|
|
+ switch yys3 {
|
|
|
+ case "G":
|
|
|
+ if r.TryDecodeAsNil() {
|
|
|
+ x.codecgenH.codecgenG.G = 0
|
|
|
+ } else {
|
|
|
+ x.codecgenH.codecgenG.G = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize19780))
|
|
|
+ }
|
|
|
+ default:
|
|
|
+ z.DecStructFieldNotFound(-1, yys3)
|
|
|
+ } // end switch yys3
|
|
|
+ } // end for yyj3
|
|
|
+ r.ReadMapEnd()
|
|
|
+}
|
|
|
+
|
|
|
+func (x *codecgenI) codecDecodeSelfFromArray(l int, d *Decoder) {
|
|
|
+ var h codecSelfer19780
|
|
|
+ z, r := GenHelperDecoder(d)
|
|
|
+ _, _, _ = h, z, r
|
|
|
+ var yyj5 int
|
|
|
+ var yyb5 bool
|
|
|
+ var yyhl5 bool = l >= 0
|
|
|
+ yyj5++
|
|
|
+ if yyhl5 {
|
|
|
+ yyb5 = yyj5 > l
|
|
|
+ } else {
|
|
|
+ yyb5 = r.CheckBreak()
|
|
|
+ }
|
|
|
+ if yyb5 {
|
|
|
+ r.ReadArrayEnd()
|
|
|
+ return
|
|
|
+ }
|
|
|
+ r.ReadArrayElem()
|
|
|
+ if r.TryDecodeAsNil() {
|
|
|
+ x.codecgenH.codecgenG.G = 0
|
|
|
+ } else {
|
|
|
+ x.codecgenH.codecgenG.G = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize19780))
|
|
|
+ }
|
|
|
+ for {
|
|
|
+ yyj5++
|
|
|
+ if yyhl5 {
|
|
|
+ yyb5 = yyj5 > l
|
|
|
+ } else {
|
|
|
+ yyb5 = r.CheckBreak()
|
|
|
+ }
|
|
|
+ if yyb5 {
|
|
|
+ break
|
|
|
+ }
|
|
|
+ r.ReadArrayElem()
|
|
|
+ z.DecStructFieldNotFound(yyj5-1, "")
|
|
|
+ }
|
|
|
+ r.ReadArrayEnd()
|
|
|
+}
|
|
|
+
|
|
|
func (x *stringUint64T) CodecEncodeSelf(e *Encoder) {
|
|
|
var h codecSelfer19780
|
|
|
z, r := GenHelperEncoder(e)
|