MCPcopy Create free account
hub / github.com/GarageGames/Torque3D / readLayer

Method readLayer

Engine/source/util/settings.cpp:288–318  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

286}
287
288void Settings::readLayer(SimXMLDocument *document, String groupStack)
289{
290 for(S32 i=0; document->pushChildElement(i); i++)
291 {
292 const UTF8 *type = document->elementValue();
293 const UTF8 *name = document->attribute("name");
294 const UTF8 *value = document->getText();
295
296 if(dStrcmp(type, "Group") == 0)
297 {
298 String newStack = groupStack;
299
300 if(!groupStack.isEmpty())
301 newStack += "/";
302
303 newStack += name;
304 readLayer(document, newStack);
305 } else if(dStrcmp(type, "Setting") == 0)
306 {
307 String nameString = groupStack;
308
309 if(!groupStack.isEmpty())
310 nameString += "/";
311
312 nameString += name;
313 setDataField(StringTable->insert(nameString.c_str()), NULL, value);
314 }
315
316 document->popElement();
317 }
318}
319
320void Settings::beginGroup(const UTF8 *groupName, bool fromStart)
321{

Callers

nothing calls this directly

Calls 9

pushChildElementMethod · 0.80
elementValueMethod · 0.80
attributeMethod · 0.80
popElementMethod · 0.80
dStrcmpFunction · 0.50
getTextMethod · 0.45
isEmptyMethod · 0.45
insertMethod · 0.45
c_strMethod · 0.45

Tested by

no test coverage detected