MCPcopy Create free account
hub / github.com/MyGUI/mygui / save

Method save

UnitTests/TestApp/pugixml.cpp:5878–5910  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5876 }
5877
5878 PUGI__FN void xml_document::save(
5879 xml_writer& writer,
5880 const char_t* indent,
5881 unsigned int flags,
5882 xml_encoding encoding) const
5883 {
5884 impl::xml_buffered_writer buffered_writer(writer, encoding);
5885
5886 if ((flags & format_write_bom) && encoding != encoding_latin1)
5887 {
5888 // BOM always represents the codepoint U+FEFF, so just write it in native encoding
5889#ifdef PUGIXML_WCHAR_MODE
5890 unsigned int bom = 0xfeff;
5891 buffered_writer.write(static_cast<wchar_t>(bom));
5892#else
5893 buffered_writer.write('\xef', '\xbb', '\xbf');
5894#endif
5895 }
5896
5897 if (!(flags & format_no_declaration) && !impl::has_declaration(*this))
5898 {
5899 buffered_writer.write(PUGIXML_TEXT("<?xml version=\"1.0\""));
5900 if (encoding == encoding_latin1)
5901 buffered_writer.write(PUGIXML_TEXT(" encoding=\"ISO-8859-1\""));
5902 buffered_writer.write('?', '>');
5903 if (!(flags & format_raw))
5904 {
5905 buffered_writer.write('\n');
5906 }
5907 }
5908
5909 impl::node_output(buffered_writer, *this, indent, flags, 0);
5910 }
5911
5912#ifndef PUGIXML_NO_STL
5913 PUGI__FN void xml_document::save(

Callers 4

ExportGui_ExportTestFunction · 0.45
saveToFileMethod · 0.45
saveToFileMethod · 0.45
save_file_implFunction · 0.45

Calls 3

has_declarationFunction · 0.70
node_outputFunction · 0.70
writeMethod · 0.45

Tested by

no test coverage detected