MCPcopy Create free account
hub / github.com/comaps/comaps / Read

Method Read

libs/coding/parse_xml.hpp:25–39  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

23 {}
24
25 bool Read()
26 {
27 char * buffer = static_cast<char *>(m_parser.GetBuffer(kBufferSize));
28 ASSERT(buffer, ());
29
30 m_numRead = m_source.Read(buffer, kBufferSize);
31 if (m_numRead == 0)
32 return false;
33
34 if (m_parser.ParseBuffer(static_cast<uint32_t>(m_numRead), false) == XML_STATUS_ERROR)
35 MYTHROW(XmlParseError, (m_parser.GetErrorMessage()));
36
37 m_res += m_numRead;
38 return m_numRead == kBufferSize;
39 }
40
41private:
42 uint32_t static constexpr kBufferSize = 16 * 1024;

Callers

nothing calls this directly

Calls 5

ASSERTFunction · 0.85
ParseBufferMethod · 0.80
GetErrorMessageMethod · 0.80
GetBufferMethod · 0.45
ReadMethod · 0.45

Tested by

no test coverage detected