Changeset 5929 for code/trunk/src/libraries/core/ConfigFileManager.cc
- Timestamp:
- Oct 12, 2009, 8:20:07 PM (15 years ago)
- Location:
- code/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk
- Property svn:mergeinfo changed
/code/branches/core5 (added) merged: 5768-5769,5772,5775-5780,5783-5785,5791-5792,5795-5807,5809-5814,5816-5832,5836-5839,5842-5853,5855-5899,5904-5922,5924-5928
- Property svn:mergeinfo changed
-
code/trunk/src/libraries/core/ConfigFileManager.cc
r5781 r5929 36 36 #include "ConsoleCommand.h" 37 37 #include "ConfigValueContainer.h" 38 #include " Core.h"38 #include "PathConfig.h" 39 39 40 40 namespace orxonox … … 48 48 bool config(const std::string& classname, const std::string& varname, const std::string& value) 49 49 { 50 std::map<std::string, Identifier*>::const_iterator identifier = Identifier::getLowercase IdentifierMap().find(getLowercase(classname));51 if (identifier != Identifier::getLowercase IdentifierMapEnd())50 std::map<std::string, Identifier*>::const_iterator identifier = Identifier::getLowercaseStringIdentifierMap().find(getLowercase(classname)); 51 if (identifier != Identifier::getLowercaseStringIdentifierMapEnd()) 52 52 { 53 53 std::map<std::string, ConfigValueContainer*>::const_iterator variable = (*identifier).second->getLowercaseConfigValueMap().find(getLowercase(varname)); … … 60 60 bool tconfig(const std::string& classname, const std::string& varname, const std::string& value) 61 61 { 62 std::map<std::string, Identifier*>::const_iterator identifier = Identifier::getLowercase IdentifierMap().find(getLowercase(classname));63 if (identifier != Identifier::getLowercase IdentifierMapEnd())62 std::map<std::string, Identifier*>::const_iterator identifier = Identifier::getLowercaseStringIdentifierMap().find(getLowercase(classname)); 63 if (identifier != Identifier::getLowercaseStringIdentifierMapEnd()) 64 64 { 65 65 std::map<std::string, ConfigValueContainer*>::const_iterator variable = (*identifier).second->getLowercaseConfigValueMap().find(getLowercase(varname)); … … 222 222 223 223 // Get default file if necessary and available 224 boost::filesystem::path filepath( Core::getConfigPath() / this->filename_);224 boost::filesystem::path filepath(PathConfig::getConfigPath() / this->filename_); 225 225 if (!boost::filesystem::exists(filepath)) 226 226 { 227 227 // Try to get default one from the data folder 228 boost::filesystem::path defaultFilepath( Core::getDataPath() / "defaultConfig" / this->filename_);228 boost::filesystem::path defaultFilepath(PathConfig::getDataPath() / "defaultConfig" / this->filename_); 229 229 if (boost::filesystem::exists(defaultFilepath)) 230 230 { … … 336 336 { 337 337 std::ofstream file; 338 file.open(( Core::getConfigPathString() + filename_).c_str(), std::fstream::out);338 file.open((PathConfig::getConfigPathString() + filename_).c_str(), std::fstream::out); 339 339 file.setf(std::ios::fixed, std::ios::floatfield); 340 340 file.precision(6); … … 376 376 for (std::list<ConfigFileSection*>::iterator it1 = this->sections_.begin(); it1 != this->sections_.end(); ) 377 377 { 378 std::map<std::string, Identifier*>::const_iterator it2 = Identifier::get IdentifierMap().find((*it1)->getName());379 if (it2 != Identifier::get IdentifierMapEnd() && (*it2).second->hasConfigValues())378 std::map<std::string, Identifier*>::const_iterator it2 = Identifier::getStringIdentifierMap().find((*it1)->getName()); 379 if (it2 != Identifier::getStringIdentifierMapEnd() && (*it2).second->hasConfigValues()) 380 380 { 381 381 // The section exists, delete comment … … 455 455 if (this->type_ == ConfigFileType::Settings) 456 456 { 457 for (std::map<std::string, Identifier*>::const_iterator it = Identifier::get IdentifierMapBegin(); it != Identifier::getIdentifierMapEnd(); ++it)457 for (std::map<std::string, Identifier*>::const_iterator it = Identifier::getStringIdentifierMapBegin(); it != Identifier::getStringIdentifierMapEnd(); ++it) 458 458 { 459 459 if (it->second->hasConfigValues())
Note: See TracChangeset
for help on using the changeset viewer.