| 286 | } |
| 287 | |
| 288 | void 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 | |
| 320 | void Settings::beginGroup(const UTF8 *groupName, bool fromStart) |
| 321 | { |
nothing calls this directly
no test coverage detected