MCPcopy Create free account
hub / github.com/Kitware/VTK / FindNestedElementWithNameAndAttribute

Method FindNestedElementWithNameAndAttribute

Common/DataModel/vtkXMLDataElement.cxx:557–579  ·  view source on GitHub ↗

------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

555
556//------------------------------------------------------------------------------
557vtkXMLDataElement* vtkXMLDataElement::FindNestedElementWithNameAndAttribute(
558 const char* name, const char* att_name, const char* att_value)
559{
560 if (!name || !att_name || !att_value)
561 {
562 return nullptr;
563 }
564
565 int i;
566 for (i = 0; i < this->NumberOfNestedElements; ++i)
567 {
568 const char* nname = this->NestedElements[i]->GetName();
569 if (nname && (strcmp(nname, name) == 0))
570 {
571 const char* val = this->NestedElements[i]->GetAttribute(att_name);
572 if (val && !strcmp(val, att_value))
573 {
574 return this->NestedElements[i];
575 }
576 }
577 }
578 return nullptr;
579}
580
581//------------------------------------------------------------------------------
582vtkXMLDataElement* vtkXMLDataElement::LookupElement(const char* id)

Callers 6

ReadGridMethod · 0.80
ReadTrees_0Method · 0.80
ReadTrees_1Method · 0.80
ReadTrees_2Method · 0.80
readVectorInfoFunction · 0.80

Calls 2

GetNameMethod · 0.45
GetAttributeMethod · 0.45

Tested by

no test coverage detected