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

Method GetArrayAttribute

IO/Infovis/vtkPhyloXMLTreeWriter.cxx:489–508  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

487
488//------------------------------------------------------------------------------
489const char* vtkPhyloXMLTreeWriter::GetArrayAttribute(
490 vtkAbstractArray* array, const char* attributeName)
491{
492 vtkInformation* info = array->GetInformation();
493 vtkNew<vtkInformationIterator> infoItr;
494 infoItr->SetInformation(info);
495 for (infoItr->InitTraversal(); !infoItr->IsDoneWithTraversal(); infoItr->GoToNextItem())
496 {
497 if (strcmp(infoItr->GetCurrentKey()->GetName(), attributeName) == 0)
498 {
499 vtkInformationStringKey* key =
500 vtkInformationStringKey::SafeDownCast(infoItr->GetCurrentKey());
501 if (key)
502 {
503 return info->Get(key);
504 }
505 }
506 }
507 return "";
508}
509
510//------------------------------------------------------------------------------
511void vtkPhyloXMLTreeWriter::PrintSelf(ostream& os, vtkIndent indent)

Callers 2

WriteTreeLevelElementMethod · 0.95

Calls 8

GetCurrentKeyMethod · 0.80
GetInformationMethod · 0.45
SetInformationMethod · 0.45
InitTraversalMethod · 0.45
IsDoneWithTraversalMethod · 0.45
GoToNextItemMethod · 0.45
GetNameMethod · 0.45
GetMethod · 0.45

Tested by

no test coverage detected