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

Method WriteFileAttributes

IO/XML/vtkXMLWriter.cxx:754–790  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

752
753//------------------------------------------------------------------------------
754void vtkXMLWriter::WriteFileAttributes()
755{
756 ostream& os = *(this->Stream);
757
758 // Write the file's type.
759 this->WriteStringAttribute("type", this->GetDataSetName());
760
761 // Write the version number of the file.
762 os << " version=\"" << this->GetDataSetMajorVersion() << "." << this->GetDataSetMinorVersion()
763 << "\"";
764
765 // Write the byte order for the file.
766 if (this->ByteOrder == vtkXMLWriter::BigEndian)
767 {
768 os << " byte_order=\"BigEndian\"";
769 }
770 else
771 {
772 os << " byte_order=\"LittleEndian\"";
773 }
774
775 // Write the header type for binary data.
776 if (this->HeaderType == vtkXMLWriter::UInt64)
777 {
778 os << " header_type=\"UInt64\"";
779 }
780 else
781 {
782 os << " header_type=\"UInt32\"";
783 }
784
785 // Write the compressor that will be used for the file.
786 if (this->Compressor)
787 {
788 os << " compressor=\"" << this->Compressor->GetClassName() << "\"";
789 }
790}
791
792//------------------------------------------------------------------------------
793int vtkXMLWriter::EndFile()

Callers 1

StartFileMethod · 0.95

Calls 5

WriteStringAttributeMethod · 0.95
GetDataSetNameMethod · 0.45
GetClassNameMethod · 0.45

Tested by

no test coverage detected