| 190 | } |
| 191 | |
| 192 | void MakeCommonProperty(const mdf::IXmlNode &e, |
| 193 | mdf::detail::BlockPropertyList &dest) { |
| 194 | const auto name = e.Attribute<std::string>("name"); |
| 195 | const auto desc = e.Attribute<std::string>("desc"); |
| 196 | auto unit = e.Attribute<std::string>("unit"); |
| 197 | if (unit.empty()) { |
| 198 | unit = e.Attribute<std::string>("unit_ref"); |
| 199 | } |
| 200 | |
| 201 | std::ostringstream label; |
| 202 | label << name; |
| 203 | if (!unit.empty()) { |
| 204 | label << " [" << unit << "]"; |
| 205 | } |
| 206 | |
| 207 | const auto value = e.Value<std::string>(); |
| 208 | dest.emplace_back(label.str(), value, desc); |
| 209 | } |
| 210 | |
| 211 | void MakeTreePropertyList(const mdf::IXmlNode &root, |
| 212 | mdf::detail::BlockPropertyList &dest) { |
no test coverage detected