------------------------------------------------------------------------------
| 237 | |
| 238 | //------------------------------------------------------------------------------ |
| 239 | void vtkXMLPolyDataWriter::WriteAppendedPieceData(int index) |
| 240 | { |
| 241 | ostream& os = *(this->Stream); |
| 242 | vtkPolyData* input = this->GetInput(); |
| 243 | |
| 244 | unsigned long returnPosition = os.tellp(); |
| 245 | os.seekp(this->NumberOfVertsPositions[index]); |
| 246 | this->WriteScalarAttribute("NumberOfVerts", input->GetVerts()->GetNumberOfCells()); |
| 247 | if (this->ErrorCode == vtkErrorCode::OutOfDiskSpaceError) |
| 248 | { |
| 249 | return; |
| 250 | } |
| 251 | |
| 252 | os.seekp(this->NumberOfLinesPositions[index]); |
| 253 | this->WriteScalarAttribute("NumberOfLines", input->GetLines()->GetNumberOfCells()); |
| 254 | if (this->ErrorCode == vtkErrorCode::OutOfDiskSpaceError) |
| 255 | { |
| 256 | return; |
| 257 | } |
| 258 | |
| 259 | os.seekp(this->NumberOfStripsPositions[index]); |
| 260 | this->WriteScalarAttribute("NumberOfStrips", input->GetStrips()->GetNumberOfCells()); |
| 261 | if (this->ErrorCode == vtkErrorCode::OutOfDiskSpaceError) |
| 262 | { |
| 263 | return; |
| 264 | } |
| 265 | |
| 266 | os.seekp(this->NumberOfPolysPositions[index]); |
| 267 | this->WriteScalarAttribute("NumberOfPolys", input->GetPolys()->GetNumberOfCells()); |
| 268 | if (this->ErrorCode == vtkErrorCode::OutOfDiskSpaceError) |
| 269 | { |
| 270 | return; |
| 271 | } |
| 272 | os.seekp(returnPosition); |
| 273 | |
| 274 | // Split progress range by the approximate fraction of data written |
| 275 | // by each step in this method. |
| 276 | float progressRange[2] = { 0.f, 0.f }; |
| 277 | this->GetProgressRange(progressRange); |
| 278 | float fractions[6]; |
| 279 | this->CalculateSuperclassFraction(fractions); |
| 280 | |
| 281 | // Set the range of progress for superclass. |
| 282 | this->SetProgressRange(progressRange, 0, fractions); |
| 283 | |
| 284 | // Let the superclass write its data. |
| 285 | this->Superclass::WriteAppendedPieceData(index); |
| 286 | if (this->ErrorCode == vtkErrorCode::OutOfDiskSpaceError) |
| 287 | { |
| 288 | return; |
| 289 | } |
| 290 | |
| 291 | // Set the range of progress for Verts. |
| 292 | this->SetProgressRange(progressRange, 1, fractions); |
| 293 | |
| 294 | // Write the Verts. |
| 295 | this->WriteCellsAppendedData( |
| 296 | input->GetVerts(), nullptr, this->CurrentTimeIndex, &this->VertsOM->GetPiece(index)); |
nothing calls this directly
no test coverage detected