Changeset 7216 in orxonox.OLD for branches/std/src/lib/shell/shell_command.cc
- Timestamp:
- Mar 12, 2006, 8:54:30 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/std/src/lib/shell/shell_command.cc
r7211 r7216 153 153 * @return true on success, false otherwise. 154 154 */ 155 bool ShellCommand::execute(const char*executionString)155 bool ShellCommand::execute(const std::string& executionString) 156 156 { 157 157 if (ShellCommandClass::commandClassList == NULL) … … 184 184 { 185 185 if (inputSplits.getCount() > 1) 186 (*alias)->getCommand()->executor->execute(objectList->front(), executionString+inputSplits.getOffset(1)); 186 { 187 188 (*alias)->getCommand()->executor->execute(objectList->front(), executionString.substr(inputSplits.getOffset(1), executionString.size())); /// TODO CHECK IF OK 189 } 187 190 else 188 191 (*alias)->getCommand()->executor->execute(objectList->front(), ""); … … 240 243 return false; 241 244 if (inputSplits.getCount() > fktPos+1) 242 (*cmdIT)->executor->execute(objectPointer, executionString +inputSplits.getOffset(fktPos +1));245 (*cmdIT)->executor->execute(objectPointer, executionString.substr(inputSplits.getOffset(fktPos +1), executionString.size())); /// TODO CHECK IF OK 243 246 else 244 247 (*cmdIT)->executor->execute(objectPointer, ""); … … 326 329 for (classIT = ShellCommandClass::commandClassList->begin(); classIT != ShellCommandClass::commandClassList->end(); classIT++) 327 330 { 328 PRINT(0)("Class:'%s' registered %d commands: \n", (*classIT)->className , (*classIT)->commandList.size());331 PRINT(0)("Class:'%s' registered %d commands: \n", (*classIT)->className.c_str(), (*classIT)->commandList.size()); 329 332 330 333 list<ShellCommand*>::iterator cmdIT;
Note: See TracChangeset
for help on using the changeset viewer.