Changeset 949 for code/branches/core2
- Timestamp:
- Mar 29, 2008, 2:30:10 AM (17 years ago)
- Location:
- code/branches/core2/src/orxonox/core
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/core2/src/orxonox/core/CommandExecutor.cc
r948 r949 29 29 #include "ConsoleCommand.h" 30 30 #include "util/String.h" 31 #include "util/SubString.h"32 31 #include "Identifier.h" 33 32 #include "Language.h" … … 46 45 ConsoleCommandShortcutGeneric(keyword3, createExecutor((FunctorStatic*)0, "bind", AccessLevel::User)); 47 46 48 SubString CommandExecutor::tokens_s; 49 std::string CommandExecutor::lastProcessedCommand_s; 50 51 std::list<const std::string*> CommandExecutor::listOfPossibleFunctionClasses_s; 52 std::list<const std::string*> CommandExecutor::listOfPossibleShortcuts_s; 53 std::list<const std::string*> CommandExecutor::listOfPossibleFunctions_s; 54 std::list<const std::string*> CommandExecutor::listOfPossibleConfigValueClasses_s; 55 std::list<const std::string*> CommandExecutor::listOfPossibleConfigValues_s; 56 std::list<const std::string*> CommandExecutor::listOfPossibleKeys_s; 57 58 Identifier* CommandExecutor::functionclass_s; 59 Identifier* CommandExecutor::configvalueclass_s; 60 ExecutorStatic* CommandExecutor::shortcut_s; 61 ExecutorStatic* CommandExecutor::function_s; 62 ConfigValueContainer* CommandExecutor::configvalue_s; 63 ConfigValueContainer* CommandExecutor::key_s; 64 65 std::string CommandExecutor::errorMessage_s; 66 CommandExecutor::CommandState CommandExecutor::state_s; 67 68 std::map<std::string, ExecutorStatic*> CommandExecutor::consoleCommandShortcuts_s; 69 std::map<std::string, ExecutorStatic*> CommandExecutor::consoleCommandShortcuts_LC_s; 47 CommandExecutor& CommandExecutor::getInstance() 48 { 49 static CommandExecutor instance; 50 return instance; 51 } 70 52 71 53 bool CommandExecutor::addConsoleCommandShortcut(ExecutorStatic* executor) 72 54 { 73 CommandExecutor:: consoleCommandShortcuts_s[executor->getName()] = executor;74 CommandExecutor:: consoleCommandShortcuts_LC_s[getLowercase(executor->getName())] = executor;55 CommandExecutor::getInstance().consoleCommandShortcuts_s[executor->getName()] = executor; 56 CommandExecutor::getInstance().consoleCommandShortcuts_LC_s[getLowercase(executor->getName())] = executor; 75 57 return true; 76 58 } … … 83 65 ExecutorStatic* CommandExecutor::getConsoleCommandShortcut(const std::string& name) 84 66 { 85 std::map<std::string, ExecutorStatic*>::const_iterator it = CommandExecutor:: consoleCommandShortcuts_s.find(name);86 if (it != CommandExecutor:: consoleCommandShortcuts_s.end())67 std::map<std::string, ExecutorStatic*>::const_iterator it = CommandExecutor::getInstance().consoleCommandShortcuts_s.find(name); 68 if (it != CommandExecutor::getInstance().consoleCommandShortcuts_s.end()) 87 69 return (*it).second; 88 70 else … … 97 79 ExecutorStatic* CommandExecutor::getLowercaseConsoleCommandShortcut(const std::string& name) 98 80 { 99 std::map<std::string, ExecutorStatic*>::const_iterator it = CommandExecutor:: consoleCommandShortcuts_LC_s.find(name);100 if (it != CommandExecutor:: consoleCommandShortcuts_LC_s.end())81 std::map<std::string, ExecutorStatic*>::const_iterator it = CommandExecutor::getInstance().consoleCommandShortcuts_LC_s.find(name); 82 if (it != CommandExecutor::getInstance().consoleCommandShortcuts_LC_s.end()) 101 83 return (*it).second; 102 84 else … … 106 88 bool CommandExecutor::execute(const std::string& command) 107 89 { 108 if (CommandExecutor:: lastProcessedCommand_s != command)90 if (CommandExecutor::getInstance().lastProcessedCommand_s != command) 109 91 CommandExecutor::parse(command); 110 92 111 CommandExecutor:: tokens_s.split(command, " ", SubString::WhiteSpaces, false, '\\', '"', '(', ')', '\0');112 113 switch (CommandExecutor:: state_s)93 CommandExecutor::getInstance().tokens_s.split(command, " ", SubString::WhiteSpaces, false, '\\', '"', '(', ')', '\0'); 94 95 switch (CommandExecutor::getInstance().state_s) 114 96 { 115 97 case CS_Empty: … … 122 104 case CS_Shortcut_Finished: 123 105 // call the shortcut 124 if (CommandExecutor:: shortcut_s != 0)125 return CommandExecutor:: shortcut_s->parse(CommandExecutor::tokens_s.subSet(1).join());106 if (CommandExecutor::getInstance().shortcut_s != 0) 107 return CommandExecutor::getInstance().shortcut_s->parse(CommandExecutor::getInstance().tokens_s.subSet(1).join()); 126 108 break; 127 109 case CS_Function: … … 132 114 case CS_Function_Finished: 133 115 // call the shortcut 134 if (CommandExecutor:: function_s != 0)135 return CommandExecutor:: function_s->parse(CommandExecutor::tokens_s.subSet(2).join());116 if (CommandExecutor::getInstance().function_s != 0) 117 return CommandExecutor::getInstance().function_s->parse(CommandExecutor::getInstance().tokens_s.subSet(2).join()); 136 118 break; 137 119 case CS_ConfigValueClass: … … 144 126 case CS_ConfigValueFinished: 145 127 // set the config value 146 if (CommandExecutor:: configvalue_s != 0)147 return CommandExecutor:: configvalue_s->parseString(CommandExecutor::tokens_s.subSet(3).join());128 if (CommandExecutor::getInstance().configvalue_s != 0) 129 return CommandExecutor::getInstance().configvalue_s->parseString(CommandExecutor::getInstance().tokens_s.subSet(3).join()); 148 130 break; 149 131 case CS_KeybindKey: … … 165 147 std::string CommandExecutor::complete(const std::string& command) 166 148 { 167 if (CommandExecutor:: lastProcessedCommand_s != command)149 if (CommandExecutor::getInstance().lastProcessedCommand_s != command) 168 150 CommandExecutor::parse(command); 169 151 170 CommandExecutor:: tokens_s.split(command, " ", SubString::WhiteSpaces, false, '\\', '"', '(', ')', '\0');152 CommandExecutor::getInstance().tokens_s.split(command, " ", SubString::WhiteSpaces, false, '\\', '"', '(', ')', '\0'); 171 153 172 154 std::list<const std::string*> temp; 173 if (CommandExecutor:: state_s == CS_Empty)174 { 175 temp.insert(temp.end(), CommandExecutor:: listOfPossibleShortcuts_s.begin(), CommandExecutor::listOfPossibleShortcuts_s.end());176 temp.insert(temp.end(), CommandExecutor:: listOfPossibleFunctionClasses_s.begin(), CommandExecutor::listOfPossibleFunctionClasses_s.end());177 } 178 179 switch (CommandExecutor:: state_s)155 if (CommandExecutor::getInstance().state_s == CS_Empty) 156 { 157 temp.insert(temp.end(), CommandExecutor::getInstance().listOfPossibleShortcuts_s.begin(), CommandExecutor::getInstance().listOfPossibleShortcuts_s.end()); 158 temp.insert(temp.end(), CommandExecutor::getInstance().listOfPossibleFunctionClasses_s.begin(), CommandExecutor::getInstance().listOfPossibleFunctionClasses_s.end()); 159 } 160 161 switch (CommandExecutor::getInstance().state_s) 180 162 { 181 163 case CS_Empty: 182 return (CommandExecutor:: tokens_s.subSet(0, CommandExecutor::tokens_s.size() - 1).join() + " " + CommandExecutor::getCommonBegin(temp));164 return (CommandExecutor::getInstance().tokens_s.subSet(0, CommandExecutor::getInstance().tokens_s.size() - 1).join() + " " + CommandExecutor::getCommonBegin(temp)); 183 165 break; 184 166 case CS_FunctionClass_Or_Shortcut_Or_Keyword: … … 191 173 break; 192 174 case CS_Function: 193 return (CommandExecutor:: tokens_s.subSet(0, CommandExecutor::tokens_s.size() - 1).join() + " " + CommandExecutor::getCommonBegin(CommandExecutor::listOfPossibleFunctions_s));175 return (CommandExecutor::getInstance().tokens_s.subSet(0, CommandExecutor::getInstance().tokens_s.size() - 1).join() + " " + CommandExecutor::getCommonBegin(CommandExecutor::getInstance().listOfPossibleFunctions_s)); 194 176 break; 195 177 case CS_Function_Params: … … 200 182 break; 201 183 case CS_ConfigValueClass: 202 return (CommandExecutor:: tokens_s.subSet(0, CommandExecutor::tokens_s.size() - 1).join() + " " + CommandExecutor::getCommonBegin(CommandExecutor::listOfPossibleConfigValueClasses_s));184 return (CommandExecutor::getInstance().tokens_s.subSet(0, CommandExecutor::getInstance().tokens_s.size() - 1).join() + " " + CommandExecutor::getCommonBegin(CommandExecutor::getInstance().listOfPossibleConfigValueClasses_s)); 203 185 break; 204 186 case CS_ConfigValue: 205 return (CommandExecutor:: tokens_s.subSet(0, CommandExecutor::tokens_s.size() - 1).join() + " " + CommandExecutor::getCommonBegin(CommandExecutor::listOfPossibleConfigValues_s));187 return (CommandExecutor::getInstance().tokens_s.subSet(0, CommandExecutor::getInstance().tokens_s.size() - 1).join() + " " + CommandExecutor::getCommonBegin(CommandExecutor::getInstance().listOfPossibleConfigValues_s)); 206 188 break; 207 189 case CS_ConfigValueType: … … 212 194 break; 213 195 case CS_KeybindKey: 214 return (CommandExecutor:: tokens_s.subSet(0, CommandExecutor::tokens_s.size() - 1).join() + " " + CommandExecutor::getCommonBegin(CommandExecutor::listOfPossibleKeys_s));196 return (CommandExecutor::getInstance().tokens_s.subSet(0, CommandExecutor::getInstance().tokens_s.size() - 1).join() + " " + CommandExecutor::getCommonBegin(CommandExecutor::getInstance().listOfPossibleKeys_s)); 215 197 break; 216 198 case CS_KeybindCommand: … … 224 206 } 225 207 226 return CommandExecutor:: lastProcessedCommand_s;208 return CommandExecutor::getInstance().lastProcessedCommand_s; 227 209 } 228 210 229 211 std::string CommandExecutor::hint(const std::string& command) 230 212 { 231 if (CommandExecutor:: lastProcessedCommand_s != command)213 if (CommandExecutor::getInstance().lastProcessedCommand_s != command) 232 214 CommandExecutor::parse(command); 233 215 234 CommandExecutor:: tokens_s.split(command, " ", SubString::WhiteSpaces, false, '\\', '"', '(', ')', '\0');235 236 switch (CommandExecutor:: state_s)216 CommandExecutor::getInstance().tokens_s.split(command, " ", SubString::WhiteSpaces, false, '\\', '"', '(', ')', '\0'); 217 218 switch (CommandExecutor::getInstance().state_s) 237 219 { 238 220 case CS_Empty: 239 return (CommandExecutor::dump(CommandExecutor:: listOfPossibleShortcuts_s) + "\n" + CommandExecutor::dump(CommandExecutor::listOfPossibleFunctionClasses_s));221 return (CommandExecutor::dump(CommandExecutor::getInstance().listOfPossibleShortcuts_s) + "\n" + CommandExecutor::dump(CommandExecutor::getInstance().listOfPossibleFunctionClasses_s)); 240 222 break; 241 223 case CS_FunctionClass_Or_Shortcut_Or_Keyword: 242 224 break; 243 225 case CS_Shortcut_Params: 244 if (CommandExecutor:: shortcut_s != 0)245 return CommandExecutor::dump(CommandExecutor:: shortcut_s);226 if (CommandExecutor::getInstance().shortcut_s != 0) 227 return CommandExecutor::dump(CommandExecutor::getInstance().shortcut_s); 246 228 break; 247 229 case CS_Shortcut_Finished: 230 if (CommandExecutor::getInstance().shortcut_s != 0) 231 return CommandExecutor::dump(CommandExecutor::getInstance().shortcut_s); 248 232 break; 249 233 case CS_Function: 250 return CommandExecutor::dump(CommandExecutor:: listOfPossibleFunctions_s);234 return CommandExecutor::dump(CommandExecutor::getInstance().listOfPossibleFunctions_s); 251 235 break; 252 236 case CS_Function_Params: 253 if (CommandExecutor:: function_s != 0)254 return CommandExecutor::dump(CommandExecutor:: function_s);237 if (CommandExecutor::getInstance().function_s != 0) 238 return CommandExecutor::dump(CommandExecutor::getInstance().function_s); 255 239 break; 256 240 case CS_Function_Finished: 241 if (CommandExecutor::getInstance().function_s != 0) 242 return CommandExecutor::dump(CommandExecutor::getInstance().function_s); 257 243 break; 258 244 case CS_ConfigValueClass: 259 return CommandExecutor::dump(CommandExecutor:: listOfPossibleConfigValueClasses_s);245 return CommandExecutor::dump(CommandExecutor::getInstance().listOfPossibleConfigValueClasses_s); 260 246 break; 261 247 case CS_ConfigValue: 262 return CommandExecutor::dump(CommandExecutor:: listOfPossibleConfigValues_s);248 return CommandExecutor::dump(CommandExecutor::getInstance().listOfPossibleConfigValues_s); 263 249 break; 264 250 case CS_ConfigValueType: 265 if (CommandExecutor:: configvalue_s != 0)266 CommandExecutor::dump(CommandExecutor::configvalue_s);251 if (CommandExecutor::getInstance().configvalue_s != 0) 252 return CommandExecutor::dump(CommandExecutor::getInstance().configvalue_s); 267 253 break; 268 254 case CS_ConfigValueFinished: 255 if (CommandExecutor::getInstance().configvalue_s != 0) 256 return CommandExecutor::dump(CommandExecutor::getInstance().configvalue_s); 269 257 break; 270 258 case CS_KeybindKey: 271 return CommandExecutor::dump(CommandExecutor:: listOfPossibleKeys_s);259 return CommandExecutor::dump(CommandExecutor::getInstance().listOfPossibleKeys_s); 272 260 break; 273 261 case CS_KeybindCommand: 274 if (CommandExecutor:: key_s != 0)275 CommandExecutor::dump(CommandExecutor::key_s);262 if (CommandExecutor::getInstance().key_s != 0) 263 return CommandExecutor::dump(CommandExecutor::getInstance().key_s); 276 264 break; 277 265 case CS_KeybindFinished: 266 if (CommandExecutor::getInstance().key_s != 0) 267 return CommandExecutor::dump(CommandExecutor::getInstance().key_s); 278 268 break; 279 269 case CS_Error: … … 287 277 void CommandExecutor::parse(const std::string& command, bool bInitialize) 288 278 { 289 CommandExecutor:: tokens_s.split((command + CommandExecutor::cursor_s), " ", SubString::WhiteSpaces, false, '\\', '"', '(', ')', '\0');290 CommandExecutor:: lastProcessedCommand_s = command;279 CommandExecutor::getInstance().tokens_s.split((command + COMMAND_EXECUTOR_CURSOR), " ", SubString::WhiteSpaces, false, '\\', '"', '(', ')', '\0'); 280 CommandExecutor::getInstance().lastProcessedCommand_s = command; 291 281 292 282 if (bInitialize) 293 283 CommandExecutor::initialize(); 294 284 295 switch (CommandExecutor:: state_s)285 switch (CommandExecutor::getInstance().state_s) 296 286 { 297 287 case CS_Empty: … … 300 290 // We want a hint for the first token 301 291 // Check if there is already a perfect match 302 CommandExecutor:: functionclass_s = CommandExecutor::getIdentifierOfPossibleFunctionClass(CommandExecutor::getToken(0));303 CommandExecutor:: shortcut_s = CommandExecutor::getExecutorOfPossibleShortcut(CommandExecutor::getToken(0));304 305 if ((CommandExecutor:: functionclass_s != 0) || (CommandExecutor::shortcut_s != 0))292 CommandExecutor::getInstance().functionclass_s = CommandExecutor::getIdentifierOfPossibleFunctionClass(CommandExecutor::getToken(0)); 293 CommandExecutor::getInstance().shortcut_s = CommandExecutor::getExecutorOfPossibleShortcut(CommandExecutor::getToken(0)); 294 295 if ((CommandExecutor::getInstance().functionclass_s != 0) || (CommandExecutor::getInstance().shortcut_s != 0)) 306 296 { 307 297 // Yes, there is a class or a shortcut with the searched name 308 298 // Add a whitespace and continue parsing 309 CommandExecutor:: state_s = CS_FunctionClass_Or_Shortcut_Or_Keyword;299 CommandExecutor::getInstance().state_s = CS_FunctionClass_Or_Shortcut_Or_Keyword; 310 300 CommandExecutor::parse(command + " ", false); 311 301 return; … … 315 305 CommandExecutor::createListOfPossibleFunctionClasses(CommandExecutor::getToken(0)); 316 306 CommandExecutor::createListOfPossibleShortcuts(CommandExecutor::getToken(0)); 317 CommandExecutor::state_s = CS_Empty;318 307 return; 319 308 } … … 321 310 { 322 311 // There is at least one argument: Check if it's a shortcut, a classname or a special keyword 323 CommandExecutor:: state_s = CS_FunctionClass_Or_Shortcut_Or_Keyword;312 CommandExecutor::getInstance().state_s = CS_FunctionClass_Or_Shortcut_Or_Keyword; 324 313 CommandExecutor::parse(command, false); 325 314 return; … … 332 321 { 333 322 // We want to set a config value 334 CommandExecutor:: state_s = CS_ConfigValueClass;323 CommandExecutor::getInstance().state_s = CS_ConfigValueClass; 335 324 CommandExecutor::parse(command, false); 336 325 return; … … 339 328 { 340 329 // We want to set a keybinding 341 CommandExecutor:: state_s = CS_KeybindKey;330 CommandExecutor::getInstance().state_s = CS_KeybindKey; 342 331 CommandExecutor::parse(command, false); 343 332 return; 344 333 } 345 334 346 if (CommandExecutor:: functionclass_s == 0)347 CommandExecutor:: functionclass_s = CommandExecutor::getIdentifierOfPossibleFunctionClass(CommandExecutor::getToken(0));348 if (CommandExecutor:: shortcut_s == 0)349 CommandExecutor:: shortcut_s = CommandExecutor::getExecutorOfPossibleShortcut(CommandExecutor::getToken(0));350 351 if ((CommandExecutor:: functionclass_s == 0) && (CommandExecutor::shortcut_s == 0))335 if (CommandExecutor::getInstance().functionclass_s == 0) 336 CommandExecutor::getInstance().functionclass_s = CommandExecutor::getIdentifierOfPossibleFunctionClass(CommandExecutor::getToken(0)); 337 if (CommandExecutor::getInstance().shortcut_s == 0) 338 CommandExecutor::getInstance().shortcut_s = CommandExecutor::getExecutorOfPossibleShortcut(CommandExecutor::getToken(0)); 339 340 if ((CommandExecutor::getInstance().functionclass_s == 0) && (CommandExecutor::getInstance().shortcut_s == 0)) 352 341 { 353 342 // Argument 1 seems to be wrong 354 343 AddLanguageEntry("CommandExecutor::NoSuchCommandOrClassName", "No such command or classname"); 355 CommandExecutor:: errorMessage_s = (CommandExecutor::getToken(0) + ": " + GetLocalisation("CommandExecutor::NoSuchCommandOrClassName"));356 CommandExecutor:: state_s = CS_Error;357 return; 358 } 359 else if (CommandExecutor:: shortcut_s != 0)344 CommandExecutor::getInstance().errorMessage_s = (CommandExecutor::getToken(0) + ": " + GetLocalisation("CommandExecutor::NoSuchCommandOrClassName")); 345 CommandExecutor::getInstance().state_s = CS_Error; 346 return; 347 } 348 else if (CommandExecutor::getInstance().shortcut_s != 0) 360 349 { 361 350 // Argument 1 is a shortcut: Return the needed parameter types 362 CommandExecutor:: state_s = CS_Shortcut_Params;351 CommandExecutor::getInstance().state_s = CS_Shortcut_Params; 363 352 CommandExecutor::parse(command, false); 364 353 return; … … 367 356 { 368 357 // Argument 1 is a classname: Return the possible functions 369 CommandExecutor:: state_s = CS_Function;358 CommandExecutor::getInstance().state_s = CS_Function; 370 359 CommandExecutor::parse(command, false); 371 360 return; … … 374 363 else 375 364 { 376 CommandExecutor:: state_s = CS_Error;365 CommandExecutor::getInstance().state_s = CS_Error; 377 366 return; 378 367 } 379 368 break; 380 369 case CS_Shortcut_Params: 381 if (CommandExecutor:: shortcut_s != 0)370 if (CommandExecutor::getInstance().shortcut_s != 0) 382 371 { 383 372 // Valid command 384 373 // Check if there are enough parameters 385 if (CommandExecutor::enoughParametersGiven(1, CommandExecutor:: shortcut_s))386 { 387 CommandExecutor:: state_s = CS_Shortcut_Finished;374 if (CommandExecutor::enoughParametersGiven(1, CommandExecutor::getInstance().shortcut_s)) 375 { 376 CommandExecutor::getInstance().state_s = CS_Shortcut_Finished; 388 377 return; 389 378 } … … 392 381 { 393 382 // Something is wrong 394 CommandExecutor:: state_s = CS_Error;383 CommandExecutor::getInstance().state_s = CS_Error; 395 384 return; 396 385 } 397 386 break; 398 387 case CS_Function: 399 if (CommandExecutor:: functionclass_s != 0)388 if (CommandExecutor::getInstance().functionclass_s != 0) 400 389 { 401 390 // We have a valid classname … … 404 393 { 405 394 // There is a second argument: Check if it's a valid functionname 406 CommandExecutor:: function_s = CommandExecutor::getExecutorOfPossibleFunction(CommandExecutor::getToken(1), CommandExecutor::functionclass_s);407 if (CommandExecutor:: function_s == 0)395 CommandExecutor::getInstance().function_s = CommandExecutor::getExecutorOfPossibleFunction(CommandExecutor::getToken(1), CommandExecutor::getInstance().functionclass_s); 396 if (CommandExecutor::getInstance().function_s == 0) 408 397 { 409 398 // Argument 2 seems to be wrong 410 399 AddLanguageEntry("CommandExecutor::NoSuchFunctionnameIn", "No such functionname in"); 411 CommandExecutor:: errorMessage_s = (CommandExecutor::getToken(1) + ": " + GetLocalisation("CommandExecutor::NoSuchFunctionnameIn") + " " + CommandExecutor::functionclass_s->getName());412 CommandExecutor:: state_s = CS_Error;400 CommandExecutor::getInstance().errorMessage_s = (CommandExecutor::getToken(1) + ": " + GetLocalisation("CommandExecutor::NoSuchFunctionnameIn") + " " + CommandExecutor::getInstance().functionclass_s->getName()); 401 CommandExecutor::getInstance().state_s = CS_Error; 413 402 return; 414 403 } … … 416 405 { 417 406 // Argument 2 seems to be a valid functionname: Get the parameters 418 CommandExecutor:: state_s = CS_Function_Params;407 CommandExecutor::getInstance().state_s = CS_Function_Params; 419 408 CommandExecutor::parse(command, false); 420 409 return; … … 425 414 // There is no finished second argument 426 415 // Check if there's already a perfect match 427 if (CommandExecutor:: tokens_s.size() >= 2)428 { 429 CommandExecutor:: function_s = CommandExecutor::getExecutorOfPossibleFunction(CommandExecutor::getToken(1), CommandExecutor::functionclass_s);430 if (CommandExecutor:: function_s != 0)416 if (CommandExecutor::getInstance().tokens_s.size() >= 2) 417 { 418 CommandExecutor::getInstance().function_s = CommandExecutor::getExecutorOfPossibleFunction(CommandExecutor::getToken(1), CommandExecutor::getInstance().functionclass_s); 419 if (CommandExecutor::getInstance().function_s != 0) 431 420 { 432 421 // There is a perfect match: Add a whitespace and continue parsing 433 CommandExecutor:: state_s = CS_Function_Params;422 CommandExecutor::getInstance().state_s = CS_Function_Params; 434 423 CommandExecutor::parse(command + " ", false); 435 424 return; … … 438 427 439 428 // No perfect match: Create the list of all possible functions and return 440 CommandExecutor::createListOfPossibleFunctions(CommandExecutor::getToken(1), CommandExecutor::functionclass_s); 441 CommandExecutor::state_s = CS_Function; 429 CommandExecutor::createListOfPossibleFunctions(CommandExecutor::getToken(1), CommandExecutor::getInstance().functionclass_s); 442 430 return; 443 431 } … … 445 433 else 446 434 { 447 CommandExecutor:: state_s = CS_Error;435 CommandExecutor::getInstance().state_s = CS_Error; 448 436 return; 449 437 } 450 438 break; 451 439 case CS_Function_Params: 452 if ((CommandExecutor:: functionclass_s != 0) && (CommandExecutor::function_s != 0))440 if ((CommandExecutor::getInstance().functionclass_s != 0) && (CommandExecutor::getInstance().function_s != 0)) 453 441 { 454 442 // Valid command 455 443 // Check if there are enough parameters 456 if (CommandExecutor::enoughParametersGiven(2, CommandExecutor:: function_s))457 { 458 CommandExecutor:: state_s = CS_Function_Finished;444 if (CommandExecutor::enoughParametersGiven(2, CommandExecutor::getInstance().function_s)) 445 { 446 CommandExecutor::getInstance().state_s = CS_Function_Finished; 459 447 return; 460 448 } … … 463 451 { 464 452 // Something is wrong 465 CommandExecutor:: state_s = CS_Error;453 CommandExecutor::getInstance().state_s = CS_Error; 466 454 return; 467 455 } … … 475 463 { 476 464 // There is a second argument: Check if it's a valid classname 477 CommandExecutor:: configvalueclass_s = CommandExecutor::getIdentifierOfPossibleConfigValueClass(CommandExecutor::getToken(1));478 if (CommandExecutor:: configvalueclass_s == 0)465 CommandExecutor::getInstance().configvalueclass_s = CommandExecutor::getIdentifierOfPossibleConfigValueClass(CommandExecutor::getToken(1)); 466 if (CommandExecutor::getInstance().configvalueclass_s == 0) 479 467 { 480 468 // Argument 2 seems to be wrong 481 469 AddLanguageEntry("CommandExecutor::NoSuchClassWithConfigValues", "No such class with config values"); 482 CommandExecutor:: errorMessage_s = (CommandExecutor::getToken(1) + ": " + GetLocalisation("CommandExecutor::NoSuchClassWithConfigValues"));483 CommandExecutor:: state_s = CS_Error;470 CommandExecutor::getInstance().errorMessage_s = (CommandExecutor::getToken(1) + ": " + GetLocalisation("CommandExecutor::NoSuchClassWithConfigValues")); 471 CommandExecutor::getInstance().state_s = CS_Error; 484 472 return; 485 473 } … … 487 475 { 488 476 // Argument 2 seems to be a valid classname: Search for possible config values 489 CommandExecutor:: state_s = CS_ConfigValue;477 CommandExecutor::getInstance().state_s = CS_ConfigValue; 490 478 CommandExecutor::parse(command, false); 491 479 return; … … 496 484 // There's no finished second argument 497 485 // Check if there's already a perfect match 498 if (CommandExecutor:: tokens_s.size() >= 2)499 { 500 CommandExecutor:: configvalueclass_s = CommandExecutor::getIdentifierOfPossibleConfigValueClass(CommandExecutor::getToken(1));501 if (CommandExecutor:: configvalueclass_s != 0)486 if (CommandExecutor::getInstance().tokens_s.size() >= 2) 487 { 488 CommandExecutor::getInstance().configvalueclass_s = CommandExecutor::getIdentifierOfPossibleConfigValueClass(CommandExecutor::getToken(1)); 489 if (CommandExecutor::getInstance().configvalueclass_s != 0) 502 490 { 503 491 // There is a perfect match: Add a whitespace and continue parsing 504 CommandExecutor:: state_s = CS_ConfigValue;492 CommandExecutor::getInstance().state_s = CS_ConfigValue; 505 493 CommandExecutor::parse(command + " ", false); 506 494 return; … … 510 498 // No perfect match: Create the list of all possible classnames and return 511 499 CommandExecutor::createListOfPossibleConfigValueClasses(CommandExecutor::getToken(1)); 512 CommandExecutor::state_s = CS_ConfigValueClass;513 500 return; 514 501 } … … 517 504 { 518 505 // Something is wrong 519 CommandExecutor:: state_s = CS_Error;506 CommandExecutor::getInstance().state_s = CS_Error; 520 507 return; 521 508 } 522 509 break; 523 510 case CS_ConfigValue: 524 if (((CommandExecutor::getToken(0) == COMMAND_EXECUTOR_KEYWORD_SET_CONFIG_VALUE) || (CommandExecutor::getToken(0) == COMMAND_EXECUTOR_KEYWORD_SET_CONFIG_VALUE_TEMPORARY)) && (CommandExecutor:: configvalueclass_s != 0))511 if (((CommandExecutor::getToken(0) == COMMAND_EXECUTOR_KEYWORD_SET_CONFIG_VALUE) || (CommandExecutor::getToken(0) == COMMAND_EXECUTOR_KEYWORD_SET_CONFIG_VALUE_TEMPORARY)) && (CommandExecutor::getInstance().configvalueclass_s != 0)) 525 512 { 526 513 // Check if there is a third argument … … 528 515 { 529 516 // There is a third argument: Check if it's a valid config value 530 CommandExecutor:: configvalue_s = CommandExecutor::getContainerOfPossibleConfigValue(CommandExecutor::getToken(2), CommandExecutor::configvalueclass_s);531 if (CommandExecutor:: configvalue_s == 0)517 CommandExecutor::getInstance().configvalue_s = CommandExecutor::getContainerOfPossibleConfigValue(CommandExecutor::getToken(2), CommandExecutor::getInstance().configvalueclass_s); 518 if (CommandExecutor::getInstance().configvalue_s == 0) 532 519 { 533 520 // Argument 3 seems to be wrong 534 521 AddLanguageEntry("CommandExecutor::NoSuchConfigValueIn", "No such config value in"); 535 CommandExecutor:: errorMessage_s = (CommandExecutor::getToken(2) + ": " + GetLocalisation("CommandExecutor::NoSuchConfigValueIn") + " " + CommandExecutor::configvalueclass_s->getName());536 CommandExecutor:: state_s = CS_Error;522 CommandExecutor::getInstance().errorMessage_s = (CommandExecutor::getToken(2) + ": " + GetLocalisation("CommandExecutor::NoSuchConfigValueIn") + " " + CommandExecutor::getInstance().configvalueclass_s->getName()); 523 CommandExecutor::getInstance().state_s = CS_Error; 537 524 return; 538 525 } … … 540 527 { 541 528 // Argument 3 seems to be a valid config value: Get the type 542 CommandExecutor:: state_s = CS_ConfigValueType;529 CommandExecutor::getInstance().state_s = CS_ConfigValueType; 543 530 CommandExecutor::parse(command, false); 544 531 return; … … 549 536 // There is no finished third argument 550 537 // Check if there's already a perfect match 551 if (CommandExecutor:: tokens_s.size() >= 3)552 { 553 CommandExecutor:: configvalue_s = CommandExecutor::getContainerOfPossibleConfigValue(CommandExecutor::getToken(2), CommandExecutor::configvalueclass_s);554 if (CommandExecutor:: configvalueclass_s != 0)538 if (CommandExecutor::getInstance().tokens_s.size() >= 3) 539 { 540 CommandExecutor::getInstance().configvalue_s = CommandExecutor::getContainerOfPossibleConfigValue(CommandExecutor::getToken(2), CommandExecutor::getInstance().configvalueclass_s); 541 if (CommandExecutor::getInstance().configvalueclass_s != 0) 555 542 { 556 543 // There is a perfect match: Add a whitespace and continue parsing 557 CommandExecutor:: state_s = CS_ConfigValueType;544 CommandExecutor::getInstance().state_s = CS_ConfigValueType; 558 545 CommandExecutor::parse(command + " ", false); 559 546 return; … … 562 549 563 550 // No perfect match: Create the list of all possible config values 564 CommandExecutor::createListOfPossibleConfigValues(CommandExecutor::getToken(2), CommandExecutor::configvalueclass_s); 565 CommandExecutor::state_s = CS_ConfigValueType; 551 CommandExecutor::createListOfPossibleConfigValues(CommandExecutor::getToken(2), CommandExecutor::getInstance().configvalueclass_s); 566 552 return; 567 553 } … … 570 556 { 571 557 // Something is wrong 572 CommandExecutor:: state_s = CS_Error;558 CommandExecutor::getInstance().state_s = CS_Error; 573 559 return; 574 560 } 575 561 break; 576 562 case CS_ConfigValueType: 577 if (((CommandExecutor::getToken(0) == COMMAND_EXECUTOR_KEYWORD_SET_CONFIG_VALUE) || (CommandExecutor::getToken(0) == COMMAND_EXECUTOR_KEYWORD_SET_CONFIG_VALUE_TEMPORARY)) && (CommandExecutor:: configvalueclass_s != 0) && (CommandExecutor::configvalue_s != 0))563 if (((CommandExecutor::getToken(0) == COMMAND_EXECUTOR_KEYWORD_SET_CONFIG_VALUE) || (CommandExecutor::getToken(0) == COMMAND_EXECUTOR_KEYWORD_SET_CONFIG_VALUE_TEMPORARY)) && (CommandExecutor::getInstance().configvalueclass_s != 0) && (CommandExecutor::getInstance().configvalue_s != 0)) 578 564 { 579 565 // Valid command 580 566 // Check if there are enough parameters 581 if (CommandExecutor:: tokens_s.size() >= 4)582 { 583 CommandExecutor:: state_s = CS_ConfigValueFinished;567 if (CommandExecutor::getInstance().tokens_s.size() >= 4) 568 { 569 CommandExecutor::getInstance().state_s = CS_ConfigValueFinished; 584 570 return; 585 571 } … … 588 574 { 589 575 // Something is wrong 590 CommandExecutor:: state_s = CS_Error;576 CommandExecutor::getInstance().state_s = CS_Error; 591 577 return; 592 578 } … … 600 586 { 601 587 // Something is wrong 602 CommandExecutor:: state_s = CS_Error;588 CommandExecutor::getInstance().state_s = CS_Error; 603 589 return; 604 590 } … … 609 595 // Valid command 610 596 // Check if there are enough parameters 611 if (CommandExecutor:: tokens_s.size() >= 3)612 { 613 CommandExecutor:: state_s = CS_KeybindFinished;597 if (CommandExecutor::getInstance().tokens_s.size() >= 3) 598 { 599 CommandExecutor::getInstance().state_s = CS_KeybindFinished; 614 600 return; 615 601 } … … 619 605 { 620 606 // Something is wrong 621 CommandExecutor:: state_s = CS_Error;607 CommandExecutor::getInstance().state_s = CS_Error; 622 608 return; 623 609 } … … 643 629 void CommandExecutor::initialize() 644 630 { 645 CommandExecutor:: listOfPossibleFunctionClasses_s.clear();646 CommandExecutor:: listOfPossibleShortcuts_s.clear();647 CommandExecutor:: listOfPossibleFunctions_s.clear();648 CommandExecutor:: listOfPossibleConfigValueClasses_s.clear();649 CommandExecutor:: listOfPossibleConfigValues_s.clear();650 CommandExecutor:: listOfPossibleKeys_s.clear();651 652 CommandExecutor:: functionclass_s = 0;653 CommandExecutor:: configvalueclass_s = 0;654 CommandExecutor:: shortcut_s = 0;655 CommandExecutor:: function_s = 0;656 CommandExecutor:: configvalue_s = 0;657 CommandExecutor:: key_s = 0;658 659 CommandExecutor:: errorMessage_s = "";660 CommandExecutor:: state_s = CS_Empty;631 CommandExecutor::getInstance().listOfPossibleFunctionClasses_s.clear(); 632 CommandExecutor::getInstance().listOfPossibleShortcuts_s.clear(); 633 CommandExecutor::getInstance().listOfPossibleFunctions_s.clear(); 634 CommandExecutor::getInstance().listOfPossibleConfigValueClasses_s.clear(); 635 CommandExecutor::getInstance().listOfPossibleConfigValues_s.clear(); 636 CommandExecutor::getInstance().listOfPossibleKeys_s.clear(); 637 638 CommandExecutor::getInstance().functionclass_s = 0; 639 CommandExecutor::getInstance().configvalueclass_s = 0; 640 CommandExecutor::getInstance().shortcut_s = 0; 641 CommandExecutor::getInstance().function_s = 0; 642 CommandExecutor::getInstance().configvalue_s = 0; 643 CommandExecutor::getInstance().key_s = 0; 644 645 CommandExecutor::getInstance().errorMessage_s = ""; 646 CommandExecutor::getInstance().state_s = CS_Empty; 661 647 } 662 648 … … 665 651 // Because we added a cursor we have +1 arguments 666 652 // There are num arguments given if there are at least num arguments + one cursor 667 return (CommandExecutor:: tokens_s.size() >= (num + 1));653 return (CommandExecutor::getInstance().tokens_s.size() >= (num + 1)); 668 654 } 669 655 … … 671 657 { 672 658 // Because we added a cursor we have +1 arguments 673 if (CommandExecutor:: tokens_s.size() >= 1)674 return (CommandExecutor:: tokens_s.size() - 1);659 if (CommandExecutor::getInstance().tokens_s.size() >= 1) 660 return (CommandExecutor::getInstance().tokens_s.size() - 1); 675 661 else 676 662 return 0; … … 679 665 std::string CommandExecutor::getToken(unsigned int index) 680 666 { 681 if ((index >= 0) && (index < (CommandExecutor:: tokens_s.size() - 1)))682 return CommandExecutor:: tokens_s[index];683 else if (index == (CommandExecutor:: tokens_s.size() - 1))684 return CommandExecutor:: tokens_s[index].substr(0, CommandExecutor::tokens_s[index].size() - 1);667 if ((index >= 0) && (index < (CommandExecutor::getInstance().tokens_s.size() - 1))) 668 return CommandExecutor::getInstance().tokens_s[index]; 669 else if (index == (CommandExecutor::getInstance().tokens_s.size() - 1)) 670 return CommandExecutor::getInstance().tokens_s[index].substr(0, CommandExecutor::getInstance().tokens_s[index].size() - 1); 685 671 else 686 672 return ""; … … 697 683 break; 698 684 } 699 return (CommandExecutor:: tokens_s.size() >= neededParams);685 return (CommandExecutor::getInstance().tokens_s.size() >= neededParams); 700 686 } 701 687 … … 708 694 if ((*it).first.find(getLowercase(fragment)) == 0) 709 695 { 710 CommandExecutor:: listOfPossibleFunctionClasses_s.push_back(&(*it).first);696 CommandExecutor::getInstance().listOfPossibleFunctionClasses_s.push_back(&(*it).first); 711 697 } 712 698 } 713 699 } 714 700 715 CommandExecutor:: listOfPossibleFunctionClasses_s.sort(CommandExecutor::compareStringsInList);701 CommandExecutor::getInstance().listOfPossibleFunctionClasses_s.sort(CommandExecutor::compareStringsInList); 716 702 } 717 703 … … 722 708 if ((*it).first.find(getLowercase(fragment)) == 0) 723 709 { 724 CommandExecutor:: listOfPossibleShortcuts_s.push_back(&(*it).first);710 CommandExecutor::getInstance().listOfPossibleShortcuts_s.push_back(&(*it).first); 725 711 } 726 712 } 727 713 728 CommandExecutor:: listOfPossibleShortcuts_s.sort(CommandExecutor::compareStringsInList);714 CommandExecutor::getInstance().listOfPossibleShortcuts_s.sort(CommandExecutor::compareStringsInList); 729 715 } 730 716 … … 735 721 if ((*it).first.find(getLowercase(fragment)) == 0) 736 722 { 737 CommandExecutor:: listOfPossibleFunctions_s.push_back(&(*it).first);723 CommandExecutor::getInstance().listOfPossibleFunctions_s.push_back(&(*it).first); 738 724 } 739 725 } 740 726 741 CommandExecutor:: listOfPossibleFunctions_s.sort(CommandExecutor::compareStringsInList);727 CommandExecutor::getInstance().listOfPossibleFunctions_s.sort(CommandExecutor::compareStringsInList); 742 728 } 743 729 … … 750 736 if ((*it).first.find(getLowercase(fragment)) == 0) 751 737 { 752 CommandExecutor:: listOfPossibleConfigValueClasses_s.push_back(&(*it).first);738 CommandExecutor::getInstance().listOfPossibleConfigValueClasses_s.push_back(&(*it).first); 753 739 } 754 740 } 755 741 } 756 742 757 CommandExecutor:: listOfPossibleConfigValueClasses_s.sort(CommandExecutor::compareStringsInList);743 CommandExecutor::getInstance().listOfPossibleConfigValueClasses_s.sort(CommandExecutor::compareStringsInList); 758 744 } 759 745 … … 764 750 if ((*it).first.find(getLowercase(fragment)) == 0) 765 751 { 766 CommandExecutor:: listOfPossibleConfigValues_s.push_back(&(*it).first);752 CommandExecutor::getInstance().listOfPossibleConfigValues_s.push_back(&(*it).first); 767 753 } 768 754 } 769 755 770 CommandExecutor:: listOfPossibleConfigValues_s.sort(CommandExecutor::compareStringsInList);756 CommandExecutor::getInstance().listOfPossibleConfigValues_s.sort(CommandExecutor::compareStringsInList); 771 757 } 772 758 … … 775 761 // todo 776 762 777 CommandExecutor:: listOfPossibleKeys_s.sort(CommandExecutor::compareStringsInList);763 CommandExecutor::getInstance().listOfPossibleKeys_s.sort(CommandExecutor::compareStringsInList); 778 764 } 779 765 -
code/branches/core2/src/orxonox/core/CommandExecutor.h
r948 r949 33 33 #include <list> 34 34 35 #include "util/SubString.h" 35 36 #include "CorePrereqs.h" 36 37 37 class SubString; 38 #define COMMAND_EXECUTOR_CURSOR '$' 38 39 39 40 namespace orxonox … … 70 71 71 72 /** @brief Returns the map that stores all console commands. @return The const_iterator */ 72 static inline const std::map<std::string, ExecutorStatic*>& getConsoleCommandShortcutMap() { return CommandExecutor:: consoleCommandShortcuts_s; }73 static inline const std::map<std::string, ExecutorStatic*>& getConsoleCommandShortcutMap() { return CommandExecutor::getInstance().consoleCommandShortcuts_s; } 73 74 /** @brief Returns a const_iterator to the beginning of the map that stores all console commands. @return The const_iterator */ 74 static inline std::map<std::string, ExecutorStatic*>::const_iterator getConsoleCommandShortcutMapBegin() { return CommandExecutor:: consoleCommandShortcuts_s.begin(); }75 static inline std::map<std::string, ExecutorStatic*>::const_iterator getConsoleCommandShortcutMapBegin() { return CommandExecutor::getInstance().consoleCommandShortcuts_s.begin(); } 75 76 /** @brief Returns a const_iterator to the end of the map that stores all console commands. @return The const_iterator */ 76 static inline std::map<std::string, ExecutorStatic*>::const_iterator getConsoleCommandShortcutMapEnd() { return CommandExecutor:: consoleCommandShortcuts_s.end(); }77 static inline std::map<std::string, ExecutorStatic*>::const_iterator getConsoleCommandShortcutMapEnd() { return CommandExecutor::getInstance().consoleCommandShortcuts_s.end(); } 77 78 78 79 /** @brief Returns the map that stores all console commands with their names in lowercase. @return The const_iterator */ 79 static inline const std::map<std::string, ExecutorStatic*>& getLowercaseConsoleCommandShortcutMap() { return CommandExecutor:: consoleCommandShortcuts_LC_s; }80 static inline const std::map<std::string, ExecutorStatic*>& getLowercaseConsoleCommandShortcutMap() { return CommandExecutor::getInstance().consoleCommandShortcuts_LC_s; } 80 81 /** @brief Returns a const_iterator to the beginning of the map that stores all console commands with their names in lowercase. @return The const_iterator */ 81 static inline std::map<std::string, ExecutorStatic*>::const_iterator getLowercaseConsoleCommandShortcutMapBegin() { return CommandExecutor:: consoleCommandShortcuts_LC_s.begin(); }82 static inline std::map<std::string, ExecutorStatic*>::const_iterator getLowercaseConsoleCommandShortcutMapBegin() { return CommandExecutor::getInstance().consoleCommandShortcuts_LC_s.begin(); } 82 83 /** @brief Returns a const_iterator to the end of the map that stores all console commands with their names in lowercase. @return The const_iterator */ 83 static inline std::map<std::string, ExecutorStatic*>::const_iterator getLowercaseConsoleCommandShortcutMapEnd() { return CommandExecutor:: consoleCommandShortcuts_LC_s.end(); }84 static inline std::map<std::string, ExecutorStatic*>::const_iterator getLowercaseConsoleCommandShortcutMapEnd() { return CommandExecutor::getInstance().consoleCommandShortcuts_LC_s.end(); } 84 85 85 86 private: 87 static CommandExecutor& getInstance(); 88 86 89 static void parse(const std::string& command, bool bInitialize = true); 87 90 static void initialize(); … … 116 119 static ConfigValueContainer* getContainerOfPossibleKey(const std::string& name); 117 120 118 static const char cursor_s = '$'; 121 std::string lastProcessedCommand_s; 122 SubString tokens_s; 123 std::list<const std::string*> listOfPossibleFunctionClasses_s; 124 std::list<const std::string*> listOfPossibleShortcuts_s; 125 std::list<const std::string*> listOfPossibleFunctions_s; 126 std::list<const std::string*> listOfPossibleConfigValueClasses_s; 127 std::list<const std::string*> listOfPossibleConfigValues_s; 128 std::list<const std::string*> listOfPossibleKeys_s; 119 129 120 static std::string lastProcessedCommand_s; 121 static SubString tokens_s; 122 static std::list<const std::string*> listOfPossibleFunctionClasses_s; 123 static std::list<const std::string*> listOfPossibleShortcuts_s; 124 static std::list<const std::string*> listOfPossibleFunctions_s; 125 static std::list<const std::string*> listOfPossibleConfigValueClasses_s; 126 static std::list<const std::string*> listOfPossibleConfigValues_s; 127 static std::list<const std::string*> listOfPossibleKeys_s; 130 Identifier* functionclass_s; 131 Identifier* configvalueclass_s; 132 ExecutorStatic* shortcut_s; 133 ExecutorStatic* function_s; 134 ConfigValueContainer* configvalue_s; 135 ConfigValueContainer* key_s; 128 136 129 static Identifier* functionclass_s; 130 static Identifier* configvalueclass_s; 131 static ExecutorStatic* shortcut_s; 132 static ExecutorStatic* function_s; 133 static ConfigValueContainer* configvalue_s; 134 static ConfigValueContainer* key_s; 137 std::string errorMessage_s; 138 CommandState state_s; 135 139 136 static std::string errorMessage_s; 137 static CommandState state_s; 138 139 static std::map<std::string, ExecutorStatic*> consoleCommandShortcuts_s; 140 static std::map<std::string, ExecutorStatic*> consoleCommandShortcuts_LC_s; 140 std::map<std::string, ExecutorStatic*> consoleCommandShortcuts_s; 141 std::map<std::string, ExecutorStatic*> consoleCommandShortcuts_LC_s; 141 142 }; 142 143 } -
code/branches/core2/src/orxonox/core/ConfigValueContainer.cc
r947 r949 921 921 std::ofstream file; 922 922 file.open(filename.c_str(), std::fstream::out); 923 file.setf(std::ios::fixed, std::ios::floatfield); 924 file.precision(6); 923 925 924 926 if (!file.is_open()) -
code/branches/core2/src/orxonox/core/ConsoleCommand.h
r947 r949 40 40 41 41 #define ConsoleCommandGeneric(fakevariable, classname, executor, bCreateShortcut) \ 42 //Executor& fakevariable = ClassManager<classname>::getIdentifier()->addConsoleCommand((ExecutorStatic*)executor, bCreateShortcut)42 Executor& fakevariable = ClassManager<classname>::getIdentifier()->addConsoleCommand((ExecutorStatic*)executor, bCreateShortcut) 43 43 44 44 … … 47 47 48 48 #define ConsoleCommandShortcutGeneric(fakevariable, executor) \ 49 //bool fakevariable = CommandExecutor::addConsoleCommandShortcut((ExecutorStatic*)executor)49 bool fakevariable = CommandExecutor::addConsoleCommandShortcut((ExecutorStatic*)executor) 50 50 51 51 -
code/branches/core2/src/orxonox/core/OutputHandler.h
r947 r949 61 61 /** @brief Puts some text on the outstream. @param text The text */ 62 62 static inline void log(const std::string& text) 63 { OutputHandler::getOutStream(). output(text); }63 { OutputHandler::getOutStream().setOutputLevel(0); OutputHandler::getOutStream().output(text); } 64 64 65 65 /** @brief Returns a reference to the logfile. @return The logfile */
Note: See TracChangeset
for help on using the changeset viewer.