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

Method Set

Common/Core/vtkInformationObjectBaseVectorKey.cxx:100–116  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

98
99//------------------------------------------------------------------------------
100void vtkInformationObjectBaseVectorKey::Set(vtkInformation* info, vtkObjectBase* aValue, int i)
101{
102 if (!this->ValidateDerivedType(info, aValue))
103 {
104 return;
105 }
106 // Get the vector associated with this key, resize if this
107 // set would run off the end.
108 vtkInformationObjectBaseVectorValue* base = this->GetObjectBaseVector(info);
109 int n = static_cast<int>(base->GetVector().size());
110 if (i >= n)
111 {
112 base->GetVector().resize(i + 1);
113 }
114 // Set.
115 base->GetVector()[i] = aValue;
116}
117
118//------------------------------------------------------------------------------
119void vtkInformationObjectBaseVectorKey::Remove(vtkInformation* info, vtkObjectBase* val)

Callers

nothing calls this directly

Calls 4

ValidateDerivedTypeMethod · 0.95
GetObjectBaseVectorMethod · 0.95
sizeMethod · 0.45
resizeMethod · 0.45

Tested by

no test coverage detected