Changeset 9880 in orxonox.OLD for trunk/src/lib/parser/preferences
- Timestamp:
- Oct 10, 2006, 3:42:31 PM (18 years ago)
- Location:
- trunk/src/lib/parser/preferences
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/parser/preferences/ini_file_prefs_reader.cc
r9406 r9880 28 28 IniParser iniParser; 29 29 30 30 31 31 Preferences* prefs = Preferences::getInstance(); 32 32 33 33 prefs->setUserIni( fileName ); 34 34 35 35 if ( !iniParser.readFile( fileName ) ) 36 36 return; 37 37 38 iniParser.firstSection(); 39 40 do 41 { 42 do 43 { 44 prefs->setString( iniParser.getCurrentSection(), iniParser.getCurrentName(), iniParser.getCurrentValue(), true ); 45 } while (iniParser.nextVar()); 46 } while ( iniParser.nextSection() != "" ); 38 for(IniParser::Section::iterator section = iniParser.begin(); 39 section != iniParser.end(); 40 ++section) 41 for (IniParser::Entry::iterator entry = (*section).begin(); 42 entry != (*section).end(); 43 ++entry) 44 prefs->setString( (*section).name(), (*entry).name(), (*entry).value(), true ); 47 45 48 46 /*iniParser.firstVar(); … … 53 51 { 54 52 prefs->setString( iniParser.getCurrentSection(), iniParser.getCurrentName(), iniParser.getCurrentValue(), true ); 55 }*/53 }*/ 56 54 } 57 55 … … 61 59 */ 62 60 IniFilePrefsReader::~IniFilePrefsReader () 63 { 64 } 61 {} 65 62 66 63 -
trunk/src/lib/parser/preferences/ini_file_prefs_reader.h
r9869 r9880 8 8 9 9 #include "lib/parser/ini_parser/ini_parser.h" 10 #include " lib/parser/preferences/preferences.h"10 #include "preferences.h" 11 11 12 12 -
trunk/src/lib/parser/preferences/preferences.cc
r9869 r9880 271 271 if ( it2->modified ) 272 272 { 273 iniParser.editVar(it2->name, it2->value.getString(), it->sectionName);273 iniParser.editEntry(it->sectionName, it2->name, it2->value.getString()); 274 274 didChanges = true; 275 275 }
Note: See TracChangeset
for help on using the changeset viewer.