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

Function MakeTreePropertyList

lib/mdflib/mdflib/src/md4block.cpp:211–233  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

209}
210
211void MakeTreePropertyList(const mdf::IXmlNode &root,
212 mdf::detail::BlockPropertyList &dest) {
213 mdf::IXmlNode::ChildList list;
214 root.GetChildList(list);
215 if (list.empty()) {
216 return;
217 }
218 dest.emplace_back("", "", "", mdf::detail::BlockItemType::BlankItem);
219 dest.emplace_back(root.Attribute<std::string>("name"), "", "",
220 mdf::detail::BlockItemType::HeaderItem);
221
222 // Handle e property first and tree property later
223 for (const auto &e : list) {
224 if (e->IsTagName("e")) {
225 MakeCommonProperty(*e, dest);
226 }
227 }
228 for (const auto &tree : list) {
229 if (tree->IsTagName("tree")) {
230 MakeTreePropertyList(*tree, dest);
231 }
232 }
233}
234
235void MakeCommonPropertyList(const mdf::IXmlNode &root,
236 mdf::detail::BlockPropertyList &dest) {

Callers 1

MakeCommonPropertyListFunction · 0.85

Calls 4

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

Tested by

no test coverage detected