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

Function MakeCommonPropertyList

lib/mdflib/mdflib/src/md4block.cpp:235–257  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

233}
234
235void MakeCommonPropertyList(const mdf::IXmlNode &root,
236 mdf::detail::BlockPropertyList &dest) {
237 mdf::IXmlNode::ChildList list;
238 root.GetChildList(list);
239 if (list.empty()) {
240 return;
241 }
242 dest.emplace_back("", "", "", mdf::detail::BlockItemType::BlankItem);
243 dest.emplace_back("Properties", "", "",
244 mdf::detail::BlockItemType::HeaderItem);
245
246 // Handle e property first and tree property later
247 for (const auto &e : list) {
248 if (e->IsTagName("e")) {
249 MakeCommonProperty(*e, dest);
250 }
251 }
252 for (const auto &tree : list) {
253 if (tree->IsTagName("tree")) {
254 MakeTreePropertyList(*tree, dest);
255 }
256 }
257}
258
259} // namespace
260

Callers 1

GetBlockPropertyMethod · 0.85

Calls 5

MakeCommonPropertyFunction · 0.85
MakeTreePropertyListFunction · 0.85
emptyMethod · 0.80
IsTagNameMethod · 0.80
GetChildListMethod · 0.45

Tested by

no test coverage detected