Exemplo n.º 1
0
/**
 * Load settings for all files
 *
 * @param node 		Node representing a settings tree.
 */
Void Preferences::loadLoadedFiles( ArrayNode& node ) {
	for( Int i = 0; i < node.countChildren(); i++ ) {
		if( node[i].getType() == SETTINGS_TREE_DICTIONARY ) {
			loadFile( (DictionaryNode&) node[i] );
		}
	}
}
Exemplo n.º 2
0
/**
 * Transform a ArrayNode to a XML node.
 *
 * @param node		A settings tree node representing an array node.
 * @param parent	The parent node of the XML document.
 */
Void XmlSettingsTree::settingsTreeToXml( ArrayNode& node, TiXmlNode& parent ) {
	TiXmlElement* element = new TiXmlElement( XMLSETTINGSTREE_ARRAY_ELEMENT );
	
	for( Int i = 0; i < node.countChildren(); i++ ) {
		settingsTreeToXml( node[i], *element);
	}

	parent.LinkEndChild( element );
}