- Timestamp:
- Dec 22, 2009, 2:07:44 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/presentation2/src/libraries/core/ConfigFileManager.h
r6374 r6394 89 89 { 90 90 public: 91 inline ConfigFileEntryValue(const std::string& name, const std::string& value = "", bool bString = false, const std::string& additionalComment = "") : name_(name), value_(value), bString_(bString), additionalComment_(additionalComment) {} 91 inline ConfigFileEntryValue(const std::string& name, const std::string& value = "", bool bString = false, const std::string& additionalComment = "") 92 : name_(name) 93 , value_(value) 94 , bString_(bString) 95 , additionalComment_(additionalComment) 96 {} 92 97 inline virtual ~ConfigFileEntryValue() {} 93 98 … … 173 178 174 179 public: 175 inline ConfigFileSection(const std::string& name, const std::string& additionalComment = "") : name_(name), additionalComment_(additionalComment), bUpdated_(false) {} 180 inline ConfigFileSection(const std::string& name, const std::string& additionalComment = "") 181 : name_(name) 182 , additionalComment_(additionalComment) 183 , bUpdated_(false) 184 {} 176 185 ~ConfigFileSection(); 177 186 … … 244 253 { this->getSection(section)->setValue(name, value, bString); this->save(); } 245 254 inline std::string getValue(const std::string& section, const std::string& name, const std::string& fallback, bool bString) 246 { std::stringoutput = this->getSection(section)->getValue(name, fallback, bString); this->saveIfUpdated(); return output; }255 { const std::string& output = this->getSection(section)->getValue(name, fallback, bString); this->saveIfUpdated(); return output; } 247 256 248 257 inline void setValue(const std::string& section, const std::string& name, unsigned int index, const std::string& value, bool bString) 249 258 { this->getSection(section)->setValue(name, index, value, bString); this->save(); } 250 259 inline std::string getValue(const std::string& section, const std::string& name, unsigned int index, const std::string& fallback, bool bString) 251 { std::stringoutput = this->getSection(section)->getValue(name, index, fallback, bString); this->saveIfUpdated(); return output; }260 { const std::string& output = this->getSection(section)->getValue(name, index, fallback, bString); this->saveIfUpdated(); return output; } 252 261 253 262 inline void deleteVectorEntries(const std::string& section, const std::string& name, unsigned int startindex = 0)
Note: See TracChangeset
for help on using the changeset viewer.