MCPcopy Create free account
hub / github.com/MyGUI/mygui / xml_parse_result load_stream_impl

Function xml_parse_result load_stream_impl

Tools/EditorFramework/pugixml.cpp:4024–4038  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4022
4023template<typename T>
4024PUGI__FN xml_parse_result
4025load_stream_impl(xml_document& doc, std::basic_istream<T>& stream, unsigned int options, xml_encoding encoding)
4026{
4027 void* buffer = nullptr;
4028 size_t size = 0;
4029
4030 // load stream to memory (using seek-based implementation if possible, since it's faster and takes less memory)
4031 xml_parse_status status = (stream.tellg() < 0)
4032 ? load_stream_data_noseek(stream, &buffer, &size)
4033 : load_stream_data_seek(stream, &buffer, &size);
4034 if (status != status_ok)
4035 return make_parse_result(status);
4036
4037 return doc.load_buffer_inplace_own(buffer, size, options, encoding);
4038}
4039#endif
4040
4041#if defined(PUGI__MSVC_CRT_VERSION) || defined(__BORLANDC__) || (defined(__MINGW32__) && !defined(__STRICT_ANSI__))

Callers

nothing calls this directly

Calls 2

make_parse_resultFunction · 0.70

Tested by

no test coverage detected