------------------------------------------------------------------------------
| 88 | |
| 89 | //------------------------------------------------------------------------------ |
| 90 | int vtkXMLPTableWriter::WritePiece(int index) |
| 91 | { |
| 92 | // Create the writer for the piece. Its configuration should match |
| 93 | // our own writer. |
| 94 | vtkXMLWriter* pWriter = this->CreatePieceWriter(index); |
| 95 | pWriter->AddObserver(vtkCommand::ProgressEvent, this->InternalProgressObserver); |
| 96 | |
| 97 | char* fileName = this->CreatePieceFileName(index, this->PathName); |
| 98 | std::string path = vtksys::SystemTools::GetParentDirectory(fileName); |
| 99 | if (!path.empty() && !vtksys::SystemTools::PathExists(path)) |
| 100 | { |
| 101 | vtksys::SystemTools::MakeDirectory(path); |
| 102 | } |
| 103 | pWriter->SetFileName(fileName); |
| 104 | delete[] fileName; |
| 105 | |
| 106 | // Copy the writer settings. |
| 107 | pWriter->SetDebug(this->Debug); |
| 108 | pWriter->SetCompressor(this->Compressor); |
| 109 | pWriter->SetDataMode(this->DataMode); |
| 110 | pWriter->SetByteOrder(this->ByteOrder); |
| 111 | pWriter->SetEncodeAppendedData(this->EncodeAppendedData); |
| 112 | pWriter->SetHeaderType(this->HeaderType); |
| 113 | pWriter->SetBlockSize(this->BlockSize); |
| 114 | pWriter->SetWriteTimeValue(this->GetWriteTimeValue()); |
| 115 | |
| 116 | // Write the piece. |
| 117 | int result = pWriter->Write(); |
| 118 | this->SetErrorCode(pWriter->GetErrorCode()); |
| 119 | |
| 120 | // Cleanup. |
| 121 | pWriter->RemoveObserver(this->InternalProgressObserver); |
| 122 | pWriter->Delete(); |
| 123 | |
| 124 | return result; |
| 125 | } |
| 126 | |
| 127 | //------------------------------------------------------------------------------ |
| 128 | void vtkXMLPTableWriter::WritePRowData(vtkDataSetAttributes* ds, vtkIndent indent) |
no test coverage detected