MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / MakeCommonProperty

Function MakeCommonProperty

lib/mdflib/mdflib/src/md4block.cpp:192–209  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

190}
191
192void 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
211void MakeTreePropertyList(const mdf::IXmlNode &root,
212 mdf::detail::BlockPropertyList &dest) {

Callers 2

MakeTreePropertyListFunction · 0.85
MakeCommonPropertyListFunction · 0.85

Calls 1

emptyMethod · 0.80

Tested by

no test coverage detected