------------------------------------------------------------------------------
| 573 | |
| 574 | //------------------------------------------------------------------------------ |
| 575 | int vtkXMLWriter::OpenStream() |
| 576 | { |
| 577 | if (this->Stream) |
| 578 | { |
| 579 | // Rewind stream to the beginning. |
| 580 | this->Stream->seekp(0); |
| 581 | } |
| 582 | else |
| 583 | { |
| 584 | if (this->WriteToOutputString) |
| 585 | { |
| 586 | if (!this->OpenString()) |
| 587 | { |
| 588 | return 0; |
| 589 | } |
| 590 | } |
| 591 | else |
| 592 | { |
| 593 | if (!this->OpenFile()) |
| 594 | { |
| 595 | return 0; |
| 596 | } |
| 597 | } |
| 598 | } |
| 599 | |
| 600 | // Make sure sufficient precision is used in the ascii |
| 601 | // representation of data and meta-data. |
| 602 | this->Stream->precision(this->Precision); |
| 603 | |
| 604 | // Setup the output streams. |
| 605 | this->DataStream->SetStream(this->Stream); |
| 606 | |
| 607 | return 1; |
| 608 | } |
| 609 | |
| 610 | //------------------------------------------------------------------------------ |
| 611 | int vtkXMLWriter::OpenFile() |
no test coverage detected