Changeset 7201 in orxonox.OLD for trunk/src/lib/shell
- Timestamp:
- Mar 9, 2006, 12:51:06 PM (19 years ago)
- Location:
- trunk/src/lib/shell
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/shell/shell_command.cc
r7199 r7201 44 44 this->alias = NULL; 45 45 this->executor = executor.clone(); 46 this->executor->setName(commandName); 46 47 47 48 // this->classID = classID; … … 69 70 ShellCommand* ShellCommand::registerCommand(const char* commandName, const char* className, const Executor& executor) 70 71 { 71 if (ShellCommand::isRegistered(commandName, className , executor))72 if (ShellCommand::isRegistered(commandName, className)) 72 73 return NULL; 73 74 else … … 114 115 * @param commandName the name of the Command 115 116 * @param className the name of the Class the command should apply to. 116 * @param paramCount how many arguments the Command takes117 117 * @returns true, if the command is registered/false otherwise 118 118 * … … 120 120 * This is checked in the registerCommand-function. 121 121 */ 122 bool ShellCommand::isRegistered(const char* commandName, const char* className , const Executor& executor)122 bool ShellCommand::isRegistered(const char* commandName, const char* className) 123 123 { 124 124 if (ShellCommandClass::commandClassList == NULL) … … 304 304 const MultiType& value4) 305 305 { 306 if (this == NULL )306 if (this == NULL || this->executor == NULL) 307 307 return NULL; 308 308 -
trunk/src/lib/shell/shell_command.h
r7198 r7201 79 79 ~ShellCommand(); 80 80 81 static bool isRegistered(const char* commandName, const char* className , const Executor& executor);81 static bool isRegistered(const char* commandName, const char* className); 82 82 static const char* paramToString(long parameter); 83 83
Note: See TracChangeset
for help on using the changeset viewer.