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

Method SetRange

Common/Core/vtkInformationObjectBaseVectorKey.cxx:161–178  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

159
160//------------------------------------------------------------------------------
161void vtkInformationObjectBaseVectorKey::SetRange(
162 vtkInformation* info, vtkObjectBase** sourceVec, int from, int to, int n)
163{
164 // Get the vector associated with this key, resize if this
165 // set would run off the end.
166 vtkInformationObjectBaseVectorValue* base = this->GetObjectBaseVector(info);
167 int m = static_cast<int>(base->GetVector().size());
168 int reqsz = to + n;
169 if (reqsz > m)
170 {
171 base->GetVector().resize(reqsz);
172 }
173 // Set.
174 for (int i = 0; i < n; ++i, ++from, ++to)
175 {
176 base->GetVector()[to] = sourceVec[from];
177 }
178}
179
180// //----------------------------------------------------------------------------
181// vtkSmartPointer<vtkObjectBase> *vtkInformationObjectBaseVectorKey::Get(

Callers

nothing calls this directly

Calls 3

GetObjectBaseVectorMethod · 0.95
sizeMethod · 0.45
resizeMethod · 0.45

Tested by

no test coverage detected