Changeset 1658 for code/branches/core3
- Timestamp:
- Aug 14, 2008, 8:52:04 PM (16 years ago)
- Location:
- code/branches/core3
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/core3/src/core/ConfigFileManager.cc
r1594 r1658 71 71 void reloadConfig() 72 72 { 73 ConfigFileManager::get Singleton()->load();73 ConfigFileManager::getInstance()->load(); 74 74 } 75 75 76 76 void cleanConfig() 77 77 { 78 ConfigFileManager::get Singleton()->clean(false);78 ConfigFileManager::getInstance()->clean(false); 79 79 } 80 80 81 81 void loadSettings(const std::string& filename) 82 82 { 83 ConfigFileManager::get Singleton()->setFile(CFT_Settings, filename, false);83 ConfigFileManager::getInstance()->setFile(CFT_Settings, filename, false); 84 84 } 85 85 86 86 void loadKeybindings(const std::string& filename) 87 87 { 88 ConfigFileManager::get Singleton()->setFile(CFT_Keybindings, filename);88 ConfigFileManager::getInstance()->setFile(CFT_Keybindings, filename); 89 89 } 90 90 … … 459 459 } 460 460 461 ConfigFileManager* ConfigFileManager::get Singleton()461 ConfigFileManager* ConfigFileManager::getInstance() 462 462 { 463 463 static ConfigFileManager instance; -
code/branches/core3/src/core/ConfigFileManager.h
r1505 r1658 258 258 { 259 259 public: 260 static ConfigFileManager* get Singleton();260 static ConfigFileManager* getInstance(); 261 261 262 262 void setFile(ConfigFileType type, const std::string& filename, bool bCreateIfNotExisting = true); -
code/branches/core3/src/core/ConfigValueContainer.cc
r1611 r1658 82 82 for (unsigned int i = 0; i < this->valueVector_.size(); i++) 83 83 { 84 ConfigFileManager::get Singleton()->getValue(this->type_, this->sectionname_, this->varname_, i, this->valueVector_[i].toString(), this->value_.isA(MT_string));84 ConfigFileManager::getInstance()->getValue(this->type_, this->sectionname_, this->varname_, i, this->valueVector_[i].toString(), this->value_.isA(MT_string)); 85 85 this->defvalueStringVector_.push_back(this->valueVector_[i].toString()); 86 86 } … … 113 113 if (this->tset(input)) 114 114 { 115 ConfigFileManager::get Singleton()->setValue(this->type_, this->sectionname_, this->varname_, input.toString(), this->value_.isA(MT_string));115 ConfigFileManager::getInstance()->setValue(this->type_, this->sectionname_, this->varname_, input.toString(), this->value_.isA(MT_string)); 116 116 return true; 117 117 } … … 132 132 if (this->tset(index, input)) 133 133 { 134 ConfigFileManager::get Singleton()->setValue(this->type_, this->sectionname_, this->varname_, index, input.toString(), this->value_.isA(MT_string));134 ConfigFileManager::getInstance()->setValue(this->type_, this->sectionname_, this->varname_, index, input.toString(), this->value_.isA(MT_string)); 135 135 return true; 136 136 } … … 239 239 this->valueVector_.erase(this->valueVector_.begin() + index); 240 240 for (unsigned int i = index; i < this->valueVector_.size(); i++) 241 ConfigFileManager::get Singleton()->setValue(this->type_, this->sectionname_, this->varname_, i, this->valueVector_[i], this->value_.isA(MT_string));242 ConfigFileManager::get Singleton()->deleteVectorEntries(this->type_, this->sectionname_, this->varname_, this->valueVector_.size());241 ConfigFileManager::getInstance()->setValue(this->type_, this->sectionname_, this->varname_, i, this->valueVector_[i], this->value_.isA(MT_string)); 242 ConfigFileManager::getInstance()->deleteVectorEntries(this->type_, this->sectionname_, this->varname_, this->valueVector_.size()); 243 243 244 244 return true; … … 264 264 if (!this->set(i, this->defvalueStringVector_[i])) 265 265 success = false; 266 ConfigFileManager::get Singleton()->deleteVectorEntries(this->type_, this->sectionname_, this->varname_, this->defvalueStringVector_.size());266 ConfigFileManager::getInstance()->deleteVectorEntries(this->type_, this->sectionname_, this->varname_, this->defvalueStringVector_.size()); 267 267 return success; 268 268 } … … 275 275 { 276 276 if (!this->bIsVector_) 277 this->value_.fromString(ConfigFileManager::get Singleton()->getValue(this->type_, this->sectionname_, this->varname_, this->defvalueString_, this->value_.isA(MT_string)));277 this->value_.fromString(ConfigFileManager::getInstance()->getValue(this->type_, this->sectionname_, this->varname_, this->defvalueString_, this->value_.isA(MT_string))); 278 278 else 279 279 { 280 280 this->valueVector_.clear(); 281 for (unsigned int i = 0; i < ConfigFileManager::get Singleton()->getVectorSize(this->type_, this->sectionname_, this->varname_); i++)281 for (unsigned int i = 0; i < ConfigFileManager::getInstance()->getVectorSize(this->type_, this->sectionname_, this->varname_); i++) 282 282 { 283 283 if (i < this->defvalueStringVector_.size()) 284 284 { 285 this->value_.fromString(ConfigFileManager::get Singleton()->getValue(this->type_, this->sectionname_, this->varname_, i, this->defvalueStringVector_[i], this->value_.isA(MT_string)));285 this->value_.fromString(ConfigFileManager::getInstance()->getValue(this->type_, this->sectionname_, this->varname_, i, this->defvalueStringVector_[i], this->value_.isA(MT_string))); 286 286 } 287 287 else 288 288 { 289 this->value_.fromString(ConfigFileManager::get Singleton()->getValue(this->type_, this->sectionname_, this->varname_, i, MultiTypeMath(), this->value_.isA(MT_string)));289 this->value_.fromString(ConfigFileManager::getInstance()->getValue(this->type_, this->sectionname_, this->varname_, i, MultiTypeMath(), this->value_.isA(MT_string))); 290 290 } 291 291 -
code/branches/core3/src/core/input/KeyBinder.cc
r1611 r1658 216 216 if (!infile) 217 217 { 218 ConfigFileManager::get Singleton()->setFile(CFT_Keybindings, "def_keybindings.ini");219 ConfigFileManager::get Singleton()->save(CFT_Keybindings, "keybindings.ini");218 ConfigFileManager::getInstance()->setFile(CFT_Keybindings, "def_keybindings.ini"); 219 ConfigFileManager::getInstance()->save(CFT_Keybindings, "keybindings.ini"); 220 220 } 221 221 else 222 222 infile.close(); 223 ConfigFileManager::get Singleton()->setFile(CFT_Keybindings, "keybindings.ini");223 ConfigFileManager::getInstance()->setFile(CFT_Keybindings, "keybindings.ini"); 224 224 225 225 // parse key bindings -
code/branches/core3/src/orxonox/Orxonox.cc
r1594 r1658 184 184 { 185 185 #ifdef _DEBUG 186 ConfigFileManager::get Singleton()->setFile(CFT_Settings, "orxonox_d.ini");186 ConfigFileManager::getInstance()->setFile(CFT_Settings, "orxonox_d.ini"); 187 187 #else 188 ConfigFileManager::get Singleton()->setFile(CFT_Settings, "orxonox.ini");188 ConfigFileManager::getInstance()->setFile(CFT_Settings, "orxonox.ini"); 189 189 #endif 190 190 Factory::createClassHierarchy(); -
code/branches/core3/visual_studio/base_properties.vsprops
r1572 r1658 8 8 <Tool 9 9 Name="VCCLCompilerTool" 10 AdditionalIncludeDirectories=""$(RootDir)";"$(RootDir)src";"$(RootDir)src\orxonox";"$(RootDir)src\tolua";"$(RootDir)src\ois";"$(LibDir)ogre-1.4. 8\OgreMain\include";"$(LibDir)boost-1.35.0";"$(LibDir)enet-1.2\include";"$(LibDir)libogg-1.1.3\include";"$(LibDir)libvorbis-1.2.0\include";"$(LibDir)lua-5.1.3\src";"$(LibDir)openal-1.1\include";"$(LibDir)openal-1.1\alut\include";"$(LibDir)tcl-8.5.\generic";"$(LibDir)zlib-1.2.3""10 AdditionalIncludeDirectories=""$(RootDir)";"$(RootDir)src";"$(RootDir)src\orxonox";"$(RootDir)src\tolua";"$(RootDir)src\ois";"$(LibDir)ogre-1.4.9\OgreMain\include";"$(LibDir)boost-1.35.0";"$(LibDir)enet-1.2\include";"$(LibDir)libogg-1.1.3\include";"$(LibDir)libvorbis-1.2.0\include";"$(LibDir)lua-5.1.3\src";"$(LibDir)openal-1.1\include";"$(LibDir)openal-1.1\alut\include";"$(LibDir)tcl-8.5.\generic";"$(LibDir)zlib-1.2.3"" 11 11 PreprocessorDefinitions="WIN32;__WIN32__;_WIN32;BOOST_ALL_DYN_LINK;OIS_DYNAMIC_LIB; ZLIB_WINAPI" 12 12 WarningLevel="3"
Note: See TracChangeset
for help on using the changeset viewer.