Changeset 1341 for code/branches/console/src/core/Identifier.cc
- Timestamp:
- May 21, 2008, 1:33:42 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/console/src/core/Identifier.cc
r1062 r1341 37 37 38 38 #include "Factory.h" 39 #include " Executor.h"39 #include "ConsoleCommand.h" 40 40 #include "CommandExecutor.h" 41 41 … … 270 270 @return The executor of the command 271 271 */ 272 ExecutorStatic& Identifier::addConsoleCommand(ExecutorStatic* executor, bool bCreateShortcut)272 ConsoleCommand& Identifier::addConsoleCommand(ConsoleCommand* command, bool bCreateShortcut) 273 273 { 274 274 this->bHasConsoleCommands_ = true; 275 this->consoleCommands_[ executor->getName()] = executor;276 this->consoleCommands_LC_[getLowercase( executor->getName())] = executor;275 this->consoleCommands_[command->getName()] = command; 276 this->consoleCommands_LC_[getLowercase(command->getName())] = command; 277 277 278 278 if (bCreateShortcut) 279 CommandExecutor::addConsoleCommandShortcut( executor);280 281 return (* executor);279 CommandExecutor::addConsoleCommandShortcut(command); 280 281 return (*command); 282 282 } 283 283 … … 287 287 @return The executor of the requested console command 288 288 */ 289 ExecutorStatic* Identifier::getConsoleCommand(const std::string& name) const290 { 291 std::map<std::string, ExecutorStatic*>::const_iterator it = this->consoleCommands_.find(name);289 ConsoleCommand* Identifier::getConsoleCommand(const std::string& name) const 290 { 291 std::map<std::string, ConsoleCommand*>::const_iterator it = this->consoleCommands_.find(name); 292 292 if (it != this->consoleCommands_.end()) 293 293 return (*it).second; … … 301 301 @return The executor of the requested console command 302 302 */ 303 ExecutorStatic* Identifier::getLowercaseConsoleCommand(const std::string& name) const304 { 305 std::map<std::string, ExecutorStatic*>::const_iterator it = this->consoleCommands_LC_.find(name);303 ConsoleCommand* Identifier::getLowercaseConsoleCommand(const std::string& name) const 304 { 305 std::map<std::string, ConsoleCommand*>::const_iterator it = this->consoleCommands_LC_.find(name); 306 306 if (it != this->consoleCommands_LC_.end()) 307 307 return (*it).second;
Note: See TracChangeset
for help on using the changeset viewer.