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

Method OpenStream

IO/XML/vtkXMLWriter.cxx:575–608  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

573
574//------------------------------------------------------------------------------
575int 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//------------------------------------------------------------------------------
611int vtkXMLWriter::OpenFile()

Callers 5

WriteInternalMethod · 0.95
ProcessRequestMethod · 0.45
ProcessRequestMethod · 0.45
ProcessRequestMethod · 0.45
ProcessRequestMethod · 0.45

Calls 3

OpenStringMethod · 0.95
OpenFileMethod · 0.95
SetStreamMethod · 0.45

Tested by

no test coverage detected