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

Method get_att_float

IO/NetCDF/vtkXArrayAccessor.cxx:278–297  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

276}
277
278int vtkXArrayAccessor::get_att_float(
279 int vtkNotUsed(ncid), int varid, const char* name, float* value)
280{
281 if (static_cast<size_t>(varid) >= this->Var.size())
282 return NC_ENOTVAR;
283 auto it = Att[varid].find(name);
284 if (it == Att[varid].end())
285 return NC_ENOTATT;
286 auto v = it->second;
287 if (v.IsFloat())
288 {
289 *value = v.ToFloat();
290 }
291 else
292 {
293 return NC_ERANGE;
294 }
295
296 return NC_NOERR;
297}
298
299void vtkXArrayAccessor::PrintVarValue(const char* name, int varid)
300{

Callers 1

LoadVariableMethod · 0.45

Calls 5

IsFloatMethod · 0.80
sizeMethod · 0.45
findMethod · 0.45
endMethod · 0.45
ToFloatMethod · 0.45

Tested by

no test coverage detected