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

Method GetArrayByName

Common/DataModel/vtkArrayData.cxx:124–143  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

122}
123
124vtkArray* vtkArrayData::GetArrayByName(const char* name)
125{
126 if (!name || name[0] == '\0')
127 {
128 vtkErrorMacro(<< "No name passed into routine.");
129 return nullptr;
130 }
131
132 vtkArray* temp = nullptr;
133 for (vtkIdType ctr = 0; ctr < this->GetNumberOfArrays(); ctr++)
134 {
135 temp = this->GetArray(ctr);
136 if (temp && name == temp->GetName())
137 {
138 break;
139 }
140 temp = nullptr;
141 }
142 return temp;
143}
144
145void vtkArrayData::ShallowCopy(vtkDataObject* other)
146{

Callers

nothing calls this directly

Calls 3

GetNumberOfArraysMethod · 0.95
GetArrayMethod · 0.95
GetNameMethod · 0.45

Tested by

no test coverage detected