Benchmark harness support for STK-REQ-004.
(e *codec1978.Encoder)
| 1051 | |
| 1052 | // Benchmark harness support for STK-REQ-004. |
| 1053 | func (x *CBName) CodecEncodeSelf(e *codec1978.Encoder) { |
| 1054 | var h codecSelfer6617 |
| 1055 | z, r := codec1978.GenHelperEncoder(e) |
| 1056 | _, _, _ = h, z, r |
| 1057 | if x == nil { |
| 1058 | r.EncodeNil() |
| 1059 | } else { |
| 1060 | if false { |
| 1061 | } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { |
| 1062 | z.EncExtension(x, yyxt1) |
| 1063 | } else if !z.EncBinary() && z.IsJSONHandle() { |
| 1064 | z.EncJSONMarshal(x) |
| 1065 | } else { |
| 1066 | yysep2 := !z.EncBinary() |
| 1067 | yy2arr2 := z.EncBasicHandle().StructToArray |
| 1068 | _, _ = yysep2, yy2arr2 |
| 1069 | const yyr2 bool = false // struct tag has 'toArray' |
| 1070 | if yyr2 || yy2arr2 { |
| 1071 | r.WriteArrayStart(1) |
| 1072 | } else { |
| 1073 | r.WriteMapStart(1) |
| 1074 | } |
| 1075 | if yyr2 || yy2arr2 { |
| 1076 | r.WriteArrayElem() |
| 1077 | if false { |
| 1078 | } else { |
| 1079 | if z.EncBasicHandle().StringToRaw { |
| 1080 | r.EncodeStringBytesRaw(z.BytesView(string(x.FullName))) |
| 1081 | } else { |
| 1082 | r.EncodeStringEnc(codecSelferCcUTF86617, string(x.FullName)) |
| 1083 | } |
| 1084 | } |
| 1085 | } else { |
| 1086 | r.WriteMapElemKey() |
| 1087 | if z.IsJSONHandle() { |
| 1088 | z.WriteStr("\"FullName\"") |
| 1089 | } else { |
| 1090 | r.EncodeStringEnc(codecSelferCcUTF86617, `FullName`) |
| 1091 | } |
| 1092 | r.WriteMapElemValue() |
| 1093 | if false { |
| 1094 | } else { |
| 1095 | if z.EncBasicHandle().StringToRaw { |
| 1096 | r.EncodeStringBytesRaw(z.BytesView(string(x.FullName))) |
| 1097 | } else { |
| 1098 | r.EncodeStringEnc(codecSelferCcUTF86617, string(x.FullName)) |
| 1099 | } |
| 1100 | } |
| 1101 | } |
| 1102 | if yyr2 || yy2arr2 { |
| 1103 | r.WriteArrayEnd() |
| 1104 | } else { |
| 1105 | r.WriteMapEnd() |
| 1106 | } |
| 1107 | } |
| 1108 | } |
| 1109 | } |
| 1110 |
no outgoing calls
no test coverage detected