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

Method codecDecodeSelfFromMap

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

Source from the content-addressed store, hash-verified

3380}
3381
3382func (x *TestStrucCommon) codecDecodeSelfFromMap(l int, d *Decoder) {
3383 var h codecSelfer19780
3384 z, r := GenHelper().Decoder(d)
3385 _, _, _ = h, z, r
3386 var yyhl3 bool = l >= 0
3387 for yyj3 := 0; z.DecContainerNext(yyj3, l, yyhl3); yyj3++ {
3388 z.DecReadMapElemKey()
3389 yys3 := r.DecodeStringAsBytes()
3390 z.DecReadMapElemValue()
3391 switch string(yys3) {
3392 case "S":
3393 x.S = (string)(z.DecStringZC(r.DecodeStringAsBytes()))
3394 case "I64":
3395 x.I64 = (int64)(r.DecodeInt64())
3396 case "I32":
3397 x.I32 = (int32)(z.C.IntV(r.DecodeInt64(), 32))
3398 case "I16":
3399 x.I16 = (int16)(z.C.IntV(r.DecodeInt64(), 16))
3400 case "I8":
3401 x.I8 = (int8)(z.C.IntV(r.DecodeInt64(), 8))
3402 case "I64n":
3403 x.I64n = (int64)(r.DecodeInt64())
3404 case "I32n":
3405 x.I32n = (int32)(z.C.IntV(r.DecodeInt64(), 32))
3406 case "I16n":
3407 x.I16n = (int16)(z.C.IntV(r.DecodeInt64(), 16))
3408 case "I8n":
3409 x.I8n = (int8)(z.C.IntV(r.DecodeInt64(), 8))
3410 case "Ui64":
3411 x.Ui64 = (uint64)(r.DecodeUint64())
3412 case "Ui32":
3413 x.Ui32 = (uint32)(z.C.UintV(r.DecodeUint64(), 32))
3414 case "Ui16":
3415 x.Ui16 = (uint16)(z.C.UintV(r.DecodeUint64(), 16))
3416 case "Ui8":
3417 x.Ui8 = (uint8)(z.C.UintV(r.DecodeUint64(), 8))
3418 case "F64":
3419 x.F64 = (float64)(r.DecodeFloat64())
3420 case "F32":
3421 x.F32 = (float32)(z.DecDecodeFloat32())
3422 case "B":
3423 x.B = (bool)(r.DecodeBool())
3424 case "By":
3425 x.By = (uint8)(z.C.UintV(r.DecodeUint64(), 8))
3426 case "Sslice":
3427 z.F.DecSliceStringX(&x.Sslice, d)
3428 case "I64slice":
3429 z.F.DecSliceInt64X(&x.I64slice, d)
3430 case "I32slice":
3431 z.F.DecSliceInt32X(&x.I32slice, d)
3432 case "Ui64slice":
3433 z.F.DecSliceUint64X(&x.Ui64slice, d)
3434 case "Ui8slice":
3435 x.Ui8slice = z.DecodeBytesInto(([]byte)(x.Ui8slice))
3436 case "Bslice":
3437 z.F.DecSliceBoolX(&x.Bslice, d)
3438 case "Byslice":
3439 x.Byslice = z.DecodeBytesInto(([]byte)(x.Byslice))

Callers 1

CodecDecodeSelfMethod · 0.95

Calls 15

decSlicePtrtoint64Method · 0.95
decSlicestringUint64TMethod · 0.95
decArray8int64Method · 0.95
decArray0int64Method · 0.95
GenHelperFunction · 0.85
DecoderMethod · 0.80
DecContainerNextMethod · 0.80
DecReadMapElemKeyMethod · 0.80
DecReadMapElemValueMethod · 0.80
DecStringZCMethod · 0.80
IntVMethod · 0.80

Tested by

no test coverage detected