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

Method InsertNextAttribute

Common/DataModel/vtkGenericAttributeCollection.cxx:211–225  ·  view source on GitHub ↗

------------------------------------------------------------------------------ Description: Add attribute `a' at the end.

Source from the content-addressed store, hash-verified

209// Description:
210// Add attribute `a' at the end.
211void vtkGenericAttributeCollection::InsertNextAttribute(vtkGenericAttribute* a)
212{
213 assert("pre: a_exists" && a != nullptr);
214#ifndef NDEBUG
215 int oldnumber = this->GetNumberOfAttributes();
216#endif
217
218 this->AttributeInternalVector->Vector.push_back(a);
219 this->AttributeIndices->Vector.push_back(0); // a dummy default value
220 a->Register(this);
221 this->Modified();
222
223 assert("post: more_items" && this->GetNumberOfAttributes() == oldnumber + 1);
224 assert("post: a_is_set" && this->GetAttribute(this->GetNumberOfAttributes() - 1) == a);
225}
226
227//------------------------------------------------------------------------------
228// Description:

Callers 1

SetDataSetMethod · 0.80

Calls 6

GetNumberOfAttributesMethod · 0.95
GetAttributeMethod · 0.95
assertFunction · 0.50
push_backMethod · 0.45
RegisterMethod · 0.45
ModifiedMethod · 0.45

Tested by

no test coverage detected