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

Method RemoveAttribute

Common/DataModel/vtkGenericAttributeCollection.cxx:255–272  ·  view source on GitHub ↗

------------------------------------------------------------------------------ Description: Remove Attribute at `i'.

Source from the content-addressed store, hash-verified

253// Description:
254// Remove Attribute at `i'.
255void vtkGenericAttributeCollection::RemoveAttribute(int i)
256{
257 assert("pre: not_empty" && !this->IsEmpty());
258 assert("pre: valid_i" && (i >= 0) && (i < this->GetNumberOfAttributes()));
259
260#ifndef NDEBUG
261 int oldnumber = this->GetNumberOfAttributes();
262#endif
263
264 this->AttributeInternalVector->Vector[i]->UnRegister(this);
265 this->AttributeInternalVector->Vector.erase(this->AttributeInternalVector->Vector.begin() + i);
266
267 this->AttributeIndices->Vector.erase(this->AttributeIndices->Vector.begin() + i);
268
269 this->Modified();
270
271 assert("post: fewer_items" && this->GetNumberOfAttributes() == (oldnumber - 1));
272}
273
274//------------------------------------------------------------------------------
275// Description:

Callers

nothing calls this directly

Calls 7

IsEmptyMethod · 0.95
GetNumberOfAttributesMethod · 0.95
assertFunction · 0.50
UnRegisterMethod · 0.45
eraseMethod · 0.45
beginMethod · 0.45
ModifiedMethod · 0.45

Tested by

no test coverage detected