Changeset 9692 in orxonox.OLD for branches/new_class_id/src/lib/shell/shell_command.cc
- Timestamp:
- Aug 23, 2006, 12:43:25 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/new_class_id/src/lib/shell/shell_command.cc
r9406 r9692 21 21 #include "compiler.h" 22 22 #include "debug.h" 23 #include "class_list.h"24 23 25 24 #include "key_names.h" … … 28 27 { 29 28 SHELL_COMMAND(debug, ShellCommandClass, help); 29 NewObjectListDefinition(ShellCommand); 30 30 31 31 … … 38 38 ShellCommand::ShellCommand(const std::string& commandName, const std::string& className, Executor* executor) 39 39 { 40 this-> setClassID(CL_SHELL_COMMAND, "ShellCommand");40 this->registerObject(this, ShellCommand::_objectList); 41 41 PRINTF(4)("create shellcommand '%s' for class '%s'\n", commandName.c_str(), className.c_str()); 42 42 this->setName(commandName); … … 94 94 void ShellCommand::unregisterCommand(const std::string& commandName, const std::string& className) 95 95 { 96 97 96 ShellCommandClass* cmdClass = ShellCommandClass::acquireCommandClass(className); 98 97 if (cmdClass != NULL) 99 98 { 100 99 CmdList::iterator cmd; 101 for (cmd = cmdClass-> commandList.begin(); cmd != cmdClass->commandList.end(); cmd++)100 for (cmd = cmdClass->_commandList.begin(); cmd != cmdClass->_commandList.end(); cmd++) 102 101 if (commandName == (*cmd)->getName()) 103 102 { … … 119 118 120 119 CmdList::const_iterator elem; 121 for (unsigned int i = 0; i < cmdClass-> commandList.size(); i++)122 { 123 if (commandName == cmdClass-> commandList[i]->getName())124 return (cmdClass-> commandList[i]);120 for (unsigned int i = 0; i < cmdClass->_commandList.size(); i++) 121 { 122 if (commandName == cmdClass->_commandList[i]->getName()) 123 return (cmdClass->_commandList[i]); 125 124 } 126 125 return NULL;
Note: See TracChangeset
for help on using the changeset viewer.