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

Method ToXml

lib/mdflib/mdflib/src/mdstring.cpp:78–90  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

76}
77
78void MdString::ToXml(IXmlNode& root_node,
79 const std::string& tag_name) const {
80 // The TX tag should always be added even if no text.
81 if (!text_.empty() || tag_name == "TX") {
82 IXmlNode& node = root_node.AddNode(tag_name);
83 node.Value(text_);
84 MdStandardAttribute::ToXml(node);
85 if (tag_name == "linker_name" &&
86 offset_.has_value() && offset_.value() > 0) {
87 node.SetAttribute("offset", offset_.value());
88 }
89 }
90}
91
92
93

Callers

nothing calls this directly

Calls 5

emptyMethod · 0.80
AddNodeMethod · 0.80
ValueMethod · 0.45
valueMethod · 0.45
SetAttributeMethod · 0.45

Tested by

no test coverage detected