- Timestamp:
- Mar 9, 2006, 12:51:06 PM (19 years ago)
- Location:
- trunk/src/lib
- Files:
-
- 5 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 -
trunk/src/lib/util/executor/executor.cc
r7200 r7201 105 105 value[4] = &value4; 106 106 107 printf("%s ::: paramCount: %d\n", this->getName(), this->paramCount); 107 108 for (unsigned int i = 0; i < this->paramCount; i++) 108 109 { 109 110 if (*value[i] != MT_NULL) 110 111 { 111 // printf("1:::: %s\n", MultiType::MultiTypeToString(this->defaultValue[i].getType())); 112 //this->defaultValue[i].debug(); 113 this->defaultValue[i].setValueOf(*value[i]); 112 printf("1:::: %d : %s \n",i, MultiType::MultiTypeToString(this->defaultValue[i].getType())); 113 114 this->defaultValue[i].debug(); 115 //this->defaultValue[i].setValueOf(*value[i]); 114 116 //printf("2::::%s\n", MultiType::MultiTypeToString(this->defaultValue[i].getType())); 115 117 //this->defaultValue[i].debug(); -
trunk/src/lib/util/loading/load_param.cc
r7198 r7201 45 45 // set the Executor. 46 46 this->executor = executor.clone(); 47 48 if (this->executor) 49 this->executor->setName(paramName); 47 50 } 48 51 -
trunk/src/lib/util/multi_type.cc
r7200 r7201 50 50 case MT_CHAR: 51 51 this->value.Char = '\0'; 52 break; 53 case MT_STRING: 54 this->storedString = ""; 52 55 break; 53 56 } … … 299 302 else if (this->type & MT_STRING) 300 303 { 304 if (this->storedString == "") return 0; 301 305 char* endPtr = NULL; 302 306 int result = strtol(this->storedString.c_str(), &endPtr, 10);
Note: See TracChangeset
for help on using the changeset viewer.