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

Method StartElement

lib/mdflib/mdflib/src/expatxml.cpp:74–85  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

72namespace mdf {
73
74void ExpatXml::StartElement(const XML_Char *fullname,
75 const XML_Char **attributes) {
76 std::unique_ptr<XmlNode> p = std::make_unique<XmlNode>(fullname);
77 p->SetAttribute(attributes);
78 auto *current = node_stack_.empty() ? nullptr : node_stack_.top();
79 node_stack_.push(p.get());
80 if (!root_node_) {
81 root_node_ = std::move(p);
82 } else if (current != nullptr) {
83 current->AddNode(std::move(p));
84 }
85}
86
87void ExpatXml::EndElement(const XML_Char *) {
88 if (!node_stack_.empty()) {

Callers 1

StartElementHandlerFunction · 0.80

Calls 5

emptyMethod · 0.80
pushMethod · 0.80
AddNodeMethod · 0.80
SetAttributeMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected