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

Method StartFile

IO/XML/vtkXMLWriter.cxx:724–751  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

722
723//------------------------------------------------------------------------------
724int vtkXMLWriter::StartFile()
725{
726 ostream& os = *(this->Stream);
727
728 // If this will really be a valid XML file, put the XML header at
729 // the top.
730 if (this->EncodeAppendedData)
731 {
732 os << "<?xml version=\"1.0\"?>\n";
733 }
734
735 os.imbue(std::locale::classic());
736
737 // Open the document-level element. This will contain the rest of
738 // the elements.
739 os << "<VTKFile";
740 this->WriteFileAttributes();
741 os << ">\n";
742
743 os.flush();
744 if (os.fail())
745 {
746 this->SetErrorCode(vtkErrorCode::GetLastSystemError());
747 return 0;
748 }
749
750 return 1;
751}
752
753//------------------------------------------------------------------------------
754void vtkXMLWriter::WriteFileAttributes()

Callers 7

ProcessRequestMethod · 0.45
ProcessRequestMethod · 0.45
ProcessRequestMethod · 0.45
WriteDataMethod · 0.45
ProcessRequestMethod · 0.45
WriteDataMethod · 0.45
WriteDataMethod · 0.45

Calls 2

WriteFileAttributesMethod · 0.95
flushMethod · 0.45

Tested by

no test coverage detected