------------------------------------------------------------------------------
| 305 | |
| 306 | //------------------------------------------------------------------------------ |
| 307 | unsigned int vtkXMLCompositeDataReader::CountNestedElements( |
| 308 | vtkXMLDataElement* element, const std::string& tagName, const std::set<std::string>& exclusions) |
| 309 | { |
| 310 | if (tagName.empty() || element == nullptr) |
| 311 | { |
| 312 | return 0; |
| 313 | } |
| 314 | |
| 315 | unsigned int count = 0; |
| 316 | for (unsigned int cc = 0, max = element->GetNumberOfNestedElements(); cc < max; ++cc) |
| 317 | { |
| 318 | auto child = element->GetNestedElement(cc); |
| 319 | if (child && child->GetName()) |
| 320 | { |
| 321 | if (child->GetName() == tagName) |
| 322 | { |
| 323 | ++count; |
| 324 | } |
| 325 | else if (exclusions.find(child->GetName()) == exclusions.end()) |
| 326 | { |
| 327 | count += vtkXMLCompositeDataReader::CountNestedElements(child, tagName, exclusions); |
| 328 | } |
| 329 | } |
| 330 | } |
| 331 | return count; |
| 332 | } |
| 333 | |
| 334 | //------------------------------------------------------------------------------ |
| 335 | void vtkXMLCompositeDataReader::ReadXMLData() |
no test coverage detected