MCPcopy Create free account
hub / github.com/baldurk/renderdoc / importXMLConfig

Function importXMLConfig

renderdoc/core/settings.cpp:244–268  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

242}
243
244static SDObject *importXMLConfig(StreamReader &stream)
245{
246 rdcstr buf;
247 buf.resize((size_t)stream.GetSize());
248 stream.Read(buf.data(), buf.size());
249
250 pugi::xml_document doc;
251 doc.load_string(buf.c_str(), pugi::parse_default | pugi::parse_comments);
252
253 pugi::xml_node root = doc.child("config");
254
255 SDObject *ret = new SDObject("config"_lit, "config"_lit);
256
257 if(root)
258 {
259 for(pugi::xml_node child = root.first_child(); child; child = child.next_sibling())
260 {
261 SDObject *childObj = XML2Config(child);
262 if(childObj)
263 ret->AddAndOwnChild(XML2Config(child));
264 }
265 }
266
267 return ret;
268}
269
270static void exportXMLConfig(StreamWriter &stream, const SDObject *obj)
271{

Callers 1

ProcessConfigMethod · 0.85

Calls 11

XML2ConfigFunction · 0.85
load_stringMethod · 0.80
first_childMethod · 0.80
next_siblingMethod · 0.80
resizeMethod · 0.45
GetSizeMethod · 0.45
ReadMethod · 0.45
dataMethod · 0.45
sizeMethod · 0.45
c_strMethod · 0.45
childMethod · 0.45

Tested by

no test coverage detected