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

Method WriteUnstructuredMetaData

IO/Parallel/vtkPDataSetWriter.cxx:285–311  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

283
284//------------------------------------------------------------------------------
285int vtkPDataSetWriter::WriteUnstructuredMetaData(
286 vtkDataSet* input, char* root, char* str, size_t strSize, ostream* fptr)
287{
288 if (!root || !str)
289 {
290 return 0;
291 }
292
293 // We should indicate the type of data that is being saved.
294 *fptr << " dataType=\"" << input->GetClassName() << "\"" << endl;
295 // This is making the assumption that all the files will be written out by
296 // some processes.
297 *fptr << " numberOfPieces=\"" << this->NumberOfPieces << "\" >" << endl;
298 for (int i = 0; i < this->NumberOfPieces; ++i)
299 {
300 auto result = vtk::format_to_n(str, strSize, this->FilePatternStdFormat, root, i);
301 *result.out = '\0';
302 *fptr << " <Piece fileName=\"" << str << "\" />" << endl;
303 }
304 *fptr << "</File>" << endl;
305 fptr->flush();
306 if (fptr->fail())
307 {
308 return 0;
309 }
310 return 1;
311}
312
313//------------------------------------------------------------------------------
314int vtkPDataSetWriter::WriteImageMetaData(

Callers 1

WriteMethod · 0.95

Calls 3

format_to_nFunction · 0.50
GetClassNameMethod · 0.45
flushMethod · 0.45

Tested by

no test coverage detected