------------------------------------------------------------------------------
| 423 | |
| 424 | //------------------------------------------------------------------------------ |
| 425 | int vtkPDataSetWriter::WriteRectilinearGridMetaData( |
| 426 | vtkRectilinearGrid* input, char* root, char* str, size_t strSize, ostream* fptr) |
| 427 | { |
| 428 | int i; |
| 429 | int* pi; |
| 430 | |
| 431 | // We should indicate the type of data that is being saved. |
| 432 | *fptr << " dataType=\"" << input->GetClassName() << "\"" << endl; |
| 433 | |
| 434 | pi = vtkStreamingDemandDrivenPipeline::GetWholeExtent(this->GetInputInformation()); |
| 435 | *fptr << " wholeExtent=\"" << pi[0] << " " << pi[1] << " " << pi[2] << " " << pi[3] << " " |
| 436 | << pi[4] << " " << pi[5] << "\"" << endl; |
| 437 | |
| 438 | // This is making the assumption that all the files will be written out by |
| 439 | // some processes. |
| 440 | *fptr << " numberOfPieces=\"" << this->NumberOfPieces << "\" >" << endl; |
| 441 | for (i = 0; i < this->NumberOfPieces; ++i) |
| 442 | { |
| 443 | pi = this->Extents[i].data(); |
| 444 | auto result = vtk::format_to_n(str, strSize, this->FilePatternStdFormat, root, i); |
| 445 | *result.out = '\0'; |
| 446 | *fptr << " <Piece fileName=\"" << str << "\"" << endl |
| 447 | << " extent=\"" << pi[0] << " " << pi[1] << " " << pi[2] << " " << pi[3] << " " |
| 448 | << pi[4] << " " << pi[5] << "\" />" << endl; |
| 449 | } |
| 450 | *fptr << "</File>" << endl; |
| 451 | |
| 452 | fptr->flush(); |
| 453 | if (fptr->fail()) |
| 454 | { |
| 455 | return 0; |
| 456 | } |
| 457 | return 1; |
| 458 | } |
| 459 | |
| 460 | //------------------------------------------------------------------------------ |
| 461 | int vtkPDataSetWriter::WriteStructuredGridMetaData( |
no test coverage detected