| 585 | } |
| 586 | |
| 587 | void ProjectFile::findFiles(XERCES_CPP_NAMESPACE::DOMNode* node, |
| 588 | std::list<ProjectFile::PropertyFile>& files) const |
| 589 | { |
| 590 | if (node->hasAttributes()) { |
| 591 | ProjectFile::PropertyFile prop; |
| 592 | DOMNode* fileAttr = node->getAttributes()->getNamedItem(XStrLiteral("file").unicodeForm()); |
| 593 | if (fileAttr) { |
| 594 | DOMNode* parentNode = node->getParentNode(); |
| 595 | if (parentNode) { |
| 596 | DOMNode* nameAttr = |
| 597 | parentNode->getAttributes()->getNamedItem(XStrLiteral("name").unicodeForm()); |
| 598 | if (nameAttr) { |
| 599 | prop.name = StrX(nameAttr->getNodeValue()).c_str(); |
| 600 | } |
| 601 | |
| 602 | DOMNode* typeAttr = |
| 603 | parentNode->getAttributes()->getNamedItem(XStrLiteral("type").unicodeForm()); |
| 604 | if (typeAttr) { |
| 605 | prop.type = Base::Type::fromName(StrX(typeAttr->getNodeValue()).c_str()); |
| 606 | } |
| 607 | } |
| 608 | |
| 609 | prop.file = StrX(fileAttr->getNodeValue()).c_str(); |
| 610 | files.push_back(prop); |
| 611 | } |
| 612 | } |
| 613 | |
| 614 | DOMNodeList* subNodes = node->getChildNodes(); |
| 615 | for (XMLSize_t i = 0; i < subNodes->getLength(); i++) { |
| 616 | DOMNode* child = subNodes->item(i); |
| 617 | findFiles(child, files); |
| 618 | } |
| 619 | } |
| 620 | |
| 621 | bool ProjectFile::containsFile(const std::string& name) const |
| 622 | { |
nothing calls this directly
no test coverage detected