MCPcopy Create free account
hub / github.com/FreeCAD/FreeCAD / readValue

Function readValue

src/App/ProjectFile.cpp:101–115  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

99}
100
101std::string readValue(DOMNode* node)
102{
103 if (node->getNodeType() == DOMNode::ELEMENT_NODE) {
104 if (DOMElement* child =
105 static_cast<DOMElement*>(node)->getFirstElementChild()) { // NOLINT
106 if (DOMNode* nameAttr =
107 child->getAttributes()->getNamedItem(XStrLiteral("value").unicodeForm())) {
108 std::string value = StrX(nameAttr->getNodeValue()).c_str();
109 return value;
110 }
111 }
112 }
113
114 return {};
115}
116
117class DocumentMetadata
118{

Callers 2

readPropertyMethod · 0.85
startElementMethod · 0.85

Calls 4

StrXClass · 0.85
getAttributesMethod · 0.80
unicodeFormMethod · 0.80
c_strMethod · 0.45

Tested by

no test coverage detected