MCPcopy Create free account
hub / github.com/ValveSoftware/openvr / parseFromStream

Function parseFromStream

src/jsoncpp.cpp:2208–2220  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2206// global functions
2207
2208bool parseFromStream(
2209 CharReader::Factory const& fact, std::istream& sin,
2210 Value* root, std::string* errs)
2211{
2212 std::ostringstream ssin;
2213 ssin << sin.rdbuf();
2214 std::string doc = ssin.str();
2215 char const* begin = doc.data();
2216 char const* end = begin + doc.size();
2217 // Note that we do not actually need a null-terminator.
2218 CharReaderPtr const reader(fact.newCharReader());
2219 return reader->parse(begin, end, root, errs);
2220}
2221
2222std::istream& operator>>(std::istream& sin, Value& root) {
2223 CharReaderBuilder b;

Callers 2

jsoncpp.cppFile · 0.85
BLoadFromFileMethod · 0.85

Calls 4

dataMethod · 0.80
sizeMethod · 0.80
newCharReaderMethod · 0.80
parseMethod · 0.45

Tested by

no test coverage detected