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

Method WriteAppendedPieceData

IO/XML/vtkXMLTableWriter.cxx:470–502  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

468
469//------------------------------------------------------------------------------
470void vtkXMLTableWriter::WriteAppendedPieceData(int index)
471{
472 ostream& os = *(this->Stream);
473 vtkTable* input = this->GetTableInput();
474
475 std::streampos returnPosition = os.tellp();
476
477 os.seekp(std::streampos(this->NumberOfRowsPositions[index]));
478 this->WriteScalarAttribute("NumberOfRows", input->GetNumberOfRows());
479 os.seekp(returnPosition);
480
481 os.seekp(std::streampos(this->NumberOfColsPositions[index]));
482 this->WriteScalarAttribute("NumberOfCols", input->GetNumberOfColumns());
483 os.seekp(returnPosition);
484
485 // Split progress among row arrays.
486 float progressRange[2] = { 0, 0 };
487 this->GetProgressRange(progressRange);
488
489 // Set the range of progress for the row data arrays.
490 this->SetProgressRange(progressRange, 0, 2);
491
492 // Write the row data arrays.
493 this->WriteRowDataAppendedData(
494 input->GetRowData(), this->CurrentTimeIndex, &this->RowsOM->GetPiece(index));
495 if (this->ErrorCode == vtkErrorCode::OutOfDiskSpaceError)
496 {
497 return;
498 }
499
500 // Set the range of progress for the row data arrays.
501 this->SetProgressRange(progressRange, 1, 2);
502}
503
504//------------------------------------------------------------------------------
505void vtkXMLTableWriter::WriteRowDataAppended(

Callers 1

WriteAPieceMethod · 0.95

Calls 9

GetTableInputMethod · 0.95
WriteScalarAttributeMethod · 0.80
GetRowDataMethod · 0.80
GetNumberOfRowsMethod · 0.45
GetNumberOfColumnsMethod · 0.45
GetProgressRangeMethod · 0.45
SetProgressRangeMethod · 0.45
GetPieceMethod · 0.45

Tested by

no test coverage detected