------------------------------------------------------------------------------
| 412 | |
| 413 | //------------------------------------------------------------------------------ |
| 414 | int vtkXMLStructuredDataWriter::WriteInlineMode(vtkIndent indent) |
| 415 | { |
| 416 | vtkDataSet* input = this->GetDataSetInput(); |
| 417 | ostream& os = *(this->Stream); |
| 418 | |
| 419 | int* extent = input->GetInformation()->Get(vtkDataObject::DATA_EXTENT()); |
| 420 | |
| 421 | // Split progress of the data write by the fraction contributed by |
| 422 | // each piece. |
| 423 | float progressRange[2] = { 0.f, 0.f }; |
| 424 | this->GetProgressRange(progressRange); |
| 425 | |
| 426 | // Write each piece's XML and data. |
| 427 | int result = 1; |
| 428 | |
| 429 | // Set the progress range for this piece. |
| 430 | this->SetProgressRange(progressRange, this->CurrentPiece, this->ProgressFractions); |
| 431 | |
| 432 | // Make sure input is valid. |
| 433 | if (input->CheckAttributes() == 0) |
| 434 | { |
| 435 | os << indent << "<Piece"; |
| 436 | this->WriteVectorAttribute("Extent", 6, extent); |
| 437 | if (this->ErrorCode == vtkErrorCode::OutOfDiskSpaceError) |
| 438 | { |
| 439 | return 0; |
| 440 | } |
| 441 | |
| 442 | os << ">\n"; |
| 443 | |
| 444 | this->WriteInlinePiece(indent.GetNextIndent()); |
| 445 | if (this->ErrorCode == vtkErrorCode::OutOfDiskSpaceError) |
| 446 | { |
| 447 | return 0; |
| 448 | } |
| 449 | os << indent << "</Piece>\n"; |
| 450 | } |
| 451 | else |
| 452 | { |
| 453 | vtkErrorMacro("Input is invalid for piece " << this->CurrentPiece << ". Aborting."); |
| 454 | result = 0; |
| 455 | } |
| 456 | |
| 457 | return result; |
| 458 | } |
| 459 | |
| 460 | //------------------------------------------------------------------------------ |
| 461 | template <class iterT> |
no test coverage detected