MCPcopy
hub / github.com/ugorji/go / codecDecodeSelfFromMap

Method codecDecodeSelfFromMap

codec/values_codecgen_generated_test.go:1670–1726  ·  view source on GitHub ↗
(l int, d *Decoder)

Source from the content-addressed store, hash-verified

1668}
1669
1670func (x *testSimpleFields) codecDecodeSelfFromMap(l int, d *Decoder) {
1671 var h codecSelfer19780
1672 z, r := GenHelper().Decoder(d)
1673 _, _, _ = h, z, r
1674 var yyhl3 bool = l >= 0
1675 for yyj3 := 0; z.DecContainerNext(yyj3, l, yyhl3); yyj3++ {
1676 z.DecReadMapElemKey()
1677 yys3 := r.DecodeStringAsBytes()
1678 z.DecReadMapElemValue()
1679 switch string(yys3) {
1680 case "S":
1681 x.S = (string)(z.DecStringZC(r.DecodeStringAsBytes()))
1682 case "I64":
1683 x.I64 = (int64)(r.DecodeInt64())
1684 case "I8":
1685 x.I8 = (int8)(z.C.IntV(r.DecodeInt64(), 8))
1686 case "Ui64":
1687 x.Ui64 = (uint64)(r.DecodeUint64())
1688 case "Ui8":
1689 x.Ui8 = (uint8)(z.C.UintV(r.DecodeUint64(), 8))
1690 case "F64":
1691 x.F64 = (float64)(r.DecodeFloat64())
1692 case "F32":
1693 x.F32 = (float32)(z.DecDecodeFloat32())
1694 case "B":
1695 x.B = (bool)(r.DecodeBool())
1696 case "Sslice":
1697 z.F.DecSliceStringX(&x.Sslice, d)
1698 case "I32slice":
1699 z.F.DecSliceInt32X(&x.I32slice, d)
1700 case "Ui64slice":
1701 z.F.DecSliceUint64X(&x.Ui64slice, d)
1702 case "Ui8slice":
1703 x.Ui8slice = z.DecodeBytesInto(([]byte)(x.Ui8slice))
1704 case "Bslice":
1705 z.F.DecSliceBoolX(&x.Bslice, d)
1706 case "Iptrslice":
1707 h.decSlicePtrtoint64((*[]*int64)(&x.Iptrslice), d)
1708 case "WrapSliceInt64":
1709 if yyxt25 := z.Extension(x.WrapSliceInt64); yyxt25 != nil {
1710 z.DecExtension(&x.WrapSliceInt64, yyxt25)
1711 } else {
1712 x.WrapSliceInt64.CodecDecodeSelf(d)
1713 }
1714 case "WrapSliceString":
1715 if yyxt27 := z.Extension(x.WrapSliceString); yyxt27 != nil {
1716 z.DecExtension(&x.WrapSliceString, yyxt27)
1717 } else {
1718 x.WrapSliceString.CodecDecodeSelf(d)
1719 }
1720 case "Msint":
1721 z.F.DecMapStringIntX(&x.Msint, d)
1722 default:
1723 z.DecStructFieldNotFound(-1, string(yys3))
1724 } // end switch yys3
1725 } // end for yyj3
1726}
1727

Callers 1

CodecDecodeSelfMethod · 0.95

Calls 15

decSlicePtrtoint64Method · 0.95
GenHelperFunction · 0.85
DecoderMethod · 0.80
DecContainerNextMethod · 0.80
DecReadMapElemKeyMethod · 0.80
DecReadMapElemValueMethod · 0.80
DecStringZCMethod · 0.80
IntVMethod · 0.80
UintVMethod · 0.80
DecDecodeFloat32Method · 0.80
DecSliceStringXMethod · 0.80
DecSliceInt32XMethod · 0.80

Tested by

no test coverage detected