Benchmark harness support for STK-REQ-004.
(l int, d *codec1978.Decoder)
| 2054 | |
| 2055 | // Benchmark harness support for STK-REQ-004. |
| 2056 | func (x *DSTopic) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { |
| 2057 | var h codecSelfer6617 |
| 2058 | z, r := codec1978.GenHelperDecoder(d) |
| 2059 | _, _, _ = h, z, r |
| 2060 | var yyhl3 bool = l >= 0 |
| 2061 | for yyj3 := 0; ; yyj3++ { |
| 2062 | if yyhl3 { |
| 2063 | if yyj3 >= l { |
| 2064 | break |
| 2065 | } |
| 2066 | } else { |
| 2067 | if r.CheckBreak() { |
| 2068 | break |
| 2069 | } |
| 2070 | } |
| 2071 | r.ReadMapElemKey() |
| 2072 | yys3 := z.StringView(r.DecodeStringAsBytes()) |
| 2073 | r.ReadMapElemValue() |
| 2074 | switch yys3 { |
| 2075 | case "Id": |
| 2076 | if r.TryDecodeAsNil() { |
| 2077 | x.Id = 0 |
| 2078 | } else { |
| 2079 | x.Id = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize6617)) |
| 2080 | } |
| 2081 | case "Slug": |
| 2082 | if r.TryDecodeAsNil() { |
| 2083 | x.Slug = "" |
| 2084 | } else { |
| 2085 | x.Slug = (string)(r.DecodeString()) |
| 2086 | } |
| 2087 | default: |
| 2088 | z.DecStructFieldNotFound(-1, yys3) |
| 2089 | } // end switch yys3 |
| 2090 | } // end for yyj3 |
| 2091 | r.ReadMapEnd() |
| 2092 | } |
| 2093 | |
| 2094 | // Benchmark harness support for STK-REQ-004. |
| 2095 | func (x *DSTopic) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { |