Last change
on this file since 7234 was
7234,
checked in by bensch, 18 years ago
|
orxonox/branches/preferences: merged the old preferences here… some minor conflicts, hope it works
|
File size:
1.3 KB
|
Rev | Line | |
---|
[6383] | 1 | /* |
---|
| 2 | orxonox - the future of 3D-vertical-scrollers |
---|
| 3 | |
---|
| 4 | Copyright (C) 2004 orx |
---|
| 5 | |
---|
| 6 | This program is free software; you can redistribute it and/or modify |
---|
| 7 | it under the terms of the GNU General Public License as published by |
---|
| 8 | the Free Software Foundation; either version 2, or (at your option) |
---|
| 9 | any later version. |
---|
| 10 | |
---|
| 11 | ### File Specific: |
---|
| 12 | main-programmer: Christoph Renner |
---|
| 13 | co-programmer: ... |
---|
| 14 | */ |
---|
| 15 | |
---|
| 16 | //#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_ |
---|
| 17 | |
---|
| 18 | #include "ini_file_prefs_reader.h" |
---|
| 19 | |
---|
| 20 | using namespace std; |
---|
| 21 | |
---|
| 22 | |
---|
| 23 | /** |
---|
| 24 | * standard constructor |
---|
| 25 | */ |
---|
[6388] | 26 | IniFilePrefsReader::IniFilePrefsReader ( const char * fileName ) |
---|
[6383] | 27 | { |
---|
[6388] | 28 | IniParser iniParser; |
---|
[6383] | 29 | |
---|
[6388] | 30 | if ( !iniParser.readFile( fileName ) ) |
---|
| 31 | return; |
---|
[6383] | 32 | |
---|
[6388] | 33 | Preferences* prefs = Preferences::getInstance(); |
---|
[6383] | 34 | |
---|
[6388] | 35 | iniParser.firstSection(); |
---|
[6383] | 36 | |
---|
[6388] | 37 | do |
---|
| 38 | { |
---|
| 39 | do |
---|
| 40 | { |
---|
| 41 | prefs->setString( iniParser.getCurrentSection(), iniParser.getCurrentName(), iniParser.getCurrentValue(), true ); |
---|
| 42 | } while (iniParser.nextVar()); |
---|
| 43 | } while (iniParser.nextSection()!=NULL); |
---|
[6383] | 44 | |
---|
[6388] | 45 | /*iniParser.firstVar(); |
---|
[6383] | 46 | |
---|
| 47 | Preferences* prefs = Preferences::getInstance(); |
---|
| 48 | |
---|
| 49 | while ( iniParser.nextVar() ) |
---|
| 50 | { |
---|
[6388] | 51 | prefs->setString( iniParser.getCurrentSection(), iniParser.getCurrentName(), iniParser.getCurrentValue(), true ); |
---|
| 52 | }*/ |
---|
| 53 | } |
---|
[6383] | 54 | |
---|
[6388] | 55 | |
---|
| 56 | /** |
---|
| 57 | * standard deconstructor |
---|
| 58 | */ |
---|
| 59 | IniFilePrefsReader::~IniFilePrefsReader () |
---|
| 60 | { |
---|
[6383] | 61 | } |
---|
[6388] | 62 | |
---|
| 63 | |
---|
Note: See
TracBrowser
for help on using the repository browser.