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

Method ReadString

IO/Legacy/vtkDataReader.cxx:282–294  ·  view source on GitHub ↗

------------------------------------------------------------------------------ Internal function to read in a string up to 256 characters. Returns zero if there was an error.

Source from the content-addressed store, hash-verified

280// Internal function to read in a string up to 256 characters.
281// Returns zero if there was an error.
282int vtkDataReader::ReadString(char (&result)[256])
283{
284 // Force the parameter to be seen as a 256-byte array rather than a decayed
285 // pointer.
286 char(&result_ref)[256] = *reinterpret_cast<char(*)[256]>(result);
287 this->IS->width(256);
288 *this->IS >> result_ref;
289 if (this->IS->fail())
290 {
291 return 0;
292 }
293 return 1;
294}
295
296//------------------------------------------------------------------------------
297// Internal function to read in an integer value.

Callers 15

ReadHeaderMethod · 0.95
IsFileValidMethod · 0.95
ReadCellDataMethod · 0.95
ReadPointDataMethod · 0.95
ReadVertexDataMethod · 0.95
ReadEdgeDataMethod · 0.95
ReadRowDataMethod · 0.95
ReadPointCoordinatesMethod · 0.95
ReadCoordinatesMethod · 0.95
ReadScalarDataMethod · 0.95
ReadVectorDataMethod · 0.95
ReadNormalDataMethod · 0.95

Calls 1

widthMethod · 0.80

Tested by

no test coverage detected