Changeset 1434 for code/branches/console/src/core/ConfigFileManager.cc
- Timestamp:
- May 27, 2008, 12:27:13 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/console/src/core/ConfigFileManager.cc
r1341 r1434 38 38 namespace orxonox 39 39 { 40 SetConsoleCommandShortcutExtern(config).setArgumentCompleter(0, autocompletion::configvalueclasses()).setArgumentCompleter(1, autocompletion::configvalues()).setArgumentCompleter(2, autocompletion::configvalue()); 41 SetConsoleCommandShortcutExtern(tconfig); 40 42 SetConsoleCommandShortcutExtern(reloadConfig); 41 43 SetConsoleCommandShortcutExtern(cleanConfig); 42 44 SetConsoleCommandShortcutExtern(loadSettings); 43 45 SetConsoleCommandShortcutExtern(loadKeybindings); 46 47 bool config(const std::string& classname, const std::string& varname, const std::string& value) 48 { 49 std::cout << "10a_1\n"; 50 std::map<std::string, Identifier*>::const_iterator identifier = Identifier::getLowercaseIdentifierMap().find(getLowercase(classname)); 51 if (identifier != Identifier::getLowercaseIdentifierMapEnd()) 52 { 53 std::cout << "10a_2\n"; 54 std::map<std::string, ConfigValueContainer*>::const_iterator variable = (*identifier).second->getLowercaseConfigValueMap().find(getLowercase(varname)); 55 if (variable != (*identifier).second->getLowercaseConfigValueMapEnd()) 56 { 57 std::cout << "10a_3\n"; 58 return (*variable).second->tset(value); 59 } 60 } 61 return false; 62 } 63 64 bool tconfig(const std::string& classname, const std::string& varname, const std::string& value) 65 { 66 std::cout << "10b_1\n"; 67 std::map<std::string, Identifier*>::const_iterator identifier = Identifier::getLowercaseIdentifierMap().find(getLowercase(classname)); 68 if (identifier != Identifier::getLowercaseIdentifierMapEnd()) 69 { 70 std::cout << "10b_2\n"; 71 std::map<std::string, ConfigValueContainer*>::const_iterator variable = (*identifier).second->getLowercaseConfigValueMap().find(getLowercase(varname)); 72 if (variable != (*identifier).second->getLowercaseConfigValueMapEnd()) 73 { 74 std::cout << "10b_3\n"; 75 return (*variable).second->tset(value); 76 } 77 } 78 return false; 79 } 44 80 45 81 void reloadConfig()
Note: See TracChangeset
for help on using the changeset viewer.