------------------------------------------------------------------------------
| 492 | |
| 493 | //------------------------------------------------------------------------------ |
| 494 | void vtkXMLReader::SetupCompressor(const char* type) |
| 495 | { |
| 496 | // Instantiate a compressor of the given type. |
| 497 | if (!type) |
| 498 | { |
| 499 | vtkErrorMacro("Compressor has no type."); |
| 500 | return; |
| 501 | } |
| 502 | vtkObject* object = nullptr; |
| 503 | vtkDataCompressor* compressor = vtkDataCompressor::SafeDownCast(object); |
| 504 | |
| 505 | if (!compressor) |
| 506 | { |
| 507 | if (strcmp(type, "vtkZLibDataCompressor") == 0) |
| 508 | { |
| 509 | compressor = vtkZLibDataCompressor::New(); |
| 510 | } |
| 511 | else if (strcmp(type, "vtkLZ4DataCompressor") == 0) |
| 512 | { |
| 513 | compressor = vtkLZ4DataCompressor::New(); |
| 514 | } |
| 515 | else if (strcmp(type, "vtkLZMADataCompressor") == 0) |
| 516 | { |
| 517 | compressor = vtkLZMADataCompressor::New(); |
| 518 | } |
| 519 | } |
| 520 | |
| 521 | if (!compressor) |
| 522 | { |
| 523 | vtkErrorMacro("Error creating " << type); |
| 524 | if (object) |
| 525 | { |
| 526 | object->Delete(); |
| 527 | } |
| 528 | return; |
| 529 | } |
| 530 | this->XMLParser->SetCompressor(compressor); |
| 531 | compressor->Delete(); |
| 532 | } |
| 533 | |
| 534 | //------------------------------------------------------------------------------ |
| 535 | int vtkXMLReader::ReadXMLInformation() |
no test coverage detected