Changeset 7236 in orxonox.OLD for branches/preferences/src/lib/util
- Timestamp:
- Mar 21, 2006, 4:13:56 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/preferences/src/lib/util/preferences.h
r7234 r7236 16 16 17 17 typedef struct { 18 char*name;18 std::string name; 19 19 MultiType value; 20 20 bool modified; … … 22 22 23 23 typedef struct { 24 char*sectionName;24 std::string sectionName; 25 25 std::list<prefItem> items; 26 26 } prefSection ; … … 36 36 37 37 //check if this entry exists 38 bool exists(const char* section, const char*name);38 bool exists(const std::string& section, const std::string& name); 39 39 40 void setString(const char* section, const char* name, const char*value, bool dontSetModified = false);41 void setInt(const char* section, const char*name, int value, bool dontSetModified = false);42 void setFloat(const char* section, const char*name, float value, bool dontSetModified = false);43 void setMultiType(const char* section, const char*name, MultiType& value, bool dontSetModified = false);40 void setString(const std::string& section, const std::string& name, const std::string& value, bool dontSetModified = false); 41 void setInt(const std::string& section, const std::string& name, int value, bool dontSetModified = false); 42 void setFloat(const std::string& section, const std::string& name, float value, bool dontSetModified = false); 43 void setMultiType(const std::string& section, const std::string& name, MultiType& value, bool dontSetModified = false); 44 44 45 const char* getString(const char* section, const char* name, const char*defaultValue);46 int getInt(const char* section, const char*name, int defaultValue);47 float getFloat(const char* section, const char*name, float defaultValue);48 MultiType getMultiType(const char* section, const char*name, const MultiType& defaultValue);45 const std::string getString(const std::string& section, const std::string& name, const std::string& defaultValue); 46 int getInt(const std::string& section, const std::string& name, int defaultValue); 47 float getFloat(const std::string& section, const std::string& name, float defaultValue); 48 MultiType getMultiType(const std::string& section, const std::string& name, const MultiType& defaultValue); 49 49 50 void setUserIni(const char*fileName);50 void setUserIni(const std::string& fileName); 51 51 52 52 bool save(); … … 64 64 std::list<IniFilePrefsReader*> iniFilePrefsReaders; 65 65 66 char*fileName;66 std::string& fileName; 67 67 68 68 };
Note: See TracChangeset
for help on using the changeset viewer.