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

Method GetComponentName

Common/Core/vtkAbstractArray.cxx:157–168  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

155
156//------------------------------------------------------------------------------
157const char* vtkAbstractArray::GetComponentName(vtkIdType component) const
158{
159 unsigned int index = static_cast<unsigned int>(component);
160 if (!this->ComponentNames || component < 0 || index >= this->ComponentNames->size())
161 {
162 // make sure we have valid vector
163 return nullptr;
164 }
165
166 std::string* compName = this->ComponentNames->at(index);
167 return (compName) ? compName->c_str() : nullptr;
168}
169
170//------------------------------------------------------------------------------
171bool vtkAbstractArray::HasAComponentName() const

Callers 15

WriteArrayHeaderMethod · 0.80
WritePArrayMethod · 0.80
CompareDataCommonFunction · 0.80
CompareGridsFunction · 0.80
WriteArrayMethod · 0.80
verifyFunction · 0.80
getRangeInfoFunction · 0.80
CopyAttributeDataMethod · 0.80
CopyComponentNamesMethod · 0.80
componentNameFunction · 0.80
CreateFunction · 0.80

Calls 3

sizeMethod · 0.45
atMethod · 0.45
c_strMethod · 0.45

Tested by 5

CompareDataCommonFunction · 0.64
CompareGridsFunction · 0.64
verifyFunction · 0.64
TestNamedComponentsFunction · 0.64