Changeset 5143 in orxonox.OLD for trunk/src/util
- Timestamp:
- Aug 27, 2005, 12:32:41 AM (19 years ago)
- Location:
- trunk/src/util
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/util/shell_command.cc
r5142 r5143 48 48 paramCount = FUNCTOR_MAX_ARGUMENTS; 49 49 this->paramCount = paramCount; 50 this->parameters = new ParameterType[paramCount];50 this->parameters = new long[paramCount]; 51 51 52 52 for (unsigned int i = 0; i < paramCount; i++) … … 146 146 commandBegin++; 147 147 if (strncmp (commandBegin, elem->getName(), strlen(elem->getName()))) 148 148 continue; 149 149 objectPointer = ClassList::getList(elem->classID)->firstElement(); 150 150 } 151 151 else 152 152 { 153 while(*commandBegin == ' ') 154 commandBegin++; 155 tIterator<BaseObject>* iterBO = ClassList::getList(elem->classID)->getIterator(); 156 BaseObject* enumBO = iterBO->firstElement(); 157 { 158 if( !strncmp(commandBegin, enumBO->getName(), strlen(enumBO->getName()))) 159 { 160 objectPointer = enumBO; 161 break; 162 } 163 enumBO = iterBO->nextElement(); 164 } 165 delete iterBO; 153 166 167 if (objectPointer == NULL) 168 break; 169 commandBegin = commandBegin + strlen(objectPointer->getName()); 170 while(*commandBegin == ' ') 171 commandBegin++; 154 172 } 155 173 const char* commandEnd = strchr(commandBegin, ' '); 156 174 if (commandEnd == NULL) 157 commandEnd = executionString + strlen(executionString);175 commandEnd = commandBegin + strlen(commandBegin); 158 176 159 177 if (objectPointer != NULL) 178 { 160 179 elem->executeCommand(objectPointer, commandEnd); 161 delete iterator; 162 return true; 180 delete iterator; 181 return true; 182 } 163 183 } 164 184 elem = iterator->nextElement(); -
trunk/src/util/shell_command.h
r5142 r5143 10 10 11 11 #include "helper_functions.h" 12 #include "functor_list.h" 12 13 13 14 #include <stdarg.h> … … 15 16 #define MAX_SHELL_COMMAND_SIZE 16 17 17 #include "functor_list.h"18 18 19 19 … … 94 94 void* functionPointer; //!< The pointeer to the function of the Class (or static pointer if ClassID == CL_NULL ) 95 95 unsigned int paramCount; //!< the count of parameters 96 ParameterType*parameters; //!< Parameters96 long* parameters; //!< Parameters 97 97 bool isSingleton; //!< if the Class is Singleton @todo autocheck 98 98
Note: See TracChangeset
for help on using the changeset viewer.