Changeset 6038 for sandbox/src/libraries/core/ConfigFileManager.cc
- Timestamp:
- Nov 5, 2009, 9:22:22 PM (15 years ago)
- Location:
- sandbox
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
sandbox
- Property svn:mergeinfo changed
-
sandbox/src/libraries/core/ConfigFileManager.cc
r5782 r6038 35 35 #include "util/StringUtils.h" 36 36 #include "ConfigValueContainer.h" 37 #include " Core.h"37 #include "PathConfig.h" 38 38 39 39 namespace orxonox … … 41 41 bool config(const std::string& classname, const std::string& varname, const std::string& value) 42 42 { 43 std::map<std::string, Identifier*>::const_iterator identifier = Identifier::getLowercase IdentifierMap().find(getLowercase(classname));44 if (identifier != Identifier::getLowercase IdentifierMapEnd())43 std::map<std::string, Identifier*>::const_iterator identifier = Identifier::getLowercaseStringIdentifierMap().find(getLowercase(classname)); 44 if (identifier != Identifier::getLowercaseStringIdentifierMapEnd()) 45 45 { 46 46 std::map<std::string, ConfigValueContainer*>::const_iterator variable = (*identifier).second->getLowercaseConfigValueMap().find(getLowercase(varname)); … … 53 53 bool tconfig(const std::string& classname, const std::string& varname, const std::string& value) 54 54 { 55 std::map<std::string, Identifier*>::const_iterator identifier = Identifier::getLowercase IdentifierMap().find(getLowercase(classname));56 if (identifier != Identifier::getLowercase IdentifierMapEnd())55 std::map<std::string, Identifier*>::const_iterator identifier = Identifier::getLowercaseStringIdentifierMap().find(getLowercase(classname)); 56 if (identifier != Identifier::getLowercaseStringIdentifierMapEnd()) 57 57 { 58 58 std::map<std::string, ConfigValueContainer*>::const_iterator variable = (*identifier).second->getLowercaseConfigValueMap().find(getLowercase(varname)); … … 215 215 216 216 // Get default file if necessary and available 217 boost::filesystem::path filepath( Core::getConfigPath() / this->filename_);217 boost::filesystem::path filepath(PathConfig::getConfigPath() / this->filename_); 218 218 if (!boost::filesystem::exists(filepath)) 219 219 { 220 220 // Try to get default one from the data folder 221 boost::filesystem::path defaultFilepath( Core::getDataPath() / "defaultConfig" / this->filename_);221 boost::filesystem::path defaultFilepath(PathConfig::getDataPath() / "defaultConfig" / this->filename_); 222 222 if (boost::filesystem::exists(defaultFilepath)) 223 223 { … … 329 329 { 330 330 std::ofstream file; 331 file.open(( Core::getConfigPathString() + filename_).c_str(), std::fstream::out);331 file.open((PathConfig::getConfigPathString() + filename_).c_str(), std::fstream::out); 332 332 file.setf(std::ios::fixed, std::ios::floatfield); 333 333 file.precision(6); … … 369 369 for (std::list<ConfigFileSection*>::iterator it1 = this->sections_.begin(); it1 != this->sections_.end(); ) 370 370 { 371 std::map<std::string, Identifier*>::const_iterator it2 = Identifier::get IdentifierMap().find((*it1)->getName());372 if (it2 != Identifier::get IdentifierMapEnd() && (*it2).second->hasConfigValues())371 std::map<std::string, Identifier*>::const_iterator it2 = Identifier::getStringIdentifierMap().find((*it1)->getName()); 372 if (it2 != Identifier::getStringIdentifierMapEnd() && (*it2).second->hasConfigValues()) 373 373 { 374 374 // The section exists, delete comment … … 448 448 if (this->type_ == ConfigFileType::Settings) 449 449 { 450 for (std::map<std::string, Identifier*>::const_iterator it = Identifier::get IdentifierMapBegin(); it != Identifier::getIdentifierMapEnd(); ++it)450 for (std::map<std::string, Identifier*>::const_iterator it = Identifier::getStringIdentifierMapBegin(); it != Identifier::getStringIdentifierMapEnd(); ++it) 451 451 { 452 452 if (it->second->hasConfigValues())
Note: See TracChangeset
for help on using the changeset viewer.