Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7236 in orxonox.OLD for branches/preferences/src/lib/util


Ignore:
Timestamp:
Mar 21, 2006, 4:13:56 PM (19 years ago)
Author:
rennerc
Message:

converted char* in preferences to std::string

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/preferences/src/lib/util/preferences.h

    r7234 r7236  
    1616
    1717typedef struct {
    18   char* name;
     18  std::string name;
    1919  MultiType value;
    2020  bool modified;
     
    2222
    2323typedef struct {
    24   char* sectionName;
     24  std::string sectionName;
    2525  std::list<prefItem> items;
    2626} prefSection ;
     
    3636
    3737   //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);
    3939
    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);
    4444
    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);
    4949
    50    void setUserIni(const char* fileName);
     50   void setUserIni(const std::string& fileName);
    5151
    5252   bool save();
     
    6464   std::list<IniFilePrefsReader*> iniFilePrefsReaders;
    6565
    66    char* fileName;
     66   std::string& fileName;
    6767
    6868};
Note: See TracChangeset for help on using the changeset viewer.