| 612 | } |
| 613 | |
| 614 | void SettingSaveNode::buildDocument(SimXMLDocument *document, bool skipWrite) |
| 615 | { |
| 616 | // let's build our XML doc |
| 617 | if(mIsGroup && !skipWrite) |
| 618 | { |
| 619 | document->pushNewElement("Group"); |
| 620 | document->setAttribute("name", mName); |
| 621 | } |
| 622 | |
| 623 | if(!mIsGroup && !skipWrite) |
| 624 | { |
| 625 | document->pushNewElement("Setting"); |
| 626 | document->setAttribute("name", mName); |
| 627 | document->addText(mValue); |
| 628 | } else |
| 629 | { |
| 630 | for(S32 i=0; i<mSettingNodes.size(); i++) |
| 631 | { |
| 632 | SettingSaveNode *node = mSettingNodes[i]; |
| 633 | node->buildDocument(document); |
| 634 | } |
| 635 | |
| 636 | for(S32 i=0; i<mGroupNodes.size(); i++) |
| 637 | { |
| 638 | SettingSaveNode *node = mGroupNodes[i]; |
| 639 | node->buildDocument(document); |
| 640 | } |
| 641 | } |
| 642 | |
| 643 | if(!skipWrite) |
| 644 | document->popElement(); |
| 645 | } |
| 646 | |
| 647 | DefineConsoleMethod(Settings, setValue, void, (const char * settingName, const char * value), (""), "settingObj.setValue(settingName, value);") |
| 648 | { |
no test coverage detected