MCPcopy Create free account
hub / github.com/cppcheck-opensource/cppcheck / readXmlStringList

Function readXmlStringList

lib/importproject.cpp:1405–1416  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1403}
1404
1405static std::list<std::string> readXmlStringList(const tinyxml2::XMLElement *node, const std::string &path, const char name[], const char attribute[])
1406{
1407 std::list<std::string> ret;
1408 for (const tinyxml2::XMLElement *child = node->FirstChildElement(); child; child = child->NextSiblingElement()) {
1409 if (strcmp(child->Name(), name) != 0)
1410 continue;
1411 const char *attr = attribute ? child->Attribute(attribute) : child->GetText();
1412 if (attr)
1413 ret.emplace_back(joinRelativePath(path, attr));
1414 }
1415 return ret;
1416}
1417
1418static std::list<std::string> readXmlPathMatchList(const tinyxml2::XMLElement *node, const std::string &path, const char name[], const char attribute[])
1419{

Callers 1

Calls 6

joinRelativePathFunction · 0.85
FirstChildElementMethod · 0.80
NextSiblingElementMethod · 0.80
NameMethod · 0.80
AttributeMethod · 0.80
GetTextMethod · 0.80

Tested by

no test coverage detected